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.

playkid
  • 13
  • 2
  • 5

4 Answers4

0

Can you list the output of:

netstat -rn
ifconfig
traceroute 195.66.232.35
cat /etc/resolv.conf
traceroute linx.net
dotwaffle
  • 657
  • 4
  • 8
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
Ali Mezgani
  • 3,810
  • 2
  • 23
  • 36
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.

Jimsmithkka
  • 570
  • 4
  • 13
-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
Josh Budde
  • 2,378
  • 14
  • 7
  • 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 09 '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 09 '09 at 21:50