Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Mar 14 '12 at 11:55

This question came from our site for system and network administrators.

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 – Zoredache Mar 14 '12 at 0:23
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? – Jeff Ferland Mar 14 '12 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 Mar 14 '12 at 9:07

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

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.