Now you need to make sure that when a request to your site comes in from the Internet, your network configuration allows the request to pass through to your web server. I'll assume you are using a router that connects to your modem, and that your web server has a connection to the router. There are two ways to allow external requests to pass through to the web server, depending on your equipment:
- Your router allows you to configure it to let a request to a specific port pass through to a specific machine identified by mac address. This essentially says, "If a request to port 80 comes in from the Internet, send it to the machine identified by this mac address." Unfortunately, a lot of home routers only let you pass such requests through to a specific IP address, such as 192.168.1.100. The problem with this is that because a router assigns IP addresses randomly, you can't be sure that your web server will always be at 192.168.1.100...it might at some point in the future be assigned 192.168.1.101, etc. If your router doesn't allow you to configure a specific mac address to handle incoming requests through a particular port, you can't configure it this way and will have to use the next configuration to get things working properly. If you can use your router to configure this, then set it up so that port 80 is forwarded to the mac address of the web server.
- Change your web server to use a static IP (internally on your own network) instead of using DHCP. This allows your server to tell the router, "Hey, I'm here at this address, not one that you assign me." To get this done on a Windows operating system, first open up a command-line and issue the following command: ipconfig -all. You should see the DNS servers you are currently using listed, so write these down because you'll need them in the following steps. After you do this, go to your network connections, right-click on the local area connection node representing the connection to the router, select Properties, select the Internet Protocol (TCP/IP) item in the list, click on the Properties button, and fill in information similar to the following (depending on how you want things configured):
- Select the "Use the following IP Address" radio button
- Fill in an IP Address of something like 192.168.1.99. I use this number as an example because it is common for routers to start assigning dynamic IP addresses starting from 192.168.1.100 upward, so setting a number below this puts it out of the range of IP addresses the router might dynamically assign to devices on your internal network.
- Fill in a subnet mask of 255.255.255.0
- Fill in a default gateway matching the IP address of your router, such as 192.168.1.1
- Fill in the "Use the following DNS server addresses" with the addresses found when you issued the ipconfig -all command (mentioned above)
Believe it or not, I've done this using Remote Desktop while talking to my server and I didn't experience any loss of network connectivity even while changing these network settings.
Be sure you don't have Windows Firewall turned on.
If you had to configure your server to use a static IP address in the second bullet-point above, you will also need to open up your router's management interface, find the section where you can configure it to allow a request to a port to pass through (often found under the "Applications and Gaming" node), and--assuming you issued the static IP address of 192.168.1.99 to the server--enter in port 80 and 192.168.1.99 for the IP address.