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 want to run a server on my machine so that anyone in the Internet may connect to it. But my Broadband internet provider issues the same WAN ip to all the customers while each of them has a different LAN ip. How can I run a server then?

share|improve this question

migrated from stackoverflow.com May 22 '11 at 15:18

This question came from our site for professional and enthusiast programmers.

    
That's no programming question. Maybe you have more luck when asking this on superuser. As far as I can tell there will be no way to solve this. –  sra May 22 '11 at 14:34
add comment

4 Answers

You mention LAN IP, so I'm assuming you have a router or switch in between your PCs and the WAN. In order to setup a single server, for example web server, to be identified as the sole system for WAN facing services you can either:

  1. Set the system as the DMZ machine, which means that the server is default place for all non routed requests to go to
  2. Use port forwarding

How to go about it depends on what type of router/switch you are using.

share|improve this answer
add comment

I take it you mean that you have a 'private' IP assigned to you by your broadband ISP (which you see allocated on your Server network interface). Meanwhile, if you try to identify your external IP, its different (which you refer as your WAN IP).

Setting up a server that can receive incoming connections from the Internet requires things like NAT provided from your ISP.

Simply put, someone on the Internet would try to connect to your 'WAN' IP on some port number (say 8081/tcp), and this NAT on the ISP would convert that to your 'private' IP and port 80/tcp (say).

However, if you really want to run a server on such a network, your ISP usually would provide you with a static public IP address rather than the private IP you are seeing now. You will need to talk with him on this and get your subscription modified likewise.

Usually, broadband ISPs give out public IP allocations which might change each time you reconnect. That is an easier thing to handle since you can then get a domain registered and use things like OpenDNS to make your server easily accessible on the Internet.

share|improve this answer
add comment

Configure port forwarding at your broadband-router.

              .--------.
[PC 1]--------+        |
              |        |
[PC 2]--------+ router +---- DSL/cable
...           :        :
[PC n]--------+        |
              '--------'         

(Assuming the computers are connected to the typical built-in switch-ports of a typical consumer broadband router, which provides NAT and internal DHCP service)

The router's WAN (i.e. Internet) IP address is used externally for all PC 1, PC 2 ... (i.e. NAT applies)

If PC 2 is the "server" and has DHCP reservation 192.168.1.2, configure port forwarding at the router so that Internet traffic for port 80 is forwarded to port 80 at 192.168.1.2

share|improve this answer
add comment

I'm assuming that you are on a standard home internet connection. If this is a business grade question it may be bit different because of how your ISP handles your WAN IP.

Most likely, your WAN IP is actually dynamic. For instance, right now my WAN IP may be 66.65.64.63. In another hour my WAN IP may be reset to a new IP within my ISPs range, so it may change to 66.65.64.62.

The other answers to this question are perfectly correct, in that you will need to set up some port forwarding. Port forwarding will tell your router (the device that passes your internet connection to various connected devices) to send everything on port x (80?) to a specific LAN IP. To handle the changing IP provided by your ISP, however, you will also need to use a dynamic dns service like dyndns. This service will install a client on your server, and do a check every few minutes to see if your WAN IP has changed.

dyndns is easily the most popular service to handle this kind of thing, but there are many more free options.

share|improve this answer
add comment

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.