Jump to content
xisto Community
mist1405241549

Port Forwarding For Webservers Running a Webserver On a Router

Recommended Posts

Hi guys, I' back again and this tutorial is about port forwarding. I am going to gear it towards users who want to run a webserver on their computer but cannot, simply because their router is blocking the http port (usually 80). Before we begin, let me give you some background. Usually, when you connect to the internet directly through a modem, a user would just have to visit your ip address (assigned by your isp) to visit your server. However, when you are running on a router, there are a few things to take into consideration. The router gives private LAN (local area network) ip addresses to each computer running on it. This essentially means that external users would not be able to access individual ports on private ip addresses. However, there is a way to go around this. Usually called port-forwarding or "tunnelling," the method I will explain below essentially forwards external users who are on a specific port to a private ip address within the network. For those of you who have no clue what I am talking about, think of it this way: Imagine your LAN is a building with multiple people each with individual extensions. If people within the building wanted to reach each other, they would just have to call their extension. If someone externally called the phone-number (without any extensions), they would reach the switchboard (router) and would not be able to reach a person who is in that building. However, if the switchboard is configured to redirect all calls to a specific extension, people are able to externally access a specific person. This is a basic example of what we will be doing.

 

Lets Begin:

First you need to login to your router.

Posted ImagePosted Image

Ideally, you should know the address to connect to and the username and password. If you are not sure of the address, Go to Start->Run and type in cmd. Once a command prompt comes up, type in ipconfig. The number appearing beside IP Address is your local private address. To find out the address of your router, remove the last two digits of this number.

Posted Image

Please note that this only works if you are connected to a simple one router network. More routers will complicate matters as you will need to enable double-port forwarding.

Once you are logged in to your router, find a section for port-forwarding, tunnelling or virtual servers.

Create a new setting.

Posted Image

Name: Not very important, not applicable to all routers.

Private IP: The Private LAN IP you have been assigned by your router. To find this, use the same method as above (Run->Cmd->Ipconfig) but use the whole number.

Private/Public Ports Usually, these are the same. For most people, the port listed here would either be 80 for http, 25 for smtp and 21 for ftp. There are exceptions; for example many ISPs block port 25 (for alleged spamming reasons) which is the default SMTP port. Some opt to change this use an intermediary server to reflect sent mail from your server on a different port. In this case, your private port would be 25 but you public would be something else.

Schedule: The times you want the port-forwarding to be enabled. Not applicable to all routers.

There you have it, some routers require a reset, but after that external visitors can visit your webserver!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.