Hello, I'm running a FreeBSD virtual machine for learning purposes. After settings it up it didn't have a proper IPv4 configuration so I edited it through sysconfig. I enabled DHCP.
What happens is I can ping public IPs but not ping by DNS; I of course need DNS enabled, particularly because I want to download the kernel source code and when trying to I'm receiving an error of name resolution (that's how I found out what happened).
I've searched for a long time now and I do get valid suggestions, like
but I can't edit the dhclient.conf or resolver.conf files, it doesn't let me save. I've verified permissions on dhclient.conf and it starts with RW, I'm supposed to be able to edit the file since I'm the root.
I'm pretty sure it's getting complicated for me because I'm learning, so every solution I'm pointed to I need to investigate how to get there in the first place.
What's the best way to add a DNS server manually to my FreeBSD machine?
Kind regards,
Josué
What happens is I can ping public IPs but not ping by DNS; I of course need DNS enabled, particularly because I want to download the kernel source code and when trying to I'm receiving an error of name resolution (that's how I found out what happened).
I've searched for a long time now and I do get valid suggestions, like
You can create a file called /etc/resolv.conf.tail and add your own additional settings, but to supersede the information from dhcp you need to instruct the client to do so.
To do this you'll need to edit /etc/dhclient.conf, you can add simply:
supersede domain-name-servers 127.0.0.1;
but I can't edit the dhclient.conf or resolver.conf files, it doesn't let me save. I've verified permissions on dhclient.conf and it starts with RW, I'm supposed to be able to edit the file since I'm the root.
I'm pretty sure it's getting complicated for me because I'm learning, so every solution I'm pointed to I need to investigate how to get there in the first place.
What's the best way to add a DNS server manually to my FreeBSD machine?
Kind regards,
Josué