0

I've got a server with a bind9 server installed on it. I want to use itself as as DNS to resolve local addresses and forward other traffic to other DNSs.

I know that I've got to change the file /etc/resolv.conf that looks like this:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

If I add itself (this server's IP is 10.32.0.2) as a nameserver, it works fine. However, when reboot the file gets overwritten (just as it says), how can I change this setting permanently?

0

The strict way is to make the file immutable, executing sudo chattr +i /etc/resolv.conf

The most common suggestion is that this is edited by the DHCP client on connection. In this case, consider to change the DHCP server, so that it gives to the client your DNS server as the default one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.