0

I'm trying to make my server use CloudFlare public DNS (1.1.1.1, 1.0.0.1).

When I edit /etc/resolv.conf I see:

; generated by /usr/sbin/dhclient-script
nameserver 10.10.10.10

When I update it to this, it gets erased on reboot:

nameserver 1.1.1.1
nameserver 1.0.0.1

From this answer it makes it sound simple by adding executable to dhclient-enter-hooks.d except I don't have that directory.

When I tried to create it I couldn't edit files in it, after looking at ls for awhile it seems it has a . which makes it have a policy?

What would be the easiest means of doing this? I have an outgoing MTA that generates many external lookups which is why I wanted to do this. I tried installing unbound and it was a disaster, so I went this route as it seemed simple... on the surface.

I'm not sure if this matters, but my server also has 5 IPs assigned to it for ifcfg-eth0, ifcfg-eth0:0, ifcfg-eth0:1, etc

Thanks

Tallboy
  • 101
  • 2
  • Would manually disabling updates to `resolv.conf` work for you? https://forums.centos.org/viewtopic.php?t=59796 – gerhard d. May 23 '22 at 13:17
  • Hmm.. I'm not sure if that's good or bad. Considering resolv.conf has literally only a single line in it (that I want to change), I imagine its OK? – Tallboy May 23 '22 at 17:41

0 Answers0