Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a CentOS 5.7 server setup in my office. I have recently moved to a new router (Linksys E3200) and I don't seem to be able to access the web at all through it (git, yum etc.). All the other computers, phone iPads work fine. Just this Linux box. It was ok on my old ADSL modem router on, but I've switched to a different broadband supplier and needed a new router.

I can reach the Linux box fine from across the LAN, ssh & http but I can't connect to the www from it or to it from outside either, despite port forwarding being configured on the E3200.

Any help would be marvellous. Thank you

share|improve this question
    
Can you post the output of your network and DNS configuration? –  Keith Stokes May 25 '12 at 12:12
    
Specifically, the outputs of ifconfig -a, netstat -rn and cat /etc/resolv.conf. –  MadHatter May 25 '12 at 12:13
add comment

1 Answer

up vote 3 down vote accepted

If you can hit your LAN okay, then the first thing I'd check is your gateway. You need to set your gateway so it knows how to get "out" to the Internet. Edit /etc/sysconfig/network. Here is an example:

root@myhost:~> cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=myhost
GATEWAY=192.168.1.1

GATEWAY should be set to your router's IP. Then restart the network service:

service network restart
share|improve this answer
    
Ah, thank you for making me look closer. I'd set my GATEWAY to my public IP. Oops –  koorb May 25 '12 at 12:28
add 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.