Default routing changing automatically

Hi Luvers I have a pc with 3 nics eth0, eth1 and wlan0 running Debian 8. eth0 is on board nic eth1 is a usb ethernet adapter wlan0 is a wifi usb dongle wlan0 is the connection to the external world. (192.168.1.17) eth0 and eth1 only connects to local devices (192.168.0.11 and .12 respectively) The system is configured to be accessed over ssh via wlan0, which works fine for a while. However after a while (usually 24+ hrs), a default route via eth0 will appear in the routing table with a lower metric value than wlan0, and it cannot be accessed via wlan0 anymore. If I delete it, everythig will be ok, but it will appear again later. How do I stop this from happening? (and why is this happening in the first place)? Thanks in advance. Daniel -- dan062 <dan062@yahoo.com.au>

On Sun, 17 Apr 2016 04:12:42 PM Dan062 via luv-main wrote:
I have a pc with 3 nics eth0, eth1 and wlan0 running Debian 8.
eth0 is on board nic eth1 is a usb ethernet adapter wlan0 is a wifi usb dongle
wlan0 is the connection to the external world. (192.168.1.17) eth0 and eth1 only connects to local devices (192.168.0.11 and .12 respectively)
The system is configured to be accessed over ssh via wlan0, which works fine for a while. However after a while (usually 24+ hrs), a default route via eth0 will appear in the routing table with a lower metric value than wlan0, and it cannot be accessed via wlan0 anymore. If I delete it, everythig will be ok, but it will appear again later.
How is eth0 getting it's address? If it's by DHCP then that would be the cause of it. The router involved is probably to blame. To keep your maching usable you could write a script that looks for such a route and if it exists removes it and logs the problem. A script like that running from cron can keep it accessible. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On 17/04/16 16:44, Russell Coker via luv-main wrote:
How is eth0 getting it's address? If it's by DHCP then that would be the cause of it. The router involved is probably to blame.
To keep your maching usable you could write a script that looks for such a route and if it exists removes it and logs the problem. A script like that running from cron can keep it accessible.
If you can set your eth0 to statically configured, that should also prevent it from accepting routes via DHCP. If necessary, you could also add firewall rules to drop DHCP packets arriving via eth0. Hope that helps, Andrew

On 17/04/16 16:53, Andrew Pam via luv-main wrote:
On 17/04/16 16:44, Russell Coker via luv-main wrote:
How is eth0 getting it's address? If it's by DHCP then that would be the cause of it. The router involved is probably to blame.
To keep your maching usable you could write a script that looks for such a route and if it exists removes it and logs the problem. A script like that running from cron can keep it accessible.
If you can set your eth0 to statically configured, that should also prevent it from accepting routes via DHCP. If necessary, you could also add firewall rules to drop DHCP packets arriving via eth0.
eth0 is a static IP already, not dhcp. eth0 also connects to a device (ipcam) - so can't block it. Daniel.
Hope that helps, Andrew _______________________________________________ luv-main mailing list luv-main@luv.asn.au https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

Daniel Jitnah via luv-main <luv-main@luv.asn.au> writes:
On 17/04/16 16:53, Andrew Pam via luv-main wrote:
On 17/04/16 16:44, Russell Coker via luv-main wrote:
How is eth0 getting it's address? If it's by DHCP then that would be the cause of it.
eth0 is a static IP already, not dhcp. eth0 also connects to a device (ipcam) - so can't block it.
How are your networks configured? ifupdown (default for GUI-less Debian 8); network-manager (default for GUI Debian 8?); or systemd-networkd (default for Debian 9)? In any case, please show us your relevant config. Off the top of my head, those would be: # usual suspects ip link ip address ip route ip rule # for ifupdown grep -H ^ /etc/network/interfaces # for systemd-networkd find -O3 /???/systemd/ -name '*.network' -exec grep -H ^ {} + # for NM, I have NFI. Probably something dbus-flavoured.
participants (5)
-
Andrew Pam
-
Dan062
-
Daniel Jitnah
-
Russell Coker
-
trentbuck@gmail.com