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'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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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 Oct 15 '13 at 21:58

Your Answer

 
discard

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

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