0

I have a CentOS 6 web server. My ISP gave me one public IP/mask/gateway/DNS.

I entered these parameters on my Windows laptop where I get internet. I can ping outside and etc. Then I entered these parameters on my web server, which doesn't see internet, and can't ping (as I can't ping it from outside too). The firewall is off.

How can I connect it to the internet with a public IP? Should I write additional routes?

3
  • 1
    You disconnected your laptop right? You can't have the same same IP on two boxes. Run ifconfig and route -n. Did the ip get set properly? Can you ping the default gateway? Can you run a traceroute to 8.8.8.8?
    – Zoredache
    Commented Mar 14, 2012 at 0:23
  • 1
    Sometimes the ISP hardware (DSL or cable modem) will lock to the first mac address it sees until it is power cycled. Have you tried turning it off and back on again? Commented Mar 14, 2012 at 2:06
  • Yes, of course, I disconnected Laptop. It was connected just for testing. IP configuration is goog fof sure. Strange, but I can't ping neither Gateway nor DNS. No route to host...
    – ARTI
    Commented Mar 14, 2012 at 9:07

2 Answers 2

0

It does sound like you may be missing your default gateway. Try a 'route add default gw ' to manually specify a gateway.

0

I found out what the problem was. I added my physical NIC in the server, my eth0 became wan and eth1 became lan.

I tried all my settings with the LAN interface which didn't have access to the outside. Thanks everyone for the help.

You must log in to answer this question.