Some people may not know what port forwarding is but it can be very useful knowledge to have these days. If you have a router at home this will likely come in handy at some point in time. A router works by routing the internet/network connection to all of your computers and devices. Everything is simple as all the requests are made internally and the router sends the information to the computer that requests it and, if all is well, everyone is happy. Later, you decide to set up a security camera system, a DVR, host a website, or all of the above from home or office. You go to www.WhatIsMyIP.com and make note of your IP then while you are out you try to connect and it fails. All internal testing went well but outside the network nothing seems to work. In fact, one of the more common questions we receive involve port forwarding in some way. If you are in this position then this information could prove useful to get you remotely connected to your DVR, camera system, or any internally hosted server or service.
What Is Port Forwarding
A simple analogy is comparing your network to a phone system where the main phone line is like the IP address. Ports are like phone extensions. If you call the main line without telling the operator (router) which extension you want, your call will go nowhere. The router has rules to send your request on particular ports to a certain host (defined by you), which is similar to defining your phone extension. Servers listen for incoming connections on certain ports but without telling your router where to send these connections they will never arrive. Port forwarding sets up your router to correctly redirect external inbound service requests to the correct internal computer on your network. Setting up a router to port forward can be accomplished in a few steps. While every router brand has a different web interface that you access to accomplish these steps, the below information should get you pointed to the general area.
Do you think this is a pain? Believe it or not, your router is doing you a favor by acting as a firewall preventing inbound requests from getting to any of your devices. So with not ports set to forward, the router is another layer of protection
How To Port Forward
First thing to do is locate the IP address of your router. Most of the time it is either 192.168.0.1 or 192.168.1.1. However, if you want to figure out the IP, here’s how:
In Windows you will need to load up a command prompt and enter ipconfig and you will see something similar to the image below.
What you are looking for is the “Default Gateway.” My router IP is 192.168.1.1. You should also do this on the computer that is the server and make note of what the IP address is. You can see that my internal IP is 192.168.1.105.
If you don’t use Windows you will use the command netstat -nr for Mac and the command route in Linux.
Once you get the default gateway you need to enter it in to your web browser address bar as seen below.
Once you enter the address and hit enter you will be brought to a login screen or prompt. You will need the user name and password for your router.
Some common router default user names and passwords are:
Linksys – Use admin for both user name and password.
Netgear – Use admin for user name and password for the password.
Once you are in to the router it depends on the manufacturer’s portal as to where you will find the port forwarding settings. In Linksys you will click on “Applications and Gaming” as seen below. However in some routers you may have to go in to the “Advanced” settings. Once you get to the “Port Forwarding” section you will either have a list(shown below with some examples from a Linksys router) or a section to add a new port forwarding rule. You will need the IP of the computer running your server(found earlier with the necessary command: ipconfig, netstat -nr, or route) and know what port the server is using. The examples below are actual ports that were needed to forward for certain games and servers to function correctly. After you are finished adding your entries make sure enable your forwarding and save your settings.
Your server should now be able to receive incoming connections through your router. If you are still experiencing problems it would be recommended that you re-check your settings on the router and check your Firewall settings on your server/computer.
If you’ve still got questions, please post them in our Port Forwarding Forum