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.

link|improve this question
feedback

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

link|improve this answer
feedback

Check your gateway and dns settings.

link|improve this answer
feedback

Can you list the output of:

netstat -rn
ifconfig
traceroute 195.66.232.35
cat /etc/resolv.conf
traceroute linx.net
link|improve this answer
feedback

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.

link|improve this answer
feedback

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
link|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
feedback

Your Answer

 
or
required, but never shown

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