FiveM: Open Ports on Windows
To run a FiveM server on Windows you need to open some ports in Windows Firewall and optionally on the VPS firewall (VirtFusion panel / UFW / iptables if using a Linux gateway).
Ports Required by FiveM
| Port | Protocol | Use |
|---|---|---|
| 30120 | TCP + UDP | Main server port (client connection) |
| 30110 | TCP | Server HTTP port (txAdmin, HTTP resources) |
| 40120 | TCP | txAdmin web interface (if enabled) |
| 22 or custom | TCP | SSH/RDP administrative access |
Port 30120 is mandatory. Others depend on configuration.
Method 1: Windows Firewall (GUI)
- Open Windows Defender Firewall with Advanced Security (wf.msc)
- Click Inbound Rules → New Rule
- Choose Port
- Select TCP, enter 30120, 30110, 40120
- Select Allow connection
- Apply to all profiles (Domain, Private, Public)
- Name: FiveM TCP
- Repeat process choosing UDP for port 30120
Method 2: PowerShell (recommended)
Much faster. Run PowerShell as Administrator:
# FiveM main port TCP
New-NetFirewallRule -DisplayName "FiveM 30120 TCP" `
-Direction Inbound -Protocol TCP -LocalPort 30120 `
-Action Allow -Profile Any
# FiveM main port UDP
New-NetFirewallRule -DisplayName "FiveM 30120 UDP" `
-Direction Inbound -Protocol UDP -LocalPort 30120 `
-Action Allow -Profile Any
# FiveM HTTP server
New-NetFirewallRule -DisplayName "FiveM 30110 TCP" `
-Direction Inbound -Protocol TCP -LocalPort 30110 `
-Action Allow -Profile Any
# txAdmin
New-NetFirewallRule -DisplayName "FiveM txAdmin 40120 TCP" `
-Direction Inbound -Protocol TCP -LocalPort 40120 `
-Action Allow -Profile Any
Verify rules were created:
Get-NetFirewallRule -DisplayName "FiveM*" | Select-Object DisplayName, Enabled, Direction
Method 3: netsh (alternative)
netsh advfirewall firewall add rule name="FiveM 30120 TCP" protocol=TCP dir=in localport=30120 action=allow
netsh advfirewall firewall add rule name="FiveM 30120 UDP" protocol=UDP dir=in localport=30120 action=allow
netsh advfirewall firewall add rule name="FiveM 30110 TCP" protocol=TCP dir=in localport=30110 action=allow
netsh advfirewall firewall add rule name="FiveM txAdmin" protocol=TCP dir=in localport=40120 action=allow
Verify Ports Are Open
After starting the FiveM server, verify it's listening:
netstat -ano | findstr ":30120"
netstat -ano | findstr ":30110"
Expected output:
TCP 0.0.0.0:30120 0.0.0.0:0 LISTENING 1234
UDP 0.0.0.0:30120 *:* 1234
VPS Firewall (panel / UFW)
If your VPS has network-level firewall (e.g. managed by VirtFusion panel or cloud firewall), you must open the same ports there.
To check from Linux (if you have access):
# UFW
ufw allow 30120/tcp
ufw allow 30120/udp
ufw allow 30110/tcp
ufw allow 40120/tcp
# iptables
iptables -A INPUT -p tcp --dport 30120 -j ACCEPT
iptables -A INPUT -p udp --dport 30120 -j ACCEPT
Port Already in Use or Conflicts
If port 30120 is already in use:
# Find process using port
netstat -ano | findstr ":30120"
# Note the PID (last number)
Get-Process -Id <PID>
# To terminate it (only if sure)
Stop-Process -Id <PID> -Force
Custom Port in server.cfg
If you want to use a port different from 30120, modify server.cfg:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
Replace 30120 with desired port and open that port in firewall instead of 30120.
Articoli correlati
Windows VPS: Performance Tweaks
Optimizations and tweaks to improve Windows Server VPS performance
Change Language to English on Windows Server
How to set English as primary language on Windows Server VPS
RDP: Access, Port, Multi-User and Issues
Complete guide to Remote Desktop on Windows Server - connection, port change, multiple simultaneous users and troubleshooting
