Beta preview — heading toward 1.0. Issues?
Game Hosting

Open FiveM ports in Windows Firewall (by command)

Open your FiveM server ports on Windows with one netsh command — 30120 (TCP and UDP) for the game and 40120 (TCP) for txAdmin.

Jun 23, 20263 min di letturafivemfirewallwindowsportsnetshtxadmin

A FiveM server on Windows needs its ports opened in the Firewall so players can connect. By default it uses 30120 for the game and 40120 for the txAdmin web panel.

Which ports FiveM needs

  • 30120 TCP + UDP — main game port (player connections and heartbeat).
  • 40120 TCP — txAdmin web interface (UDP is not needed here).

1. Open Command Prompt as administrator

Press Start, type cmd, right-click and choose Run as administrator. It also works in PowerShell.

2. Add the rules with netsh

Copy and run these three commands:

netsh advfirewall firewall add rule name="FiveM 30120 TCP" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FiveM 30120 UDP" dir=in action=allow protocol=UDP localport=30120
netsh advfirewall firewall add rule name="FiveM 40120 TCP" dir=in action=allow protocol=TCP localport=40120

Each command should print Ok.

Delete a rule (optional)

netsh advfirewall firewall delete rule name="FiveM 30120 TCP"
If FiveM runs on a VPS or behind a router/NAT, open or forward the same ports there too. On a dedicated server with a public IP, Windows Firewall alone is enough.

Questo articolo ti è stato utile?

Sii il primo a valutarlo

Utilizziamo i cookie

Utilizziamo i cookie per migliorare la tua esperienza, analizzare il traffico del sito e personalizzare i contenuti. Puoi scegliere quali cookie accettare.