Remote Connection Guide


Port Forwarding


You may have seen the term “port forwarding” quite a bit if you have ever tried to set up remote connection or any other web service on your computer. Port forwarding is an essential piece of the remote connection puzzle and it needs to be set up correctly in your environment in order for you to be able to connect from outside your local network.


Understanding Ports


Ports, in a nutshell, are how computers determine which service will respond to certain requests. This is best explained with an example rather than technical talk, so consider this:
A web server often does more than respond to web browsers, they typically handle sending and receiving email as well. But how does the server know if the request it receives is for a web page or an email? It knows by the port which the traffic is requesting a connection to. Take a look at this chart of a few common ports:


















Common Ports
Port NumberService
80HTTP (web server)
20 & 21FTP
25SMTP (email server)
110POP server

So when you type http://www.pcmech.com into your browser, you are sending a request to the PC Mech server on port 80, thus handled by the web server. Conversely if you were to send an email to the same server, the request would be on port 25 and handled by the SMTP server.


The point of this explanation is so you understand that when you are connecting to your computer remotely, your computer is acting as a server. Additionally, the remote connection client you are using is sending a request to your computer on a specific port. The process works exactly the same as our web and email server example above. This said, here are the default port numbers for the methods explained in this article:












Remote Connection Ports
Port NumberService
3389Windows Terminal Services (TS)
5900Virtual Network Computing (VNC)

Now, let’s put this information to use for setting up remote connection.


Configuring Port Forwarding


You probably have a router on your home computer network, either in the form of a device you bought (Linksys, Netgear and D-Link are common brands) or a DSL/Cable Modem. Most of these devices act as a firewall to filter and protect you from “garbage” traffic. So when we try to remote connect to our computer through VNC (port 5900), this request hits our router and, by default, is perceived as garbage and discarded because we do not have our router configured to accept this request. In order to remedy this, we have to “open” the port and then forward it to the computer we want to handle the request. This process is called port forwarding.


Before we set up our router, we need to get the local IP of the machine you want to remote connect to. We need this so we can tell your router which local computer will handle the remote connection request. The way we find this information depends on your operating system:















Finding Your Local IP
WindowsLinuxMac


  1. Open a command prompt (Start > Run > cmd).

  2. Run the command “ipconfig”.

  3. Note the value for IP Address.


  1. Open a command prompt.

  2. Run the command “ifconfig eth0″ (eth0 is the default).

  3. Note the value for inet addr.


  1. Open System Preferences.

  2. Under Internet and Network, click Network.

  3. Note your IP Address.

Windows IP settings


Linux IP settings


Max OSX IP settings


Finally, we need to configure the router to forward a port request. This is done on our router’s configuration page. In my article I will be using a Linksys router, so understand your screens may look different. Check your router documentation or the manufacturer’s website for more information.














Setting Up Port Forwarding
ScreenshotDescription
Router port forwarding setupOpen a browser and type local the IP of your router (your router’s IP is the same as your gateway). This is most likely either 192.168.0.1 or 192.168.1.1.
Log in to your router. If you do not know the login information, it should be in your router’s manual.
Go the the port configuration section. For my router it is under Applications & Gaming > Port Range Forward.
Now do the following:

  1. Add the respective port range to your configuration.

  2. Set the protocol to either both or TCP (some routers may not even ask for this).

  3. Enter your computer’s local IP (the value you wrote down earlier).

  4. Enable / Save the new forwarding configuration.

  5. Reboot your router if needed.

Once you have completed the above, your local environment should be properly configured and you are now all set for remote connection!

Pages: 1 2 3 4 5 6

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

  • Pingback: PC Daily Tips » More On Making Use Of Old Laptops

  • http://banwatt Harjit Banwatt

    Great artical only one thing wrong can’t see any of the images.

  • trent

    Great job. Keep up the good work.
    It this also included in your book on “build your own network”?
    Thanx

  • William

    Another remote access tool to take a look at is I’m InTouch – http://www.imintouch.net – that costs about half the price of GoToMyPC. It also has a neat feature of letting you access your outlook email and transfer files from almost any mobile phone.

  • http://www.msn.com Mayank jolly

    how to make a remote desktop connection in linux?

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: