Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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):

Address: 192.168.1.200
Mask: 255.255.255.0
Gateway: 192.168.1.1

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

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 professional 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.

1 Answer

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

nameserver 192.168.1.1

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

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