SecureMeeting
Published in

SecureMeeting

How to Port Forward

Photo by NASA on Unsplash

The internet is a collection of computers, known as servers, that communicate with each other to bring us the internet that we know and love. When we play games, connect to websites, or use applications we are telling our computer to connect to a server and perform a task, whether it’s to load a website or tell your character in a game to move. If you’re reading this article you want to set up one of these servers on a computer in your home and allow devices on the internet to connect to it. This article will describe what port forwarding is, and how to do it on your home router.

Your Home Network

Basic home network(Image credit: Author)

Your home network is comprised of a router that is connected to the internet by an Internet Service Provider(ISP). Your router has an IP address that is public to the entire internet. When you visit a website, the site identifies you via this IP address and uses this IP to communicate back to you. This IP address is known as the public IP address of your network. In your home network, you then connect your devices such as your laptops, phones, game consoles, etc. to the router to connect them to the internet. The router then assigns each of these devices their very own IP address known as the private IP address. The private IP addresses are used to identify the device within your home network, but cannot be directly accessed by the public internet. When one of the devices on your home network wants to communicate with the internet, the router replaces the private IP address with its public IP address for outgoing traffic and replaces the public address with the specific private IP address for all incoming traffic. This mapping of IP addressed is called Network Address Translation (NAT).

What is Port Forwarding and why do we need it?

Port forwarding is telling your router how to redirect traffic going to your router to a specific device connected to the router. It does this by forwarding traffic that the router receives from the internet to a specific private IP address on your home network. Thus, port forwarding enables you to make a device connected to your private network available to access from the internet. This is important if you’re hosting a server on your computer and want other people to be able to connect. A popular example is a video game called Minecraft. Minecraft has a downloadable file that when run, starts up a server on port 25565 but players will be unable to connect from outside the home network unless you port forward.

How to Port Forward?

1)Login to the router

To port forward you need to login to the router on your network. This can be done with any device that is connected to the internet to your home router. Go on any web browser and type in “192.168.1.1”. When you make this search it will bring up a page where you will be prompted to log in with a password located on the back of the router. This page will look different depending on your ISP, for my example, I am using Verizon.

2)Navigate to Port forwarding

Once you successfully log in, you will be greeted with a page that has settings for your router. We want to navigate to the settings for port forwarding. Since I am using Verizon this setting is under “advanced”, then Firewall, and then I get the option for port forwarding.

3)Find the private IP of your computer

Windows:

To find your private IP on a Windows system, open up the command prompt. To do that on Windows, type ‘cmd’ in the search box (next to the Start button on the taskbar), and you should see the relevant command prompt app pop up in the suggested results. Click on it. When the terminal opens up type in the following command and hit enter.

ipconfig

This will return a lot of information, but the specific IP address you are looking for is the “IPv4 Address”. This is the address you need to copy or write down for port forwarding.

Mac:

To find your private IP on a Mac system, click on the Apple logo, head to ‘System Preferences, then click on ‘Network’. Now select the network you are actively connected to (with the green light showing, marked as ‘Connected’), and look under ‘Status’, on the right. Here you will see a message like the one below. This is the address you need to copy or write down for port forwarding.

Wi-Fi is connected to <router name here> and has the IP address 192.168.1.206.

4)Port forward

Now that you have your computer’s private IP address and know the port, you are ready to port forward. To do this navigate to the part on the page that allows you to create a “rule”. Here you will enter a name for the application, the port you want to forward in both the input labeled “original port” and “forward to port”, and the address to forward to. The address you want to forward to is the private address of the computer that the server is hosted on that we found in step 3. In my example, I am port forwarding for a Minecraft server on port 25565 to my computer’s private IP address. Once you input this information simply click “add to list”, then “Apply Changes”.

5)All Done!

Just like that computers all over the internet can connect to your server running on your home network! They would do this by requesting your public IP at the port you port forwarded. You can find your public IP at IP Chicken. Now your friends can connect to your Minecraft server or you can host your website on your own machine.

SecureMeeting

SecureMeeting is on a mission is to advance human rights and freedom of speech. We do this by designing, developing and deploying planetary-scale, privacy-preserving communications architectures for all of mankind.

We are a US 501(c)(3) non-profit.

Send us a note, we’d love to hear from you: hello@securemeeting.org

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bryan Kyritz

Bryan Kyritz

I build defi projects that enable humanity to live their lives like an adventure.