Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 serverfault.com Mar 14 '12 at 11:55

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

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 Mar 14 '12 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? –  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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.