How do I set up a web server out of my home? [closed]
I want to run a web server from home, so my family, and clients can see what I am doing. It would not run a large load, at most 2 or 3 users at a time.
I would like to know how to do it with a Windows machine running IIS.
I have a router from my cable company and it runs through a wireless router to the machine I would want to be a web server.
Here are the basic steps. The specific details depend on what kind of router you have, but the concepts still apply:
Install IIS on the machine you want to be a web server. It is okay to leave it on the standard port 80 in most cases (we'll remap the port later through the firewall since most ISPs disallow incoming traffic on port 80).
Go to DynDns.org and create yourself a name which maps to your home IP address. This is important because your address will change from time to time (the "D" in DHCP) and you want to have a well-known external name to your home. Using DynDNS is pretty easy and they have good FAQs to help you. If your router supports DynDns automatically, then you will need to log onto your router and supply the dyndns.org username and password. If your router does not support DynDNS, they have a small utility that you should download and install on your IIS machine that runs all the time and detects when your public IP address changes and updates your dyndns host record.
Logon to your router (typically a website located at 192.168.0.1, or whatever the first IP address of your IP range is). Set a fixed IP address for your IIS machine. Typically this is accomplished by assigning a fixed DHCP address to the MAC address of your IIS machine. Once you do that, your IIS machine will always fetch the same IP address when it requests one via DHCP
Logon to your router. Add a "port mapping" (or sometimes called a "static route"), mapping public TCP port 8080 incoming to the IP address of your local IIS computer on port 80 (the default port). Note that some routers don't allow you change ports (often time, that's the "static route" option). In that case, you're going to want to reconfigure IIS to listen on port 8080 (or whatever port you want to make public) and just create a route from public TCP port 8080 to port 8080 on your IIS computer.
Obviously, there are several places where this can be misconfigured and troubleshooting is inevitable.
Verify that IIS is working on your local network. Fire up your favorite browser and navigate to the local IP address and port of your IIS computer: http://192.168.0.5:80, or whatever is appropriate. Make sure it works. If not, fix it until it does.
Verify that your DynDNS record is correctly mapping to your current public IP address. You can figure out your current public IP address by going to http://whatismyipaddress.com. Once you know that, open a command prompt and ping your public name ("ping longhorn213.homeip.net" or whatever name DynDNS gave you) and see if it works. The ping itself may be blocked (many routers block incoming pings), but you should still see the IP address that was looked-up. Make sure it matched your actual public address. If not, work with DynDNS org to get this working.
If troubleshooting steps 1 and 2 are both working, then the problem is likely to be in the port mapping of your router. That's the hardest to troubleshoot usually. Often times routers have internal logs that you can turn on. Look for incoming traffic logs for the designated port and see what the router is doing with it. You may need to find a forum or support site for your specific router to get this working if you have problems.
Many ISPs won't allow incoming traffic on port 80, so you might have to run on a nonstandard port. In either case, you can configure your router to forward traffic on port 80 (or whatever you use) to your server computer. Your server will need a static IP address on your LAN (rather than a DHCP assigned address).
If your ISP provides you with a dynamic IP, you'll probably want to use Dynamic DNS. Many routers have DynDns support built in.