[Novalug] How Lock DNS Server i.p.?
James Ewing Cottrell 3rd
JECottrell3@Comcast.NET
Mon Sep 20 13:45:43 EDT 2010
I never heard of the prepend directive before, but it appears that
either the Ubuntu people or the NetworkManager people can't resist
changing the world.
Two suggestions:
[1] don't use NetworkManager
[2] put what you want to in resolv.conf and set the immutable bit
You can go thru all the networking scripts and figure out where
/etc/resolv.conf is changed. You can probably also either tell NM not to
control that interface, and there almost certainly is a way to tell it
not to muck with DNS at all.
After all, you might want to run your own caching nameserver and always
check 127.0.0.1
Finally, you could write a (ugly hack) cron job that copies
/etc/resolv.roger to /etc/resolv.conf every minute :)
JIM
On 9/20/2010 1:01 PM, Roger W. Broseus wrote:
> I want to have fixed i.p. for my DNS server. One post to Ubuntu forums
> suggested adding the following to /etc/resolv.conf:
>
> prepend domain-name-servers your.name.server.ipaddr;
>
> My resolv.conf before editing:
>
> search home
> nameserver 192.168.1.1
> nameserver 71.252.0.12
>
> So, I edit to add, before the first nameserver line:
>
> prepend domain-name-servers 38.119.98.220, 216.93.191.228;
>
> After reboot, resolv.conf becomes
>
> ### BEGIN INFO
> #
> # Modified_by: NetworkManager
> # Process: /usr/bin/NetworkManager
> # Process_id: 5290
> #
> ### END INFO
>
> search home
>
>
> nameserver 192.168.1.1
> nameserver 71.252.0.12
>
> How do I lock down the i.p. for DNS servers? Is the syntax of my
> addition to resolv.conf correct?
>
> (If I manually change / add DNS i.p. addresses in network settings,
> they function until the next reboot, whereupon the get reverted to the
> ones I want to have as tertiary i.ps.)
>
> --
> Roger W. Broseus - Linux User
> Email: RogerB@bronord.com
> Web Site: www.bronord.com
>
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.851 / Virus Database: 271.1.1/3147 - Release Date: 09/20/10 02:35:00
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20100920/6a7e7d32/attachment.htm>
More information about the Novalug
mailing list