Translation(s): none

This page describes how to lock your /etc/resolv.conf


my issues

my internet connection seems not to work. i could figured out, that it affects only dns. so my first workaround was

sh -c 'echo "nameserver" > /etc/resolv.conf'

but the networks I'm connected with didn't like my choice of nameserver. so they overwrites the resolv.conf many times.

the way forward

to get permanent peace a mention from was to use chattr +i - and I start to go.

the ultimate order

rm /var/run/NetworkManager/resolv.conf  && rm /etc/resolv.conf && sh -c 'echo "nameserver" > /etc/resolv.conf' && cat /etc/resolv.conf &&  chattr -V +i /etc/resolv.conf

/var/run/NetworkManager/resolv.conf is an auto-generated symlink (I don't know which program it does)

the nameserver IP is a dns server from google. if you don't trust or want to use another, insert an other ip there.

the 'cat' order ist to generate output and control if it works.

same for the -V at the chattr order