FiveM Port 30120: Port Forwarding and Firewall Guide
Open the correct FiveM TCP and UDP port, match server.cfg and Windows Firewall, keep txAdmin private, and fix a server that friends cannot reach.
The short answer
A default FiveM server listens on port 30120 over both TCP and UDP. Point both router rules at the server’s reserved local IPv4, allow both protocols through the host firewall, and test from another network while FXServer is running; do not expose txAdmin just to let players connect. If CGNAT or an inaccessible router blocks you, only a VPN with a real inbound port for both TCP and UDP can solve it.
FiveM ports at a glance
The official FiveM sample configuration binds the same port number on two protocols. Treat TCP and UDP as separate paths even though both say 30120.
| Purpose | Default | Protocol | Public rule? |
|---|---|---|---|
| FiveM player/server endpoint | 30120 | TCP + UDP | Yes, to the FXServer host |
| txAdmin web interface | Often 40120 | TCP | No, not for player connections |
30120 and 40120 do different jobs
Players connect to the FXServer endpoint. The txAdmin port opens an administrative web panel, can be changed, and should stay private unless you deliberately secure remote administration. Opening it does not fix a missing FiveM server.
Build a matching FiveM configuration
Enter the reserved local IPv4 of the server and the port you want FiveM to use. The generator runs only in your browser.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"Name: FiveM Server
External port: 30120
Internal port: 30120
Protocol: TCP + UDP (or two rules)
Target IP: 192.168.1.50New-NetFirewallRule -DisplayName "FiveM TCP 30120" -Direction Inbound -Protocol TCP -LocalPort 30120 -Action Allow -Profile Private
New-NetFirewallRule -DisplayName "FiveM UDP 30120" -Direction Inbound -Protocol UDP -LocalPort 30120 -Action Allow -Profile PrivateFriends connect with connect PUBLIC-IP:30120. The 0.0.0.0 in server.cfg is a listening address, not an address to give players.
How to port forward a FiveM server
- 1
Test on the LAN first
Start FXServer and connect from another device using LOCAL-IP:PORT. If this fails, fix the server, configuration, or host firewall before touching the router.
- 2
Reserve the host address
Use a DHCP reservation in the router. A changing local IPv4 is why many working rules fail after a reboot.
- 3
Match both endpoint lines
Keep endpoint_add_tcp and endpoint_add_udp on the same port. Restart FXServer after a change and check whether TXHOST_FXS_PORT overrides the file.
- 4
Create the router rules
Send the public TCP and UDP port to the same port on the reserved server address. Use two rules when the router has no Both option.
- 5
Allow inbound traffic on the host
Allow FXServer or add narrow TCP and UDP inbound rules. You normally do not need broad outbound rules or a disabled firewall.
- 6
Test from another internet connection
Keep FXServer running and use FiveM Direct Connect from outside your Wi-Fi. A same-LAN public-IP test can fail when the router lacks NAT loopback.
Test the right layer
1. Local listener
On the host, open http://127.0.0.1:30120/info.json. Failure means FXServer is not serving the expected TCP port.
2. LAN path
From another home device, try http://192.168.1.50:30120/info.json and a FiveM connection. This isolates the host firewall.
3. Public TCP path
From outside, try http://PUBLIC-IP:30120/info.json. Success confirms TCP only; it does not prove UDP is open.
4. Real FiveM join
From an external connection, run connect PUBLIC-IP:30120. This is the final TCP-and-UDP proof.
When a port-forwarding VPN is the practical fallback
First ask the ISP for a public IPv4 if your router WAN address is behind CGNAT. If that is unavailable—or you cannot control the router—a VPN can provide the inbound path. It must forward the same port number over both TCP and UDP and permit server hosting. A normal VPN with no inbound forwarding will not help, and a VPN may add latency.
Verify the exact mapping before paying
Proton VPN's current manual setup documents one assigned public port for both TCP and UDP; set both FiveM endpoint lines to that assigned number and update them after the port changes. PureVPN's paid add-on is the simpler choice when you want to select 30120, subject to its current supported locations and add-on terms. NordVPN is excluded because it does not support port forwarding, and PIA is excluded because its public guide does not clearly confirm the same assigned port for both FiveM protocols.
Proton VPN
Some links on this page are affiliate links, meaning we may earn a commission at no extra cost to you. This helps keep NAT Checker free, but it doesn't affect what we recommend.
Lower-cost FiveM relay for programmers and server administrators
FRP fits FiveM because FXServer needs a public TCP and UDP endpoint on the same port. Run frps on a small public server, run frpc on the FiveM host or another LAN Linux machine, and relay both protocols on 30120 to FXServer. A small server may cost less over time than a complete VPN subscription, but you must configure Linux, cloud and host firewalls, frps, frpc, access protection, monitoring, bandwidth, and security updates. It is not suitable for ordinary beginners.
Home PC, VPS, or managed host?
| Where FXServer runs | What you configure | What not to do |
|---|---|---|
| Home PC | Router NAT + host firewall + server.cfg | Do not target the gaming PC if another machine hosts FXServer |
| VPS or cloud VM | Cloud firewall/security group + operating-system firewall | Do not look for a home-router forwarding page |
| Managed FiveM host | Use the IP and port assigned in its control panel | Do not assume the host assigned 30120 |
Run FXServer on a VPS or cloud VM
Allow the selected TCP and UDP endpoint in both the cloud firewall and the operating-system firewall, keep the two server.cfg endpoint lines aligned, then test the VM public address directly.
Use the endpoint assigned by a managed host
Copy the IP and port from the hosting control panel, change server.cfg only when the provider permits it, and verify the assigned endpoint with FiveM Direct Connect.
FiveM port forwarding not working
No local info.json and no LAN join
FXServer is stopped, bound to a different port, or blocked locally. Check the startup log, server.cfg, and TXHOST_FXS_PORT.
LAN works but public info.json fails
Recheck the TCP router rule, target address, Windows profile, upstream ISP gateway, and CGNAT.
Public info.json works but players time out
TCP works; UDP may still be missing. Add or correct the UDP rule and test with a real external FiveM client.
Direct Connect works but the server is not listed
Reachability works. Check server-list configuration, server version, and listing requirements rather than adding ports.
It stopped after a reboot
The server probably received a new local IPv4. Reserve the address and update both router rules.
Public IP fails only from inside the LAN
This can be a NAT-loopback limitation. Use the local IP at home and test the public address from mobile data.
Safer FiveM hosting
- Open only the game endpoint you actually use; do not place the whole server PC in DMZ.
- Keep FXServer, artifacts, resources, and the host operating system updated.
- Keep txAdmin on the LAN or behind a properly secured private-access method.
- Use strong admin credentials and remove router and firewall rules when the server is retired.
Related diagnostics
FiveM port FAQ
What is the default FiveM port?
The default FiveM server endpoint is 30120. The official sample server.cfg binds both TCP and UDP to 0.0.0.0:30120.
Does FiveM use TCP or UDP port 30120?
Both. Create matching TCP and UDP paths unless your router offers one rule with the protocol set to Both.
Is txAdmin port 40120 the FiveM game port?
No. txAdmin's web panel is separate from the player endpoint. Its port can vary, and it should stay private unless you intentionally secure remote administration.
Can I change the FiveM port from 30120?
Yes. Change both endpoint_add_tcp and endpoint_add_udp, restart FXServer, and make the router and firewall use the new number. Friends must connect to that public port.
Why is FiveM port forwarding not working?
The usual causes are a server that is not listening, a changed local IP, a missing protocol, a host firewall rule, Double NAT, or CGNAT. Test from the server outward in that order.
Do I port forward a FiveM server on a VPS?
Usually no home-router rule is involved. Allow the port in the VPS operating-system firewall and the provider's network firewall or security group.
Can I host FiveM through a VPN?
Yes only if the VPN forwards an inbound port over both TCP and UDP. Configure FiveM to listen on the assigned public port when the provider does not let you choose 30120.
Official references
Port and configuration claims above are based on current Cfx.re, Microsoft, and standards documentation.