0

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.

nmagerko
  • 189
  • 1
  • 1
  • 7

1 Answers1

3

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.

3dinfluence
  • 12,409
  • 2
  • 27
  • 41