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 changed my IP to static IP and I no more have access to the internet on my CENTOS 5 server. Oddly you can see the webpage that I am hosting on the server if you navigate to it from another computer but you cannot go on the internet from the CENTOS computer itself, i.e. you cannot navigate to any website from a browser (Firefox, IE, etc) on the centos machine. It was working before until we changed the IP and sent the website we are hosting on the server live. Any answers will be greatly appreciated.

share|improve this question
add comment

5 Answers

up vote 0 down vote accepted

Please setup your dns servers :


echo "nameserver x.x.x.x" > /etc/resolv.conf
echo "nameserver y.y.y.y" >> /etc/resolv.conf

And set you default gateway by this command line:


route add default gw z.z.z.z

share|improve this answer
add comment

Check your gateway and dns settings.

share|improve this answer
add comment

Can you list the output of:

netstat -rn
ifconfig
traceroute 195.66.232.35
cat /etc/resolv.conf
traceroute linx.net
share|improve this answer
add comment

check your IPTABLES (iptables -L) and look for drop rules in the output field.

Also check and make sure that there isn't a network manager conflict, like the service network and NetworkManager are not both running.

share|improve this answer
add comment

You lost your DNS providers when you switched to a static IP. The easiest way to get DNS back working is to do this as a superuser:

echo 4.2.2.2 >> /etc/resolv.conf
share|improve this answer
1  
Technically, it would be: echo "nameserver 4.2.2.2" >> /etc/resolv.conf Also, using a nameserver from another ISP is bad netiquette (even if they've left it wide open). You would be better off contacting your own ISP and ask them what are their name server IP addresses are. –  Sean Staats Sep 9 '09 at 20:05
    
I agree that this is probably the answer to the problem. As Sean Staats mentions, you will want to find the proper DNS servers for your ISP, or use OpenDNS (depending on your philosophy on OpenDNS). –  Joe Sep 9 '09 at 21:50
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.