Setting Up Port Forwarding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello again as you know I am Eli the computer guy over here for Eli the computer guy comm and today's class is setting up port forwarding so port forwarding is a very important tool it is a very necessary tool if you are going to be running servers on your network that are going to be accessed from the outside world that is the important part if the servers are going to be accessed from the outside world you need to set up port forwarding what port forwarding does is within the router it forwards traffic on certain ports to specific servers so if you have a web server on your internal network and you want it to be accessed from the outside world you would configure your router to Ford port 80 to that particular server so if you have an email server if you have a VPN server if you have a web server if you have an FTP server all of those different networking services use specific ports and port forwarding is forwarding those ports to specific servers on the network now it's very important to understand that with one router and one IP address you can only forward a single port to a single internal IP address what this means is that if you have one web server on your internal network you would for forward port 80 to that one web server if you have two web servers on the network you would have to come up with some other scheme in order to transfer traffic between those two servers so when your forwarding ports you can only forward it to one computer so with that let's go over the white board just so I can explain to you how all this works and then I can give a demonstration on my computer so basically when we are dealing with port forwarding you know we have the Internet so we have the internet and we have you connected to the Internet now you have a router or modem that is connected to your internet connection and below that you have all of your different servers so let's say you have a server here that is your web server ww server that's port 80 well as you know you will have an external IP address for your internet connection so let's say your external IP address is I don't know 203 50 5.66 dot for that is your external IP address what you are going to do to set up port forwarding is within the router you are going to forward port 80 to this internal IP address for this web server so let's say this web server is one ninety two dot one sixty eight dot one dot ten what you're going to do is you're going to forward port 80 to the IP address 192.168.1.1 what that is going to do is if somebody is coming into your network from the internet so they're in a computer and they're sitting out in Paris or Bangladesh or somewhere else what they are going to do is they are going to use the IP address 203 50 5.66 dot for when they plug that into their web browser that is going to direct them to your external IP address which will put them into your router your router is going to see that they're on port 80 and will then forward to your web server now since I know some of you guys are new you may not understand where that IP address comes from but that is basically DNS resolution so on their computer they're going to type in cnn.com or whatever your domain name is that will resolve to your external IP address that means using the web browser they're going to come in they will get automatically redirected this one server this server will provide them the website and will go back out that way if you have an FTP server the same thing will happen what is it port 25 they come in it'll get routed to the FTP server and then they'll be able to connect that way that is the importance of what port forwarding is so remember every single networking protocol uses its own port FTP uses a specific port web HTTP uses a specific port VPN services use specific ports sip voice over IP traffic uses specific ports so depending on what networking protocol you use you will forward that particular port to whatever server on your network provides a service so that's the point of why you do port forwarding so let's go over the computer so I can show you a little bit about this so basically let me let me come back to me basically what we've got here is we just have a normal small business router here so this is the old standard router I used to sell all my clients it was a Linksys business class router I don't know if they still sell them anymore essentially what would happen is this would connect to your internet modem and this provided all the services for your network is provided DHCP and DNS and all that it also did the pork forwarding so this would connect to the modem all the internet traffic would come in to this from the outside world and then using port forwarding this would then redirect the traffic to whatever particular server that traffic needed to go to so let's go onto my Windows 7 computer so I can show you how this works so being that this is a small business router you manage it through a normal web browser so I'm going to be using Google Chrome in order to connect to this particular router to manage it you're going to be using Linksys Netgear d-link any of that kind of stuff you're going to be using a web browser to manage it now in order to know what IP address we need we're going to have to go and see what the default gateway for this computer is so DHCP is turned on so this computer automatically picked up an IP address from this router so all we're going to do is we're going to type in ipconfig to see what the IP information is now you're going to see here that the I the default gateway is 10.1 10 one that means the routers IP address is 10.1 10.1 so we're going to use that IP address in order to get into the router so we come back here to Google Chrome and all we do is go 10.1 10.1 all you do is you plug in that IP address and hit enter and then you're going to be asked for a username and password so I know with this particular bottle what the username and password is and I can log in so now I am in side this particular Linksys router now it's very important to understand all of these routers are slightly different so basically what I'm trying to show you here is the concepts that are required in order to do port forwarding your specific router may be a little bit different and you may have to do a little bit of troubleshooting to figure out how to make it work now the one thing I want to show you to make sure you don't get confused is be careful about port management so since we're doing port forwarding you're going to be thinking that you want to mess with port management right because we're dealing with ports well whenever you're talking about the router and you're talking about port management on these small business routers normally they have a switch built-in right well when they're talking about port management many times they're actually talking about these specific ports they're not talking about the networking ports so if you see port management and you click on port management and then you have no idea what they're talking about that may be what's going on so if we go here and we click on port management we will see the port ID so so 1 2 3 4 DMZ Internet these are the physical ports on the computer and these are not what we're messing with right now what we're going to do is we want to go to port forwarding for this particular router we go to setup and then we go over and we can see forwarding so we're looking for forwarding port forwarding or forwarding so we can click on this and this is what allows us to do forwarding so this particular router still has some of the configurations left back from when I had my computer repair shop so these configurations were for a VPN server that no longer exists basically as I said before what we're doing is we're forwarding specific ports to a specific IP address so my old server used to be 10.1 10.2 so what we can see here is that point-to-point tunneling protocol TCP port 17 23 is forwarded to 10.1 10 to tip SEC UDP 500 is forwarded to 10.1 10.2 and layer 2 tunneling protocol 1701 is forwarded again to 10.1 10.2 so this shows you what the current forwarding is so many times they will have services already pre-configured for you so you can say what services you want to go to what computer so let's say we want to set up an FTP server so port 21 them so all I have to do is click on FTP port 21 and then I tell it what IP address to forward the the network traffic to so I can say forward FTP traffic TCP port 21 - 10.1 10.20 now depending on your router they may have this little checkbox that says enable if you don't check that even though you put in the configuration it's not going to be enabled and then that's going to be worthless so always make sure you actually do enable what you're plugging in and now all you do is you add to list once you've added to list you go down you save the settings always make sure you save the settings so that puts that into your router and now it is set so now we have FTP TCP port 21 goes to 10.1 10.20 so if we had the File Transfer Protocol network communication coming in and we had a server a 10.1 dot 10.20 all of that network traffic with you routed there so basically whenever you could use one of these routers they're going to have a lot of pre-configured networking protocols in here but since there's always new networking protocols and since there's thousands and thousands and thousands of possible ports to be sometimes you have to add your own pork so you will always have an option such as service management so here what we can do is we can click on this and we can add a service so I can just say I want to create a service named Test I want to use protocol TCP and I want the port rank to be 69 so be 69 to 69 all we have to do is we then add to list and when we do save settings so that has now saved that new service so now that this is updated if we scroll down we can see that the new service test port 69 is there so I can do I want to go test and I wanted to go to 10.1 10.20 I want to enable and I want to add to list then all we do is we go down we save settings and now that test protocol will be automatically sent to 10.1 10.20 so that is all there is to port forwarding so the big question that comes up then is is if your do dealing with servers that deal with ports that are not normally used the question is will alight how do I know what ports to forward to the server you always look at the documentation so small business server Microsoft small business server if you go and look at the documentation for setting it up it will tell you what 8 to 10 ports you should forward to that particular server to make it work if you are installing a digital surveillance server they use a lot of different protocols of ports also so all you do is you look at the manual you see what ports have to be forwarded to the server and then you just configure it that way you will always have the option of either TCP or UDP frankly if in doubt go with TCP it's almost always TCP but again within the documentation it will tell you whether it's TCP or UDP this is one thing unless you know it you don't know it again sometimes you can assume this TCP but as always just look in the the manual and they'll be able to tell you or do a Google search so the important thing to understand with all these different networking protocols is one router can route different ports to different servers so this could route a hundred different ports to a hundred different servers but you can't route a single port to multiple servers so I could have port 80 going to one server and port 21 for FTP going to another server but I could not have two servers that would both pick up port 80 you can do some things with fancy routing and and load balancing and all that kind of stuff but that's a whole different issue so if you're gonna be trying to run a game server out of your house if you're going to try to run a voiceover IP server writers house you're going to try to run a web server out of your house what you're going to be doing is you're going to be doing this port forwarding and that is what will make it work the one warning that I will give you if you're looking at setting up a server inside your house is do remember if you have residential Internet service whether it's cable internet or fiber optic internet or DSL sometimes they close ports and simply do not allow you to use them so be careful that that's one reason why I say you should always use business class Internet service because they always leave all the ports open but if you are using residential service sometimes they close the ports so even if you do port forwarding it's still not going to work for you but that is the basics of how port forwarding works if you're going to be setting up a server inside your house again remember what I showed you here is basically what it looks like depending on what particular router you're using you may have different configuration screens and so on it may look a little bit different you may have to play with it a little bit the big warning though is especially since you guys are new guy newbies sometimes when it's talking about ports it's talking about these physical ports back here and these are things you don't want to mess with you want to mess with the port forwarding itself so if you want to modify this in your router connect your computer to the router pull that DHCP IP address find what the default gateway is I'd simply go into the command prompt and type in ipconfig once you have that default gateway then what you're going to do is you're going to use a web browser to go to that IP address going to log in you're going to find the port forwarding you're going to find the ports either pre-configured or you're going to create them you're going to point them at the IP address you need to point them at you're going to make sure it's enabled and then you're going to save save save save save save save again a new person error that happens a lot is they forget to hit the Save button and so that actually does not get written written into the configuration file and then it doesn't work and they rip out their hair and it's all bad and that's really all you have to do so as you know I'm Eli the computer guy this was setting up port forwarding I enjoy taking this class and look forward to seeing at the next one
Info
Channel: Eli the Computer Guy
Views: 910,673
Rating: undefined out of 5
Keywords: Eli, the, Computer, Guy, port forwarding, port forward
Id: dmQnJRXbzEk
Channel Id: undefined
Length: 16min 29sec (989 seconds)
Published: Fri Feb 01 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.