Solved Unbound doubt

sdf

Active Member

Reaction score: 3
Messages: 170

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,057
Messages: 31,638

Does your router actually provide that service? I mean does it work without Unbound?
 
OP
OP
S

sdf

Active Member

Reaction score: 3
Messages: 170

It is a Fiber Optic modem. It get DNS from ISP.
 
Last edited:

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,057
Messages: 31,638

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.
 
OP
OP
S

sdf

Active Member

Reaction score: 3
Messages: 170

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?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,057
Messages: 31,638

Unbound is a caching DNS resolver. Nothing more, nothing less.
 
  • Thanks
Reactions: sdf

ShelLuser

Son of Beastie

Reaction score: 1,752
Messages: 3,569

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.
 
Top