Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had a working configuration this morning with the following simple /etc/rc.conf /etc/resolv.conf is completely commented out.

ifconfig_rl0="DHCP"
ifconfig_xl="inet 192.168.1.11 netmask 255.255.255."

defaultrouter="192.168.1.1"

I added the following lines:

firewall_enable="YES"
firewall_type="SIMPLE"
firewall_logging="YES"

sshd_enable="YES"
apache_enable="YES"
mysql_enable="YES"

restarted the computer and no connectivity, changed rc.conf back to last working configuration and still no connectivity.

ping www.google.com
#--> ping: cannot resolve www.google.com: Host name lookup failure

ping 8.8.8.8 # --> (works fine)

apachectl start
#--> /usr/local/sbin/apachectl start: httpd could not be started

dig google.com
#--> connection timed out

nslookup google.com
#--> connnection timed out; no servers could be reached

I also used /etc/rc.d/routing restart between the working state and the broken state

share|improve this question
    
Try dig google.com and post the output. It sounds like a DNS problem. –  BenjiWiebe Oct 18 '13 at 21:00
    
Now how about output from nslookup google.com? –  BenjiWiebe Oct 18 '13 at 21:09
    
Wait... /etc/resolv.conf is empty? Or at least, it has no nameservers? –  BenjiWiebe Oct 18 '13 at 21:22
    
Yeah, I thought it was working when empty this morning, but maybe not? –  shupru Oct 18 '13 at 21:22
    
I doubt it. AFAIK, /etc/resolv.conf needs to be populated. –  BenjiWiebe Oct 18 '13 at 21:25
show 1 more comment

1 Answer

up vote 0 down vote accepted

I think your problem is that /etc/resolv.conf is empty. Try putting the following in it (to use Google's public DNS servers):

nameserver 8.8.8.8
nameserver 8.8.4.4

That should work.

share|improve this answer
    
Try apachectl status. That sounds like a completely different problem, and may need its own question. –  BenjiWiebe Oct 18 '13 at 21:39
    
Probably would be a good idea. Especially the part about accepting my answer. :D –  BenjiWiebe Oct 18 '13 at 21:40
    
I'll post a new one, but here is (part of) the output unable to connect to remote host. –  shupru Oct 18 '13 at 21:42
    
I'll take a look at your new question, there is a chance I will be able to answer it. –  BenjiWiebe Oct 18 '13 at 21:44
    
Why don't you put a link in a comment here so when I come back later I can look at the question? –  BenjiWiebe Oct 18 '13 at 21:45
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.