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
nat stands for network address translation and this is a service that is used in routers and its purpose is to translate a set of IP addresses to another set of IP addresses and the reason for having the nat service is to help preserve the limited amount of IP version for public IP addresses that we have available around the world when the IP version 4 address was created engineers didn't realize how big the internet will become because even though there were over 4 billion IP version 4 addresses available the engineers thought that that would be enough but obviously they were wrong so in order to prevent a shortage of public IP version 4 addresses engineers developed private IP addresses and network address translation now there are two different types of IP version 4 addresses there's public and there is private public IP addresses are publicly registered on the Internet you have to have a public IP address if you want to go on the internet and there are approximately 4 billi...
Comments
Post a Comment