default routes

When you want to connect a not-Internet-connected router via ethernet to your Ubuntu laptop, but still prefer your laptop’s Wi-Fi connection for Internet routes, you can delete the default route for the ethernet connection:

$ /sbin/ip route | awk '/default/ { print $3 }'
$ sudo route del default gw 192.168.100.1

^^ where the 192 address is the gw for the ethernet connection

There may be better ways to do this, such as using ifmetric, but the above works for me.


Posted

in

by

Tags:

Discover more from 10,000 scraps of paper

Subscribe now to keep reading and get access to the full archive.

Continue reading