Solved Unbound doubt

Hello everyone, this is my test of DNS:

hostname: host1.example.com
IP: 192.168.1.2
Router IP: 192.168.1.1

During installing freebsd,specify that search is example.com and DNS is 192.168.1.1.

hosts ---- Not modified

After start local_unbound, 192.168.1.1 be configured as forwarder.
/etc/resolv.conf
search example.com # nameserver 192.168.1.1 nameserver 127.0.0.1 options edns0


Then turned off Unbound DNSSEC,

ping freebsd.org ---- OK


But

ping host1.example.com

, it will try to get IP from internet, not what I imagined would get local host1 IP.

Where am I wrong?

Thanks.
 
Does your router actually provide that service? I mean does it work without Unbound?
 
That's not really related. If there's no DNS service that can actually resolve your hostname (host1.example.com) this is never going to work. DNS doesn't "magically" know how to resolve hostnames to IP addresses.
 
That's not really related. If there's no DNS service that can actually resolve your hostname (host1.example.com) this is never going to work. DNS doesn't "magically" know how to resolve hostnames to IP addresses.
Can't the local_unbound be done? Is it just for DNS caching?

If I want ping host1.example.com to get 192.168.1.2, I will have to install Unbound from the FreeBSD Ports Collection, is it right?
 
Unbound is a caching DNS resolver. Nothing more, nothing less.
 
  • Thanks
Reactions: sdf
If I want ping host1.example.com to get 192.168.1.2, I will have to install Unbound from the FreeBSD Ports Collection, is it right?
Just editing /etc/hosts would be the easiest solution. The other is to run your own DNS server.
 
Back
Top