DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've set up my interfaces ok and set them to static and I set up a bind server for DNS. But it seems like every so often resolv.conf gets overwritten with the DNS from DHCP. Network manager doesn't seem to be running and I can't understand why it keeps getting overwritten. Sure I could make it immutable using chattr (assuming that works ok in debian) but that's working round the issue.
Any ideas why this is happening or what I can do to stop it?
When a DHCP server gives you a DNS server address, shouldn't it be updated?
My resolv.conf has this comment:
Code:
man resolvconf
Yeah, I've got a really lightweight console install I've not installed network-manager or resolvconf so it (from what I can gather) shouldn't be being dynamically updated. I guess I should just change the DHCP but it really is just working round the problem. hmm.
Well,.. if you are positive it isnt NetworkManager.. You can always use auditing to find out what is changing it:
Code:
# Set up the audit
/sbin/auditctl -w /etc/resolv.conf -p war
# After the file changes use this to see the PID of the process that changed it
/sbin/ausearch -f /etc/resolv.conf
Well,.. if you are positive it isnt NetworkManager.. You can always use auditing to find out what is changing it:
Code:
# Set up the audit
/sbin/auditctl -w /etc/resolv.conf -p war
# After the file changes use this to see the PID of the process that changed it
/sbin/ausearch -f /etc/resolv.conf
Thankyou. Great idea.
What's the process name for networkmanager on debian just to make sure I'm not being a plonker.
I can't see it in services and if I grep -i for net in ps i only get [netns] which I think is network namespace which... I honestly don't know enough about.. It might be the culprit.
What's the process name for networkmanager on debian just to make sure I'm not being a plonker.
I can't see it in services and if I grep -i for net in ps i only get [netns] which I think is network namespace which... I honestly don't know enough about.. It might be the culprit.
if it is installed, you should be able to find out with
Code:
dpkg -L network-manager |grep bin
However, I suggest you just install resolvconf and let it deal with this issue for you.
You have resolvconf* installed, which is trying to handle this for you "automagically". I would suggest removing it for a start. (*not to be confused with the resolv.conf configuration file).
I believe dhclient can still write to your resolv.conf regardless of if you setup a static address, but might be wrong about that. Editing the file and removing resolveconf should be enough.
There are more eloquent solutions but if the chattr solution works...
For DHCP, where you want to get an automatically assigned address, but specify your nameservers locally, edit dhclient.conf and add a suitable "prepend domain-name-servers" stanza.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.