can't change DNS servers

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
benc
Level 1
Level 1
Posts: 27
Joined: Wed Dec 13, 2017 7:48 pm

can't change DNS servers

Post by benc »

One quick OT question please -- there did not seem to be a "new topic" button at the base-level networking forum. Did I miss it somehow?

Back to the purpose of the visit -- I picked up a commercial VPN and changed my DNS servers to a host recommended by the VPN. The suggested DNS service was pretty active in censorship as they blocked resolution of around 6 websites over several weeks. I did some research and found what I think is a better service and tried to change my servers -- but I can not longer edit resolv.conf, followed by "chattr +i /etc/resolv.conf". Maybe a security update is blocking me.

I read that I could change the DNS servers in the Control panel under "networking". I went in there, deleted my old servers, put in new servers and locked it. Rebooted. My new servers were nowhere to be found and my old servers are still showing. Any idea what I'm doing wrong?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
minitux

Re: can't change DNS servers

Post by minitux »

Code: Select all

gksudo xed /etc/resolvconf/resolv.conf.d/head
in the file that open add your dns and save and close the file, then run

Code: Select all

sudo resolvconf -u
I use this for settting open dns in my case is the first command I has posted and add to the file this

Code: Select all

nameserver 208.67.222.222
nameserver 208.67.220.220
I save and close the file and then I run the second command
benc
Level 1
Level 1
Posts: 27
Joined: Wed Dec 13, 2017 7:48 pm

Re: can't change DNS servers

Post by benc »

minitux wrote:

Code: Select all

gksudo xed /etc/resolvconf/resolv.conf.d/head
in the file that open add your dns and save and close the file, then run

Code: Select all

sudo resolvconf -u

Thanks very much. I'll try this next time I change the servers.

After reading more, I found that I was locking the resolv.conf file with chattr and that was causing the problem. Good grief :-)
minitux

Re: can't change DNS servers

Post by minitux »

to unlock a file locked with chattr +i, then, you have to use chattr -i to unlock it and modified again, however I do not know if it works in the case of resolv.conf and in the lasts release of mint

EDIT: on Mint 18.3 that command ( chattr +i) it answers me not supported

Code: Select all

$ sudo chattr +i /etc/resolv.conf
chattr: Operazione non supportata leggendo i flag di /etc/resolv.conf
Locked

Return to “Networking”