How to direct Internet traffic via 4G modem while connected to a LAN with gateway?
Bo Berglund
bo.berglund at gmail.com
Thu Sep 23 17:55:24 UTC 2021
On Thu, 23 Sep 2021 13:39:33 -0400, Peter Silva <peter at bsqt.homeip.net> wrote:
>investigate ip route add, ip route del.
>assuming windows box is on the same LAN as your pi's eth0, you should be
>able to just change the default route to use the 4G interface.
>
>I think you can just do this manually for now, on the assumption that the
>eth0 will be gone when it comes time to deploy and it will "just work."
>
>
I was advised on the RPi forum to do as follows:
sudo nano /etc/dhcpcd.conf
#add the following to the end of the file:
interface usb0
metric 100
Then
ifconfig usb0 down
ifconfig usb0 down
And after the connect time it was indeed working.
I could start a speedtest while connected via SSH on eth0 and the RPi sent the
command over 4G.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list