Skip to main content

Port Forwarding Explained

what is port forwarding now maybe you've heard about it but you weren't exactly sure what it was or how it works so basically port forwarding allows computers over the Internet to connect to a specific computer or service within a private network it's basically making your computer accessible over the Internet even though you're behind a router so for example let's say a friend of yours at their home wants to remotely control your computer at your home using a service such as remote desktop connection now remote desktop connection is a service built into Microsoft Windows that enables you to connect to another computer running Microsoft Windows and then once you're connected to the remote computer you can use that computers programs and files just as if you were sitting in front of it so now your friend is ready to connect to your computer so we starts up the remote desktop connection and sends the request to your public IP address with a specific port number now a port is not a physical connection but it's a logical connection that is used by programs and services to exchange information ports uniquely identify these programs and services that are running on a computer and in this case remote desktop connection uses port 3389 so the request with the port number will make its way through the Internet to your router and once it reaches your router your router needs to know where to forward the request for port 3389 because without any port forwarding configured your friend will not be able to connect to your computer because your router does not know what to do with this request so this is where port forwarding comes in so now we're going to tell our router to send or forward any requests that come in with port 3389 and send the request to our computer here so to do this we're going to log in to our routers configuration page by typing in the routers internal IP address using a web browser so if you're not sure what your router is internal private IP address is you just open up a command prompt on a Windows computer and type in ipconfig and press enter and the default gateway is the internal IP address of your router and it's also important to know what your computer's IP address is which is right here because we're going to be entering that IP address in the port forwarding configuration page so in a web browser we enter the IP address of the router and now we are in the routers configuration page now depending upon what router you're using the configuration page will be different depending on which brand of router you are using I'm using a Cisco Linksys router in this example so whatever type of router you're using the layout is going to be a little different but basically you need to go to the port forwarding section to configure port forwarding so here on a port forwarding configuration page we can just enter a name for our application and we can just call it remote desktop and then we have to forward the remote desktop connection port to the computer so you type in the remote desktop port number which happens to be 3389 and then you have to point it to the IP address of the computer that you want your friend to access which is 192.168.1.2 and then we can just save our settings and now we're done so now when your friend sends a request with port 3389 the router knows where to forward that request to and now the connection is complete so if you're still confused about ports let's use an illustration to explain what a port is and how it works so here we have a phone with an electronic switchboard that would typically be used in a company so when someone wants to make a call to this company and let's say they wanted to talk to the sales department within this company they would dial the company's phone number along with the extension of the sales department so when the call comes in the phone will answer the call and then the phone will look at the extension number and send or forward the call to the corresponding department number so let's say another person calls the company and they wanted to talk to the support department so the call comes in and is received by the phone now the phone number has done its job which is to send the call to the specific company from the outside but once the call is received using the phone number the phone number is no longer needed because it's done its job so the only thing that is needed now is the extension so now the phone will forward the call to the support department because of the matching extension number now this works very similar in a network so in a network the router is contacted with an IP address along with a port number so now the router will look at the port number and send or forward the request to the internal IP address that the port has been configured to so again another request from the internet comes into the network and reaches the router so the IP address has done its job which was to bring the request to the router from the internet so the IP address is no longer needed because it has already done its job so now the router will look at the port number and based on its port forwarding configuration it will now forward the request to the computer with the IP address that the port number has been configured to so in a network the IP address is similar to a phone number and the port number is similar to an extension the router represents the phone and the computers within that network represents different departments ports are always associated with an IP address and they are identified by a unique number so regardless if you see the port number or not a port number is always associated with an IP address because an IP address always has a purpose and it uses the port number to determine what the purpose is whether it's pulling up a web page using an FTP service or using remote desktop it always has a purpose that's determined by the port number because not only are ports associated with an IP address but they are also always associated with an application or process such as FTP web pages email and so on the port numbers range from zero to sixty five five thirty five but of the 65,000 there's a few of these that are most common and that are used on a daily basis for example such as port 80 which is used for web pages there's also ports 20 and port 21 which are used for File Transfer Protocol or FTP or port 443 which is used for bringing up secure web pages but these are just a few in fact there is a privileged category of ports that are called the well-known ports which ranges from port 0 to port 10:23

Comments

Popular posts from this blog

Printers Explained - Laser, Inkjet, Thermal, & Dot Matrix

hello everyone in this article we're going to talk about different types of printers now printers allow the ability to print copies of documents or photos onto paper from a computer now there are several different types of printers but the most common types that are used in homes and businesses are inkjet and laser printers and there are also a couple of less common printers such as thermal printers and dot matrix printers which we'll talk about later so let's first talk about inkjet printers now inkjet printers are the most common printers that are used in homes they are affordable and they produce photo quality results and they are enough to suit the needs of a typical home user now an inkjet printer works by the printhead moving back and forth across the paper during printing and during this process the printhead places ink on the paper in very tiny dots in fact these dots are so tiny that they are smaller in diameter than a human hair and as these dots are precisely pla

VLAN Explained

VLAN stands for virtual local area network a VLAN is a local area network where the computers servers and other network devices are logically connected regardless of their physical location so even if these devices are scattered in different places it wouldn't matter because a VLAN can logically group them into separate virtual networks and the purpose of a VLAN is for improved security traffic management and to make a network simpler so as an example let's say you have a three-story office building and in this building you have computers that belong to certain departments that are mixed in with computers that belong to other departments on the same floor so the red computers represents the accounting department the blue computers represent the shipping department and the green computers represent the support department now as you can see all these computers from these different departments are all connected to a switch so they are all on one segment on a local area network or

TCP vs UDP Comparison

whenever a computer wants to communicate with another computer the communication between those two computers needs to be good and reliable so we can guarantee that the data is received correctly for example when you want to view a webpage or download a file or look at an email you'd expect to view the webpage intact and in order with nothing missing or if you're downloading a file you would want the entire file and not just a part of the file because if data is missing or out of order then it wouldn't be of any benefit to you so this is where TCP comes in TCP stands for transmission control protocol and this is one of the main protocols used in a tcp/ip network and TCP is what is used to guarantee that all the data is received and in order because without TCP then some of the data could be missing or out of order because if you view a web page without TCP your web page could be all messed up the images could be missing or the text could be backwards and out of order or if y