can't change DNS servers

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
benc
Level 1
Level 1
Posts: 16
Joined: Wed Dec 13, 2017 7:48 pm

can't change DNS servers

Post by benc » Thu Dec 21, 2017 2:46 pm

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?

minitux
Level 5
Level 5
Posts: 860
Joined: Tue Sep 12, 2017 10:05 am

Re: can't change DNS servers

Post by minitux » Thu Dec 21, 2017 3:39 pm

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: 16
Joined: Wed Dec 13, 2017 7:48 pm

Re: can't change DNS servers

Post by benc » Thu Dec 21, 2017 3:54 pm

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
Level 5
Level 5
Posts: 860
Joined: Tue Sep 12, 2017 10:05 am

Re: can't change DNS servers

Post by minitux » Thu Dec 21, 2017 4:04 pm

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

Post Reply

Return to “Other networking topics”