I need help with a (simple) network configuration with netplan. It is very simple, I have 2 NICs: enp5s0 is ethernet and give access to the company network, and wlp4s0 is WiFi and give access to Internet via a router.
I just want the Internet traffic to be routed via the WiFi connection. The netplan configuration should be something like:
network: version: 2 renderer: NetworkManager ethernets: enp5s0: dhcp4: true routes: - to: 192.168.1.0/24 via: 192.168.1.1 wifis: wlp4s0: dhcp4: true access-points: "My WiFi Network": password: "foobar" gateway4: 10.128.128.128 routes: - to: 0.0.0.0/0 via: 10.128.128.128
But it is not working. Surprisingly it is very easy to add the routes from the command line:
sudo route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev enp5s0 sudo route del default gw 192.168.1.1 sudo route add default gw 10.128.128.128
And this works like a charm. I just want to do that with netplan...