Port forwarding, a protocol most non tech people have no concept or understanding of, but by its creation it stands as one of the most simple, and crucial, parts of how networking works. To be honest what exactly is port forwarding? And what is a port?
Ports
One day you decide to get on the internet, visit an FTP site, download some pictures from facebook, and read a few emails. Theoretically these things kind of.... just happen right? It's always been that way hasn't it? You've always gotten online and just had things do what you thought the were designed to do. And this is where ports come in, computers recognize ports as where and how certain protocol work and respond. For example port 80, as shown in the image on the left says "OPEN!" and "http". Which in short means that is where HTTP, or hyper text transfer protocol runs. AKA the internet. And further down there is port 443, which once again is open but says HTTPS, a secure version of HTTP. Together protocol and ports begin to mesh together quite seemlessly.
Each port has an assigned protocol within the first 1,023 ports, every single port under this has a purpose, is designed, and universally known to do its job. Port 80 is the internet, port 25 is simple mail transfer protocol (SMTP for short), port 7 is for ICMP (Ping or Echo Request). Whenever a program wants to run over the internet and requires certain network applications to run, locally or non, ports make this all happen. I'm pretty sure I'm not the only one who had World of Warcraft blocked by their firewalls port security and had to make changes, but everything runs over ports.
Ok that all sounds a bit complicated doesn't it? Let's use a visual effect to simplify this real quick. Let's look at this as more of an Automat, a singular location that tons of services can be obtained by accessing the correct port. To really bring this visual home lets give this Automat a name, we'll call it Goblin Goodies. If you stroll into Goblin Goodies, you can go 3 rows down and get some Roasted Pork Buns, and row 4 you can get some good old fashion Mac 'n Cheese.
A firewall and a router on a network know a little bit of information about these ports, the firewall knows which port is open and which is closed, it can tell us that port 2 New York Grilled cheese is closed due to some form of vulnerability or just something they don't provide. Where as the Router can tell us where to get our food from, port 3 doesn't just fill itself, it has to has all its information sent over to a food service provider, and from that point forward all Roasted Pork Buns come from David Chu's Chinese Bistro, all requests are sent there, and all requests are filled by them.
This really is the same format as how a network itself works, a server hosting a website on port 80 will have all incoming traffic requests for port 80 sent over to that server. The two devices establish a connection and the request resolves a web page. All services function this way, FTP can be forwarded to the appropriate FTP server, HTTPS traffic forwarded to the proper HTTPS server, so on and so forth. Now the only thing we need to cover next would be what is a DMZ, or a Demilitarized Zone, which before we put any port forwarding into effect we'll want to set one of these up. We'll save that for tomorrow, as this information can get overloading at times.
DMZ and Dynamic Port information will be explained at a later date. And as always, be safe my goblins.
Hi,
ReplyDeleteThis is one of the best blogs that I've found so far, so, thank you for those posts!.. Now, I was wondering:
Which command did you use to see all ports forwards on that command prompt?
Command prompt being Windows, the command you're looking for is "netstat" but more likely "netstat -aob"
Deletenetstat alone will show you local address and foreign address. -aob will display all connections and listening ports, display the owning process ID associated with each connection, as well as displays the executable involved in creating each connection or listening port.
Good question and thanks for you words of encouragement :-)