Server Fault is a question and answer site for system and network administrators. 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 set up a static IP for my Ubuntu Server, but after doing so, I can not connect to the Internet on that computer. The site works fine, but if I remove the static IP, I cannot use the port forwarding I have configured with my router.

My static IP uses the following information (Linksys):


My router forwards Port 80 requests to this server. Is there any way to access the Internet on this computer and simultaneously serve my site?

Thank you.

share|improve this question

closed as off topic by Shane Madden, 3dinfluence, EEAA, pauska, John Gardeniers Dec 12 '11 at 1:11

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I am confused. How does your server face the Internet? Is it dual NIC? Is it one NIC, and the gateway faces the Internet and forwards traffic? – tacos_tacos_tacos Dec 12 '11 at 0:42
So the Ubuntu server works fine when it was on DHCP? – Rilindo Dec 12 '11 at 0:48
up vote 3 down vote accepted

This should probably be on SuperUser but it sounds like you need to setup dns resolution on it to me. If the site works then it's talking to the internet it probably just can't resolve any dns names.

Try adding this to your /etc/resolv.conf


The reason you have to do this is b/c previously your server was getting it's dns settings from the DHCP server. But if you set it up statically then you'll have to manually configure dns as well.

One alternative is to setup a static DHCP assignment for your server if your router allows that.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.