Permanently set DNS after reboot
Hi LQ
I am needing to set my DNS automatically between reboots and I assume I will need to use a Bash script? On occasions I would need to edit the resolv.conf file but when I reboot it reverts back to 127.0.0.1 I am using Code:
Linux voip-pc 3.19.0-49-generic #55~14.04.1-Ubuntu SMP Fri Jan 22 11:24:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Thank you |
What you mean by setting DNS automatically? resolv.conf is overwritten by DHCP client or some other network management application. You can edit it by hand, but then you have to make sure all network configuration helpers (DHCP client, etc) are either stopped or configured not to touch your resolv.conf.
|
Code:
auto br0 |
You need to set the DNS in whatever network configuration tool you use (NetworkManager, etc), because that tool will use the DNS information you tell it to overwrite /etc/resolv.conf every time you reboot. Creating a script to then overwrite /etc/resolv.conf again is an ugly hack and is best avoided.
|
Thank you for the valuable info guys. Ill fiddle a bit when I get a gap. Cheers!
|
All times are GMT -5. The time now is 02:28 AM. |