5
Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         192.168.1.1     0.0.0.0         UG    202    0        0 eth0
    default         192.168.43.1    0.0.0.0         UG    303    0        0 wlan0
    192.168.1.0     *               255.255.255.0   U     202    0        0 eth0
    192.168.43.0    *               255.255.255.0   U     303    0        0 wlan0

I can remove the 192.168.1.1 entry with:

 ip route del default via 192.168.1.1

This works, but after reboot this line comes back. Any idea how to permanently have it removed with Debian-based distributions?

Andrew Volkov
  • 51
  • 1
  • 2

1 Answers1

3

It seems a DHCP server give you this GW on ETH0.

edit this file : /etc/network/interfaces

gf_ way : use a static configuration for eth0 like :

iface eth0 inet static
address 192.168.1.x
netmask 255.255.255.0

stambata way : use a post-up directive to remove this route

iface eth0 inet dhcp
post-up route del default gw 192.168.1.1
inattendu
  • 383