I have a Raspi connected through WiFi in which I plug-in a Huawei stick I use for SMS sending. Unfortunately when doing this, it changes the routes to the following:
pi@raspberrypi:/opt/pi/printer $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default hi.link 0.0.0.0 UG 0 0 0 eth1
default hi.link 0.0.0.0 UG 204 0 0 eth1
default 10.0.2.1 0.0.0.0 UG 303 0 0 wlan0
10.0.2.0 * 255.255.255.0 U 303 0 0 wlan0
192.168.8.0 * 255.255.255.0 U 204 0 0 eth1
One would guess that it should be easy to remove the route, but it doesn't work:
pi@raspberrypi:/opt/pi/printer $ ping hi.link
PING hi.link (192.168.8.1) 56(84) bytes of data.
64 bytes from hi.link (192.168.8.1): icmp_seq=1 ttl=64 time=1.05 ms
pi@raspberrypi:/opt/pi/printer $ route del default via 192.168.8.0
# does NOT work, displays the usage howto
I can only get this working by adding an additional route:
pi@raspberrypi:/opt/pi/printer $ route add default gw 10.0.2.1 wlan0
Question: how do I either prevent this hi.link route being created when the Huawei stick is plugged in respective how can I delete this route
Many thanks!
route add default gw 10.0.2.1 wlan0
worked now nicely, but I am still not able to delete the default via 192.168.8.0 and have it in there...