2

I want a very simple task: to disable eth0 as the default gateway. (I have wlan0 configured for that purpose.) The command is trivial:

sudo route del default dev eth0

and it works, but some time later the routing table gets reverted to the previous state. This happens on reboot and sometimes also during snap install.

How do I make this routing table change persistent? Or how do I permanently disable eth0 as the default gateway?

I tried adding the above command as a post-up hook in a file in /etc/network/interfaces.d/, but apparently this is ignored. Why?

We're trying to connect a Ubuntu Core device to a laptop over Ethernet cable, and then run an installer script which configures the Internet connection over WiFi. There is no routing on the laptop so this initial cable connection is not a gateway to the Internet.

vidarlo
  • 22,691
stf
  • 151

0 Answers0