When you’re getting online, generally it’s pretty plug and play. You have your modem and router, you’ve set up your wireless network, and within minutes, you’re browsing the web, watching videos online, and checking up on your friends and loved ones on social media. Connecting your laptop or desktop to the computer is pretty easy, but what happens when you throw other devices into the mix? You guessed it — things can get a little complicated.

If you plan on gaming or running your own web server, you won’t be able to just plug and play. Instead, you’ll have to configure your own custom settings to make sure all devices connect to the internet. One step you will have to take is setting up port forwarding. With so many news stories about hacking and cybercrimes, it’s not a bad idea to be overly cautious when setting up your network. So, this leads into our question: What is port forwarding and is it safe?

What is port forwarding?

If you’ve ever been online, you probably know what an IP address is. If not, in short, an IP address is a set of numbers assigned to any device that goes online. This IP address is used for sending and receiving data. Since there are different types of data, like game information or email, ports are used to tell your computer where this data needs to go. For example, ports tell your emails to go into your Outlook inbox.

Think of ports as a type of sorting system. When a data packet comes through your computer, your computer will analyze the file to determine what port it needs to be sent to so you will be able to access the data.

There are fixed ports for things like email, as well as ports that can be used with plug and play devices. However, if you have a private network, things get a little bit confusing, and this is where port forwarding comes into play.

Port forwarding and private networks

Let’s look at an example. Say you play an online multiplayer game, and you want to connect with other users. You may receive requests from other users, but your computer isn’t sure of where the game server is so it ignores the requests. This is where you would use port forwarding. You would simply designate the correct port for this application, and your computer would know that this is where to send such requests and would continue to do so in the future without any additional manual changes needed from you.

If you need to set up port forwarding, you can do this through your router’s settings. Simply type your IP address into your browser search to access, input your password, and navigate to the Port Forwarding menu. From here, you are able to set up your port forwarding.

Is port forwarding safe?

Port forwarding does introduce risk. By default, your router's NAT firewall blocks all unsolicited inbound connections. When you add a port forwarding rule, you are deliberately opening a hole in that firewall so that traffic on a specific port can reach an internal device. If the service running on that port has a vulnerability — or if you forward to the wrong device — an attacker can exploit it directly.

To minimize risk:

  • Only forward ports you actually need. Delete rules when you no longer use them.
  • Use non-standard external port numbers where possible to reduce automated scanning hits.
  • Keep the software behind the forwarded port patched and up to date.
  • Consider a VPN as an alternative to port forwarding for remote access — it is more secure because authentication happens before the service is reachable.
  • Use your router’s firewall logs to monitor for unexpected connection attempts.

Sources