<div dir="ltr">TL;DR, have anyone mentioned /etc/resolv.conf.head?<div><br></div><div>I myself use OpenNIC as my first choice and Yandex as a fallback (while still having OpenDNS set on my home router, need to switch it to Yandex too though).</div><div>So the file looks like:</div><div><div><br></div><div>/etc > cat resolv.conf.head</div><div># OpenNIC</div><div>nameserver 37.235.52.191</div><div><br></div><div># Yandex</div><div>nameserver 77.88.8.8</div><div>nameserver 77.88.8.1</div><div><br></div><div>options timeout:1</div></div><div><br></div><div>And /etc/resolv.conf looking like:</div><div><div>/etc > cat resolv.conf</div><div># Generated by resolvconf</div><div># OpenNIC</div><div>nameserver 37.235.52.191</div><div><br></div><div># Yandex</div><div>nameserver 77.88.8.8</div><div>nameserver 77.88.8.1</div><div><br></div><div>options timeout:1</div><div>nameserver 208.67.222.222</div><div>nameserver 208.67.220.220</div></div><div><br></div><div><br></div><div>As you see Sajan no matter your DNS vary from one connection spot to another the DNS addresses you set in the head file are still the first to be used.</div><div>Another sweet method you can employ is to set the immutable attribute on for /etc/resolv.conf once you are done setting your preferred DNS:</div><div>/etc # chattr +i resolv.conf</div><div><br></div><div>Just remember to turn it off again when you want to edit the file in the future.</div><div><br></div><div class="gmail_extra"><br><div dir="ltr">-Martin</div>
</div></div>