0

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.

1
  • Check your gateway and dns settings.
    – user17642
    Sep 9, 2009 at 19:08

4 Answers 4

0

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

0

Can you list the output of:

netstat -rn
ifconfig
traceroute 195.66.232.35
cat /etc/resolv.conf
traceroute linx.net
0
0

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.

-1

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
2
  • 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. Sep 9, 2009 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, 2009 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .