I have a Debian Jessie box with 2 interfaces. I want eth1 to route public traffic on public static IP 126.96.36.199, and eth0 to route mgmt traffic on 192.168.0.55, so I edited /etc/network/interfaces to look like:
source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth1 iface eth1 inet static address 188.8.131.52 netmask 255.255.255.0 gateway 184.108.40.206 dns-nameservers 220.127.116.11 post-up route del default gw 192.168.0.1 eth0 post-up route add default gw 18.104.22.168 eth1 # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.0.55 netmask 255.255.255.0 gateway 192.168.0.1
but when I reboot I have to manually delete the 192.168.0.1 eth0 gateway and add the 22.214.171.124 eth1 one. Why isn't this persisting across a reboot? Is there some other place where the default route/gw is set?