Port Forwarding – How to set it up

Port Forwarding is used to allow external devices (PlayStation network for example) to connect to your internal devices (PS4). With port forwarding, we can tell the router where to forward the packets that are meant for your PS4 for example.

By default, our firewall will block all incoming traffic, which is good. Otherwise, a hacker could gain easily access to your network. By opening and forwarding specific ports in your firewall you can safely run a web server or FTP server on your computer or host or join an online game.

What is Port Forwarding

With port forwarding, you can make a computer or other network device (the security camera for example) accessible from the internet. You only allow specific traffic (that comes through a port number) to travel into your network to the network device (or computer). This is commonly used for security camera’s, gaming, hosting a (web)server or making you NAS accessible from the internet.

Let say we have the network below. The router/modem has a built-in firewall. Let’s say we want to host a game on our PlayStation for example. Our friends need to be able to connect to our PlayStation for that.

Port Forwarding Example

By default, the firewall in the router will block all unknown incoming traffic. If our friends try to join our game, a package is sent through port 3074. But our firewall has no idea who needs that, so it will drop the package.

Port Forwarding rule

By setup a port forwarding rule in our router, we can tell the router to forward all data package that is sent through port 3074 to forward it to our game console. The PlayStation will handle the data further.

Port forwarding

Making multiple devices accessible

Every network device in your network has it’s own IP Address. But to connect to the internet all devices share one public IP Address (in the examples above it’s 85.84.83.82) that is supplied by your ISP. Now every application uses there own port number, for example, webservers are accessible over port 80 and an Unifi Security Camera can be accessed over port 7080.

With Port Forwarding we can forward every port to the correct network device. So we can send the traffic for our website that comes in over port 80 to our server that is listing on port 80 and the traffic for the PlayStation to the console itself.

Advanced port forwarding

Now let’s say you have two Unifi security camera’s that you want to access directly from over the internet. Both camera only responds to a request over port 7080. So internally you can access camera 1 on Ip Address 192.168.0.100:7080 and camera 2 on 192.168.0.120:7080.

To access the camera from the internet you would need to connect to your public Ip Address, for example, 85.84.83.82 followed by the port number: http://85.84.83.82:7080. But if you forward this port to both camera’s it wouldn’t work.

With most routers, you can change the destination port, so this allows you to make camera 1 accessible on http://85.84.83.82:7081 and camera 2 on http://85.84.83.82:7082. In the forwarding rule, you would forward the traffic to another port number, simply 7080.

How to setup Port Forwarding

Now setting up Port Forwarding might seem complicated, but it really isn’t. We are going to give the computer, network device or game console to which you want to forward the port to a static Ip Address, next we are going to login into the router and forward the port to the network device. Sounds simple right?

Setting up a static Ip Address

By default, most network devices get an Ip Address from the DHCP server. This server is built-in your router and assigns the internal network devices an Ip Address. But when you turn the device off and on again it might get another Ip Address. This way you port forwarding will only work until you turn it off.

To setup a static Ip Address you will need to go to the network settings page of your device. Change the Ip Address settings (or IPv4) from automatic DHCP mode to manual. Next, you will need to specify an Ip Address. You can look up the DHCP scope in your router to see which range is used by the router. Or you can try to find an Ip Address that is not used, most of the time setting IP which ends with a number between the 200 and 250 is pretty safe.

Log into your router

Next, we need to login to the router. To find your router you can lookup the gateway address on your computer.

  • Press Windows Key + R
  • In the run dialogue type cmd and press enter
  • Type ipconfig and press enter
  • Note Ip Address on the line Default gateway
  • Enter that Ip Address in your browser

Now you need to login to your router. If you didn’t change the password and don’t know it, you can try some of the following common combinations. If none works, then look it up in the manual or on Google:

  • admin / admin
  • admin / password
  • admin / <blank>

Setting up the Port Forwarding

Ones logged in to your router you will need to find the port forwarding section. Now it depends on your router brand where you can find this, but the most common places are:

  • Advanced and then Port Forwarding
  • Applications and Gaming
  • Advanced and then virtual server
  • Firewall and then Port Forwarding

When you found the correct page on your router you will add a new forwarding rule. Below is a screenshot of the Edge Router X (my personal favourite). Most routers will have a similar layout, you enter the Original port, this is the port number as listed by the application, then you required protocol, when in doubt, just set it to both.

