I came back after 2 years – literally 2 years, look!
And some things changed… This time I’m facing new ways of network configuration but it’s simpler now!
With netplan you have a nice file with good documentation and example config files that probably have what you need after changing some IPs.
In my case I wanted to change default gateway so my PiHole could take network in its hands.
Edit default file in this directory
# This is the network config written by 'subiquity'
network:
ethernets:
ens3:
addresses:
- 192.168.1.62/24
routes:
- to: default
via: 192.168.1.59
metric: 100
on-link: true
- to: 192.168.1.62
via: 192.168.1.59
metric: 100
nameservers:
addresses: [192.168.1.59]
To be honest all I really needed were those two lines at the end, to point DNS at PiHole but I wanted to try the hole route. And basically that’s it.
Have a nice day!