# Resolver not working



## balanga (Mar 12, 2016)

Apologies in advance for asking such a dumb question, but can someone tell me why I can't resolve hostnames? I can `ping 8.8.8.8` but google.com can't be resolved.

I have two separate systems with an identical /etc/resolv.conf


```
root@Desktop:/ # cat /etc/resolv.conf
search localdomain
# nameserver 192.168.1.1
nameserver 127.0.0.1
options edns0
```

Why would one work and the other not?


----------



## kpa (Mar 12, 2016)

There has to an actual DNS forwarder or resolver (such as dns/unbound) running and listening for connections at the adress(es) listed in resolv.conf(5).


----------



## balanga (Mar 12, 2016)

How do  I check this?

Both systems have `local_unbound_enable="YES"` in /etc/rc.conf


```
service unbound status
unbound does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
```

This is the same on both systems.


----------



## kpa (Mar 12, 2016)

The local version of the service is called local_unbound.


----------



## balanga (Mar 12, 2016)

```
root@Desktop:/ # service local_unbound status
local_unbound is running as pid 396.
```

running on both systems...


----------



## SirDice (Mar 14, 2016)

Does this work: `drill @127.0.0.1 www.google.com`?

Also, check if unbound is actually listening: `sockstat -46`


----------



## kpa (Mar 14, 2016)

Do either of the systems have firewall running? Are you not filtering on the loopback lo0 on the other system by any chance?


----------



## balanga (Mar 15, 2016)

SirDice said:


> Does this work: `drill @127.0.0.1 www.google.com`?
> 
> Also, check if unbound is actually listening: `sockstat -46`



The strange thing is that the resolver works fine when booting up and continues to work for some time. I have not yet determined at what point it starts misbehaving.... Maybe it's a memory problem with too many processes running...


----------



## balanga (Mar 15, 2016)

kpa said:


> Do either of the systems have firewall running? Are you not filtering on the loopback lo0 on the other system by any chance?



* Filtering on the loopback *doesn't really mean anything to me I'm afraid. If I am then it isn't something which I have done intentionally.

I have pfSense running as my Internet gateway and that provides the firewall for my network.


----------