The forward-to address or Ip Address is the network device you want to give access, in this case, the Ip Address of the PlayStation and the internal port number (which you can leave the same as the original in general)

Edge Router X

If you need to open multiple ports you can, depending on your router, open a range, by entering 3074-3080 or multiple by separating them with a comma (3074,3075 etc). If your router doesn’t support it, then you will have to create multiple forwarding rules.

Port Forwarding Test

When you created the port forwarding rules you will need to test it to see if the settings are correct. One way is to just simply open the application and check if you can gain access. If that isn’t possible you can use one of the many online port forwarding checkers.

A good one is for example Canyouseeme.org. With this tool, you can test if your port forwarding rules are set up successfully.

Port Forwarding for PS4

To setup port forwarding for PS4, we first need to give it a static Ip Address. Because otherwise, it will get a new Ip address every time you turn the PS4 off and on, braking the forwarding rules.

To give the PS4 a static address you will need to do the following:

  1. From the Main menu open the settings
  2. Select Network
  3. Select Set up Internet Connection
  4. Depending on how you connected the PS4, choose Wifi or Lan Cable
  5. Choose Custom
  6. In the screen Ip Address Settings, choose Manual
  7. Select the IP Address, press X
  8. Change the last part of the IP Address to another number, let’s say 205.
    So you Ip address may look like 192.168.0.205
  9. You can leave Subnet Mask, Gateway and DNS as they where.
  10. Click Next
  11. Leave the MTU on Automatic
  12. Select Do Not Use for the Proxy Server
  13. And finally select Test Internet Connection

The PS4 should be able to connect to the internet. So we can now set up the port forwarding rules in our router. Login to your router and go to your Port Forwarding page.

We need to forward the following ports to our PS4:

  • TCP: 80, 443, 3478, 3479, 3480
  • UDP: 3478, 3479

Now depending on your router, you need to create the following rules forwarding rules:

If your router doesn’t support a range (3478-3480), then you will need to create multiple rules for each port number. On some routers, you don’t need to or can’t enter the Forward-to port. That isn’t necessary, by default the port forwarding rule will use the same port number.

Conclusion

As you can see setting up port forwarding rules isn’t really difficult. Al you need to do is give your internal device a static Ip Address and forward the correct port numbers to the new Ip Address.

If you have devices that require the same port number you can use different ones on the external side and map the correct port number internally.

Always make sure you open only the required port number for the device, otherwise, you will make your network vulnerable for hackers. If you have any questions, just drop a comment below.

Get more stuff like this

IT, Office365, Smart Home, PowerShell and Blogging Tips

I hate spam to, so you can unsubscribe at any time.

4 thoughts on “Port Forwarding – How to set it up”

  1. Hi Rudy
    I am a novice so bare with me. my network router at home is a Linksys EA9500. I wish to access my devices from anywhere. The steps to do this were fairly straight forward after setting up my host account with NOIP. However, port forwarding has got me stumped. Your tutorial is amazing and I get the process but the piece of the puzzle that is missing for me is how to you come to the point of choosing a port number to tag to your internal IP device. Is it a random choice that gets created when you choose it? is it a pre-defined range of numbers that are set within the confines of the internet? if you could clarify where the numbers come from, it would very helpful.
    Thanks in advance

    • Hi Simon,

      The internal numbers are defined by the application or device that you use. So for example, for your router, you can access the configuration page by going to http://192.168.1.1. Webpages are served over port 80 by default. So if you want to access your router from the internet you have to forward an external port (and yes external that can be any number) to port 80 internal.

      So external could by: :8080 and internal :80.

      Got it?

  2. Thank you so much Author for such great Info on the topic. However I am still confused to use which services to get this feature while paying LOL 2 and Pubg. Someone recommended me to use pure vpn as they provide the same feature. While I have seen other Providers too like Express. SO Do you guys recommend the same?

    • A VPN isn’t required to set up port forwarding. It might only make it easier for you. But are you running in any trouble while playing those games? In general, you don’t need to open any ports to play a game. Only if you are hosting a game your self for your friends. Forwarding ports won’t lower your latency.

      For LOL 2 you will need to forward the following ports:
      TCP: 2099,5222-5223,8088,8393-8400
      UDP: 5000-5500,8088

      And for Pubg on a pc:

      TCP: 27015-27030,27036-27037
      UDP: 4380,27000-27031,27036

Leave a Comment