Introducing HTN Panel - turn your Windows PC or VPS into a game hosting setup.

Explore HTN Panel
HTNetwork Logo
How to Port Forward a FiveM™ Server

How to Port Forward a FiveM™ Server

4/16/2026By Tom Pearce

If you are hosting a FiveM™ server from your own PC or home network, you will usually need to port forward port 30120 so players outside your network can connect.

For FiveM, the main port you need is:

  • 30120 TCP
  • 30120 UDP

This guide walks you through opening the port in Windows Firewall, forwarding it on your router, and checking that it works properly.


Step 1: Allow Port 30120 Through Windows Firewall

Before touching your router, make sure Windows is not blocking the connection.

Create an inbound rule for TCP

  1. Open Windows Defender Firewall with Advanced Security
  2. Click Inbound Rules
  3. Click New Rule
  4. Select Port
  5. Choose TCP
  6. Enter 30120
  7. Click Next
  8. Select Allow the connection
  9. Apply it to all profiles
  10. Name it something like FiveM TCP 30120

Create an inbound rule for UDP

Repeat the same steps again, but choose:

  • UDP
  • Port 30120

Name it something like FiveM UDP 30120.

Create outbound rules too

To avoid issues, repeat the process under Outbound Rules for both:

  • TCP 30120
  • UDP 30120

This makes sure Windows Firewall is not blocking your FiveM server traffic in either direction.


Step 2: Port Forward 30120 on Your Router

Once Windows Firewall is configured, you need to forward the same port on your router.

  1. Open your router admin page in your browser
  2. Common addresses are:
    • 192.168.0.1
    • 192.168.1.1
  3. Log in with your router username and password
  4. Find the section called one of the following:
    • Port Forwarding
    • NAT
    • Virtual Servers
    • Gaming
    • Firewall
  5. Create a new rule using these details:
    • Port: 30120
    • Protocol: TCP/UDP or create one rule for TCP and one for UDP
    • Local IP / Internal IP: your PC’s local IP address
    • Description: something like FiveM Server
  6. Save and apply the rule

Step 3: Find Your Local IP Address

Your router needs to know which device to send the traffic to.

To find your PC’s local IP address:

  1. Press Windows Key + R
  2. Type cmd
  3. Press Enter
  4. Type ipconfig
  5. Find IPv4 Address

It will usually look something like:

192.168.0.50

Use that as the local IP in your router’s port forwarding settings.


Step 4: Set a Static Local IP

If your PC’s local IP changes later, your port forwarding may stop working.

To avoid that, it is a good idea to either:

  • set a static IP on your PC, or
  • reserve the IP in your router’s DHCP settings

This keeps your FiveM server pointing to the correct machine.


Step 5: Check If the Port Is Open

After setting everything up:

  1. Start your FiveM server
  2. Use a port checking tool such as:
    • portchecker.co
    • canyouseeme.org
  3. Then test port 30120

Your server usually needs to be running while you test, otherwise the port may appear closed even if the setup is correct.


Common Problems

Port still looks closed

Make sure:

  • your FiveM server is actually running
  • Windows Firewall rules were created for both TCP and UDP
  • your router is forwarding to the correct local IP
  • you are not using an antivirus, VPN, or security tool blocking the connection

Players still cannot join

Check:

  • your public IP is correct
  • your server is using port 30120
  • no other app is already using that port
  • your ISP is not blocking incoming ports

Server worked before but stopped later

This often means your PC’s local IP changed.

Set a static local IP or DHCP reservation and update the router rule if needed.


Do You Always Need Port Forwarding?

Not always.

If you are self-hosting from home, yes, you usually do.

If you are using a hosted server, VPS, or managed game hosting, port forwarding on your home router is normally not needed because the server already has a public network setup.


Final Notes

To port forward a FiveM™ server properly, make sure you:

  • allow 30120 TCP and 30120 UDP in Windows Firewall
  • forward 30120 on your router
  • point the rule to the correct local IP
  • test it while the server is running

Once that is done, players outside your network should be able to connect to your server normally.