AirTightSafe 1 Posted ... I am having a bit of trouble editing the resolv.conf file. Aparently, I cant edit it manually as suggested on the Arch wiki. "To use alternative DNS servers, edit /etc/resolv.conf and add them to the top of the file so they are used first, optionally removing or commenting out already listed servers."https://wiki.archlinux.org/index.php/Resolv.conf Although I can open the file and edit it, I can't save the nameservers I entered. (I am as admin with root privileges.) I thought maybe it was being run by another process so I tried lsattr and nothing was holding it. I even ran chattr -i /etc/resolv.conf just to make sure. Still no avail. Quote Share this post Link to post
rickjames 106 Posted ... If you were directly editing the file instead try using nano or your favorite editor to edit the /etc/resolv.conf via terminal. via terminal as root/su ect... nano /etc/resolv.confnameserver 10.4.0.1 -edited Quote Share this post Link to post
vpnair33 6 Posted ... every time you connect to the internet the file /etc/resolv.conf is being altered. so any changes you may have made to /etc/resolv.conf will be scrapped and it will re-write the file with probably something like 'nameserver 192.168.1.1' or whatever ip your router is.....you want to prevent that from happening... try this:disconnect from your network/internet. then open your /etc/resolv.conf and alter it however you like.after you alter your /etc/resolv.conf file, goto the terminal and type:sudo chattr +i /etc/resolv.confthis will lock the /etc/resolv.conf file, no one can edit it. not even a super user do (sudo). (Unless of course you unlock the file). to unlock the file type this in the terminal:sudo chattr -i /etc/resolv.confyou will then be able to edit it again, as with your machine too.. after you lock your /etc/resolv.conf file, try re connecting to the internet and it will use your nameserver's you specified in /etc/resolv.conf. Quote Share this post Link to post
NaDre 157 Posted ... I am having a bit of trouble editing the resolv.conf file. Aparently, I cant edit it manually as suggested on the Arch wiki. "To use alternative DNS servers, edit /etc/resolv.conf and add them to the top of the file so they are used first, optionally removing or commenting out already listed servers."https://wiki.archlinux.org/index.php/Resolv.conf Although I can open the file and edit it, I can't save the nameservers I entered. (I am as admin with root privileges.) I thought maybe it was being run by another process so I tried lsattr and nothing was holding it. I even ran chattr -i /etc/resolv.conf just to make sure. Still no avail. If you are trying set up DNS servers for use with AirVPN (?), then I wonder if this post by staff is relevant here: https://airvpn.org/topic/9608-how-to-accept-dns-push-on-linux-systems-with-resolvconf/ 1 vpnair33 reacted to this Quote Share this post Link to post
avalmez 0 Posted ... the arch linux article you reference above https://wiki.archlinux.org/index.php/Resolv.conf describes in section 3 why /etc/resolv.conf may be overwritten and hence prior changes lost. the articlke goes on to describe how to preserve changes to resolv.conf. i followed the procedure described for preserving resolv.conf changes when using dhcpcd and the procedure work as expected. Quote Share this post Link to post