FiveM Port Forwarding: Open Port 30120 (TCP and UDP)
Which ports a FiveM server needs, how to open 30120 in Windows Firewall and your router, fix "Could not bind on 0.0.0.0:30120" and test the server.
A FiveM server needs port 30120 open for both TCP and UDP. If friends cannot join your home-hosted server, the cause is almost always a missing router forward, a firewall rule for only one protocol, or the fact that your server is simply not reachable from outside your network.
What errors point to a port problem?
On the server console, when something else already holds the port:
Could not bind on 0.0.0.0:30120
The text after it varies by version. On the player side you typically get a connection timeout instead; see FiveM connection timed out (curl 28). Those are two different problems: the first is about your machine, the second about the path between players and your machine.
Which ports does a FiveM server use?
| Port | Protocol | Purpose | Expose it? |
|---|---|---|---|
| 30120 | TCP and UDP | Game server (default from endpoint_add_tcp / endpoint_add_udp) | Yes |
| 40120 | TCP | txAdmin web panel (default) | No |
The 30120 lines come from the official setup docs. The txAdmin port is txAdmin's default; check the port shown in your txAdmin startup output. Do not forward 40120 to the internet. Anyone who finds the panel can try to log in to something that controls your server. Use it locally, through a VPN or an SSH tunnel.
How do I fix "Could not bind on 0.0.0.0:30120"?
Something already uses the port, usually a second copy of FXServer that did not close. Find it, then stop it.
- Close the old server window and check Task Manager for leftover
FXServer.exe. - Find the owner of the port with the first command below.
- Stop the process by its PID with the second command, or use a different port.
netstat -ano | findstr :30120
taskkill /PID 12345 /F
Replace 12345 with the last column of the netstat output. On Linux use ss -tulpn | grep 30120 and then kill <pid>. If the process is not FXServer, do not kill it blindly; move your server to another port by editing both endpoint lines in server.cfg:
endpoint_add_tcp "0.0.0.0:30121"
endpoint_add_udp "0.0.0.0:30121"
Both lines must use the same port. If you use a second port, open that one instead of 30120.
How do I open port 30120 in Windows Firewall?
Open an elevated Command Prompt on the server machine and add one rule per protocol:
netsh advfirewall firewall add rule name="FiveM TCP 30120" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FiveM UDP 30120" dir=in action=allow protocol=UDP localport=30120
The same can be done in Windows Defender Firewall with Advanced Security under Inbound Rules. On a VPS also check the provider's own firewall or security group; it is separate from the one inside Windows or Linux. On Linux with ufw: ufw allow 30120/tcp and ufw allow 30120/udp.
How do I port forward FiveM on my home router?
- Give the server PC a fixed local IP (static lease in the router, for example 192.168.1.50).
- Open the router's admin page and find "Port forwarding" or "Virtual server".
- Create a rule for TCP and UDP, external port 30120, internal port 30120, target the PC's local IP.
- Save and, if needed, reboot the router.
- Make sure the Windows Firewall rules above exist.
Menu names differ per brand. If the forward looks right but nothing arrives, your provider may use CGNAT (carrier-grade NAT), so your router has no real public IP. A sign is that the WAN IP shown in the router differs from what a "what is my IP" site reports. That is a general networking fact, not FiveM specific. In that case ask the provider for a public IP, or rent a server instead. See FiveM hosting.
Why do friends see my local server as private or cannot connect?
If you connect with a local address such as 192.168.x.x, that address only works inside your own network. Friends need your public IP and the forwarded port. Also, connecting to your own public IP from inside the same network sometimes fails because the router does not support NAT loopback (hairpin). Test from the same PC with 127.0.0.1:30120 or the local IP, and ask a friend or use mobile data for the outside check.
Dynamic home IPs change, so a join link or a hostname service is more reliable than sharing numbers. Once the server is in the public list, the FiveM IP Finder shows the endpoint the client really gets, and how to find a FiveM server IP explains proxies.
How do I test that the port is open?
Open this in a browser on a different network (phone on mobile data works):
http://YOUR_PUBLIC_IP:30120/info.json
If the server is reachable it returns JSON with server information. If the page times out, the TCP path is blocked. This tests TCP only. UDP cannot be tested in a browser, so if info.json works but players still time out, check the UDP forward and firewall rule again. A public home server that is not in the list may be a different issue; see server not showing in the server list.
What changes with FiveM Enhanced?
Per the server commands reference, FiveM for GTAV Enhanced supports only one endpoint. Keep one TCP and one UDP line on the same port and forward that one. The docs I checked list no other Enhanced-specific port rules. Background: FiveM Legacy vs Enhanced.
Opening a port makes your machine reachable from the internet. If you run a public server from home, protection against attacks is limited. Read FiveM DDoS protection first.
What usually doesn't help
- Disabling Windows Firewall completely (community-reported quick test that people forget to undo; add rules instead).
- Forwarding only TCP, or only UDP.
- Forwarding 40120 "just in case".
- Reinstalling the server when the log says the port is in use.
If nothing works
Post on forum.cfx.re with: the exact console output, the endpoint_add_* lines from your server.cfg, the result of netstat -ano | findstr :30120, your OS, whether the server is at home or on a VPS, and whether info.json works from inside and from outside your network. Remove your public IP from screenshots.
Last checked: 30 August 2026
Frequently asked questions
What port does FiveM use?
30120, TCP and UDP, by default.
Do I need to forward 40120 for txAdmin?
No. Keep the txAdmin panel private.
How do I check if port 30120 is open?
Visit http://YOUR_PUBLIC_IP:30120/info.json from another network. For the full picture also check the UDP rule.
Why can I join my server but my friends cannot?
You are probably using a local or loopback address. Friends need the public IP and a working port forward.
Can I change the FiveM server port?
Yes. Change both endpoint_add_tcp and endpoint_add_udp to the same new port and open that port.
FiveM.tools was founded with sponsorship from Nyru.