I have:
- A Raspberry Pi 3B SBC
- I have a Huawei E5330 3G Wifi router connected to the Pi via USB
- I have a Wireless router connected to my internet line (fibre)
- I have set a static IP address for my Pi's connection to the internet Wifi router
- I can connect to the Pi using SSH using that static IP
I have the challenge that when the Pi tries to access the internet (e.g, when running sudo apt-get update
), it uses the Huawei modem's connection.
I want it to use the fibre's Wifi router connection(not connect through the Huawei 3G one).
What I have tried:
- Ran
$ sudo route add default gw 192.168.1.1 wlan0
based on this answer
Ran netstat -rn, and got the following result, where 192.168.1.1 is my fibre line's Wifi router and 192.168.8.1 is my 3G router
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
0.0.0.0 192.168.8.1 0.0.0.0 UG 0 0 0 enx001e101f0000
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 enx001e101f0000
Then Ran rote
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
default www.huaweimobil 0.0.0.0 UG 204 0 0 enx001e101f0000
default 192.168.1.1 0.0.0.0 UG 303 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
192.168.8.0 0.0.0.0 255.255.255.0 U 204 0 0 enx001e101f0000
I don't want to mess up the configs, if I haven't already, so any help would be appreciated on how I can make all internet requests to go through my fibre's Wifi router (192.168.1.1)