Solved /etc/resolv.conf reverting after rebooting || How to set custom DNS servers ?

Hi,
I want to use Cloudflare DNS. I edited /etc/resolv.conf and added


Code:
nameserver 1.1.1.1
nameserver 1.0.0.1

I don't know much about FreeBSD so I was unsure about which service to restart for the changes to take effect so I did a full reboot.
After the reboot I found that the /etc/resolv.conf has reverted back to its previous which looks like this

Code:
~> cat /etc/resolv.conf
# Generated by resolvconf
search domain.name
nameserver 192.168.1.1

How do I set my own choice of DNS servers under FreeBSD ?
 
This did not work for me.

When I type:
Code:
service netif restart

The /etc/resolv.conf file resets and I need to manually add name servers again.
 
Please make sure you added resolvconf=NO to /etc/resolvconf.conf and not to /etc/resolv.conf (if /etc/resolvconf.conf does not exist, create it)

Thank you very much kind sir.

I got it to work now, the "resolv.conf" is no longer resetting.

I can not believe I missed seeing "conf" in "resolvconf.conf" and originally thought "resolvconf.conf" was "resolv.conf".
 
Last edited:
Back
Top