# Hostname lookup failure



## balanga (Mar 7, 2017)

At home I have a pfSense box which acts like a gateway to my network and I never need to worry about Internet access. Currently I'm away and trying to use FreeBSD but am unable to resolve hostnames - I get hostname lookup failure. This does not happen on Windows so it looks as though something is missing from my FreeBSD setup. 

What do I need, on FreeBSD to resolve hostnames? I can PING the router and Internet sites by IP address so I know that networking is working.


----------



## SirDice (Mar 7, 2017)

balanga said:


> What do I need, on FreeBSD to resolve hostnames?


A resolv.conf(5) file. If you use DHCP you should get it automatically, if you use static addresses you're going to have to set it yourself.


----------



## balanga (Mar 7, 2017)

The problem is that I have `ifconfig_em0="DHCP"` in /etc/rc.conf but I don't get hostname resolved, at least not under FreeBSD.


----------



## SirDice (Mar 7, 2017)

What hostname are you trying to resolve? Something on the internet? Or something from your internal network?


----------

