unable to assign external static IP ( /etc/init.d/networking restart hangs )

1

I'm trying assign a static IP for my web server. I purchased a static IP from my isp, and the isp entered DNS, subnet, and static IP settings in my linksys Wireless-G broadband router. I was able to assign a local ip address of 192.168.1.2, but when I try to assign an externally visible IP address 24.xxx.xxx.202 by editing /etc/network/interfaces/ and the running sudo /etc/init.d/networking restart the script hangs. I have also tried sudo ifconfig eth0 down followed by sudo ifconfig eth0 up and sudo service networking restart

port forwarding enabled for xxx.xxx.xxx.202 - 204 on router (I purchased several static IPs)

picture of /etc/network/interfaces

picture of router setup

shupru

Posted 2013-10-15T21:28:10.617

Reputation: 107

Answers

0

To my (limited) knowledge, static IP is between your router and your ISP. So your external connection (in this case your router) is what will receive that static IP.

From your router to the web server sitting behind the router, that is for your router to decide what to do.

Possible solution:

Leave the internal IP for your WebServer, and use your router PortForward to forward Port 80 (or 443 for https) to your webserver internal IP. So when you type in http://24.xxx.xxx.202, your router will know it should be sent to your webserver, and will present the page your webserver have.

Darius

Posted 2013-10-15T21:28:10.617

Reputation: 4 817

That worked! I was confused because my network topology has changed. I used to have my old server directly connected to the modem, and hence the old machine had an external IP. Thank you! – shupru – 2013-10-15T21:58:18.553