I'm wondering if someone could give me any tips with this problem.
I'm actually running Debian 8 Jessie with the following version:
Code: Select all
migue@Wise:~$ uname -r
3.16.0-4-686-pae
migue@Wise:~$ lsb_release
No LSB modules are available.
migue@Wise:~$ cat /proc/version
Linux version 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19)
http://forums.debian.net/viewtopic.php? ... es#p639304
I've tried to add static entries on the /etc/network/interfa
ces as follows with no results:
Code: Select all
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.12.101
netmask 255.255.255.0
network 192.168.12.0
broadcast 192.168.12.255
gateway 192.168.12.230
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 200.30.40.245 200.40.220.245
post-up ip route add -inet 150.100.1.0/24 gw 192.168.12.254 dev eth0
post-up ip route add -inet 180.100.1.0/24 gw 192.168.12.254 dev eth0
post-up ip route add -inet 192.168.15.0/24 gw 192.168.12.254 dev eth0
Something like:
Code: Select all
../etc/network/if-up.d$ sudo nano script.sh
#!/bin/bash
# Adding static rules at the beginning
ip route add -inet 150.100.1.0/24 gw 192.168.12.254 dev eth0
ip route add -inet 180.100.1.0/24 gw 192.168.12.254 dev eth0
ip route add -inet 192.168.15.0/24 gw 192.168.12.254 dev eth0
Is there another way to make static rules persistent?
Thank you all in advance.
Regards;
M.