Ever since I installed a client from a VPN service, I'm unable to use the internet when not using a VPN connection. I figured out that this is because /etc/resolv.conf is being populated with the wrong nameserver after I disconnect the VPN session.
Instead of nameserver 192.168.8.1 and nameserver <ipv6> it's pointing to nameserver 192.168.1.1, which doesn't exist on the network.
I have tried to add different nameservers to /etc/resolv.conf.head and /etc/resolv.conf.tail with no results.
I'm unable to change /etc/resolv.conf, even with root. It fails with [ Error writing /etc/resolv.conf: Operation not permitted ].
When running sudo resolvconf -u it also fails with multiple errors:
/etc/resolvconf.conf: line 8: nameserver: command not found /etc/resolvconf.conf: line 9: nameserver: command not found /usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: Operation not permitted I'm guessing this is because network manager uses the file, and locks it from editing. So this leads me to believe network manager is the only way to solve this problem. Proceeded to try to edit network manager configuration sudo vim /etc/NetworkManager/NetworkManager.conf.
Changed dns=default to dns=192.168.8.1 and dns=dnsmasq, restarting with sudo systemctl restart NetworkManager.service. Unfortunately it's still populating /etc/resolv.conf to the wrong configuration.
I feel like I'm running out of options. How do I make sure that network manager populates resolv.conf with the right nameserver settings?