I am using ubuntucore, I want to configure nameservers in /etc/resolv.conf. Configuring with “console-conf” does not allow you to set nameservers and hence will be picked from dhcp only, I want to add more nameservers with dhcp configuration.
Editing any config file (for example /etc/dhcp/dhclient.conf, /etc/resolvconf/resolv.conf.d/base) is also not possible since it’s a read only file system. I tried stopping and disabling systemd-resolved service but still no luck on reboots.
I can manually add nameservers entry in the config file (/etc/netplan/00-snapd-config.yaml) but that also doesn’t seem to work.
I am able to set nameservers in static configuration though.
and my /etc/resolv.conf file after generate, apply and reboot:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.129.12
Also, I don’t see more than 3 entries in resolv.conf even after providing 4 or 5 entires only 3 appear in the file that too 8.8.8.8, 8.8.4.4 and the first one that I give in nameservers.addresses
i dont think the curly brackets are correct in your “nameservers:” entry …
and you might also need to move them up one level (not underneath eth0 but as a global setting directly under “network:” )
@ogra The given file content is generated by “console-conf”. I’ll try adding nameservers manually in the file under networks and will let you know the result.