To make a self-hosted FiveM server reachable over the internet, forward the game endpoint’s TCP and UDP port—usually 30120—from your router to the computer running FXServer, allow the same traffic through that computer’s firewall, and test from outside your home network. The port shown in server.cfg is authoritative: if you changed it, forward that exact value instead.
Which ports does a FiveM server use?
FiveM’s player connection uses the FXServer game endpoint. In the common configuration, both protocols use port 30120:
As an Amazon Associate I earn from qualifying purchases.
| Service | Typical port | Protocol | What it does |
|---|---|---|---|
| FXServer game endpoint | 30120 | TCP and UDP | Player connections to the FiveM server |
| txAdmin web panel | 40120 by default | TCP | Administration, monitoring and setup in a browser |
| Custom game endpoint | The value in server.cfg |
TCP and UDP | The player connection when the default has been changed |
Forwarding only TCP or only UDP can produce a partial or failed connection. Create rules for both protocols unless your router offers one combined TCP/UDP rule. Do not treat port 40120 as the game port. A browser can reach txAdmin while players still cannot reach FXServer.
Recommended Free Tools
What you need before creating a rule
- Access to the router’s administrator interface and permission to change NAT or port-forwarding settings.
- The private LAN address of the computer running FXServer, such as an address assigned by your home router.
- A stable address for that computer. A DHCP reservation is usually easier to maintain than manually configuring a static address on the host.
- The endpoint values from the server’s actual
server.cfg, rather than an assumed default. - Administrator access to the host operating system so you can create firewall exceptions.
- A second internet connection for testing, such as a phone hotspot or a friend’s connection. Testing from the same LAN can give a misleading result.
Port forwarding cannot overcome an upstream network that does not provide you with an inbound-reachable public address. If your ISP uses carrier-grade NAT (CGNAT), or if an ISP gateway sits in front of your own router, you may need to change the upstream configuration or use a managed hosting option.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Step 1: Confirm the FXServer endpoint
Inspect server.cfg
Open the configuration file used by the server instance and find the endpoint declarations. Official examples bind both endpoints to all local interfaces on port 30120:
endpoint_add_udp "0.0.0.0:30120"
endpoint_add_tcp "0.0.0.0:30120"
Your file may use another port. The UDP and TCP values determine what the router and firewall must permit. Keep them aligned unless you have a specific reason to separate them.
Check the primary port setting
The netPort command also controls the primary server port. If it is present, reconcile it with the endpoint lines and use the effective value shown by FXServer when it starts. Never forward 30120 merely because it is common; forward the port the running instance is actually listening on.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRecord the values
Write down the game port, the host computer’s current private IP address, and the router’s public IP address. You will use all three while creating and testing the rule. The panel port is a separate administration setting and should not replace the game endpoint in a player’s connection command.
Step 2: Give the server computer a stable private IP
A forwarding rule targets a private address such as 192.168.x.x or 10.x.x.x. If the router later gives the server computer a different address, the rule continues pointing at the old machine and remote players fail to connect.
Use a DHCP reservation when possible
- Sign in to the router.
- Open the LAN, DHCP, Connected Devices or Address Reservation page (the label varies by firmware).
- Identify the FXServer computer by its hostname or network adapter address.
- Create a reservation for its current private IP, then save the change.
- Reconnect the computer or renew its DHCP lease and verify that it still has the reserved address.
If your router cannot reserve addresses, configure a static private address on the computer instead. Choose an address inside the LAN’s correct subnet and outside the router’s automatic DHCP pool, and copy the proper gateway and DNS values from your network configuration. An incorrect static configuration can disconnect the host even before forwarding is attempted.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Step 3: Create TCP and UDP forwarding rules
- Open the router’s Port Forwarding, NAT, Virtual Server or similarly named page.
- Create a rule for the game port. Set the external or public port to the value in
server.cfg, set the internal or private port to the same value, and select TCP. - Set the destination or server IP to the reserved private address of the FXServer computer.
- Create a second rule with the same external port, internal port and destination, but select UDP.
- If the firmware provides a combined TCP/UDP choice, one combined rule is acceptable; confirm that it really enables both protocols.
- Save or apply the configuration. Some routers require a reboot before the rule becomes active.
Use the same port externally and internally unless you intentionally need a translated port. If you do translate it, players must use the external value and the host firewall must allow the internal value; keeping them identical avoids that extra source of error.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Field | Example for the default endpoint |
|---|---|
| Service name | FiveM FXServer TCP (any descriptive label) |
| External port | 30120 |
| Internal port | 30120 |
| Destination IP | The reserved private IP of the FXServer computer |
| Protocol | TCP; create a second UDP rule unless combined forwarding is supported |
Step 4: Allow the game port through the host firewall
The router can deliver packets to the computer, but the operating-system firewall can still discard them. Add inbound permissions for the configured game port on both TCP and UDP, restricted to the network profiles and executable you actually use where your firewall supports those controls.
Windows hosts
Create inbound rules in Windows Defender Firewall with Advanced Security for the FXServer program or for the specific TCP and UDP local port. Apply the rule to the appropriate private or public profile instead of disabling the firewall entirely. If FXServer runs under a service account, make sure the rule covers that program and profile.
Linux hosts
Permit the configured TCP and UDP port in the firewall framework enabled on the system, such as the distribution’s uncomplicated firewall or firewalld configuration. Check that a broader cloud, hypervisor or container firewall is not filtering the same traffic. The exact command depends on your distribution and firewall manager; the required result is an inbound allowance for both protocols on the FXServer port.
Do not open txAdmin’s TCP 40120 to the whole internet simply because the panel loads locally. Keep administration on the private LAN or expose it only through an intentionally protected access path.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchStep 5: Start FXServer and verify what it is listening on
- Start FXServer through your normal FXServer or txAdmin launch method.
- Read the startup output and confirm that the endpoint values match the entries you inspected in
server.cfg. - Confirm that no other application is already using the selected port.
- Leave the server running while you test; a forwarding rule cannot succeed when the destination process is stopped.
A working txAdmin page only proves that the panel’s web service is available on its own port. It does not prove that the game endpoint is listening or reachable through the router.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Step 6: Test from outside your LAN
Use a different internet connection, not another device connected to the same home router. In FiveM, press F8 to open the client console and run:
connect PUBLIC_IP:30120
Replace PUBLIC_IP with the current public address of your router and replace 30120 if your server uses a different endpoint port. A local test such as localhost or the host’s private address only demonstrates local binding; it does not test NAT, the router rule, the public address or the ISP path.
Have a friend try the same direct-connect address, or disconnect a test laptop from Wi-Fi and use a mobile hotspot. Test after the server is running and after the router has applied its changes. If the direct connection succeeds, players can reach the game endpoint even if the server has not yet appeared in the public list.
Why direct connection and server-list visibility are different
Diagnose direct connection first. A successful connect PUBLIC_IP:PORT test establishes that the selected game port can reach your server. Listing involves additional server configuration and discovery behavior, so a server can accept direct connections while remaining absent from the list.
Cfx.re’s server-issues guidance warns that NAT or gateway behavior that masks UDP source ports can prevent a server from appearing in the listing. If direct connection works but listing does not, inspect the server’s listing-related configuration and the gateway topology rather than repeatedly changing the game-port rule.
Troubleshooting a failed remote connection
Friends cannot connect, and direct connect fails
- Compare the forwarding destination with the server computer’s current private IP. A changed DHCP address is a common cause.
- Verify that both TCP and UDP rules exist for the exact endpoint port shown in
server.cfg. - Check the host firewall for inbound allowances on the same port and protocols.
- Confirm that FXServer is running and listening on the expected interfaces and port.
- Check that you are using the current public IP, not the server’s private LAN address.
- Look for a second router or ISP gateway upstream. The first device receiving the public address must either forward the port to your router or operate in a mode that removes the extra NAT layer.
Cfx.re’s server-issues documentation summarizes this symptom directly: when a direct connection fails, incorrect port forwarding or a firewall blocking connections is likely.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
It works on the host or inside the house but not remotely
That result confirms only that FXServer is locally reachable. Repeat the test from a separate internet connection, then work outward from the host: confirm the listening port, firewall, router destination, router WAN address and upstream NAT. Do not use a successful localhost test as evidence that the public route is open.
txAdmin opens, but FiveM cannot join
Check that you are not forwarding or testing TCP 40120 as though it were the game endpoint. txAdmin’s default panel port is 40120, while the typical player endpoint is TCP and UDP 30120. Keep the panel’s access limited independently of the game-port rules.
Direct connect works, but the server is not listed
Leave the forwarding rule in place and investigate listing-related settings and gateway behavior. In particular, check whether an upstream NAT or gateway is masking UDP source ports. The listing symptom does not by itself prove that the game port is closed.
The server stopped working after a restart
Check whether the host received a new private address. If so, restore the DHCP reservation or static configuration, update the router target if necessary, and retest externally. Also verify that the server did not revert to a different server.cfg or endpoint port.
Only one protocol appears to work
Recheck the router’s protocol selector and the host firewall separately. A TCP-only rule or UDP-only rule is insufficient for the normal FiveM endpoint. Ensure that a combined rule really covers both protocols rather than choosing one by default.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →How CGNAT and double NAT change the solution
Double NAT
Double NAT occurs when an ISP gateway and your own router both perform address translation. If the public address is assigned to the ISP gateway, a rule on your second router may never receive unsolicited inbound traffic. Forward the game port through both devices, place the downstream router in the gateway’s supported bridge or passthrough mode, or ask the ISP to provide a directly reachable arrangement.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Carrier-grade NAT
With CGNAT, the ISP shares one public address among multiple customers and does not give your router a directly reachable inbound address. You generally cannot solve that by adding more rules to your home router. Ask the ISP whether a public IPv4 option is available, or move the server to a managed hosting service that supplies inbound connectivity.
How to recognize an upstream restriction
- The router’s reported WAN address differs from the public address shown by an external address-checking service.
- You have no control over the ISP gateway, or forwarding changes on your router never affect the result.
- Direct connection fails despite a stable host IP, matching TCP and UDP rules, an open host firewall and a running FXServer.
These signs do not identify one specific ISP policy, but they justify checking the upstream device before spending more time editing the local rule.
Security practices for an internet-facing server
- Forward only the game endpoint port you actually use; do not place the server computer in a router-wide DMZ as a shortcut.
- Keep txAdmin’s TCP 40120 reachable only from the private network or another deliberately secured administrative path.
- Use the host firewall even when the router has a forwarding rule. The two controls protect different points in the path.
- Review the rules after changing the endpoint port or moving FXServer to another computer.
- Apply operating-system, FXServer and resource updates through your normal maintenance process, and remove obsolete forwarding entries.
- Share the public connection address with players, but do not publish administrative credentials or expose the txAdmin panel unnecessarily.
Self-hosting versus managed hosting
Port forwarding is appropriate when you control the router and can obtain an inbound-reachable public address. Managed hosting is worth considering when the ISP uses CGNAT, the gateway cannot be configured, or you do not want to maintain the home network and host firewall.
For a managed FiveM deployment, Godlike.Host provides FiveM game-server hosting through its own game panel. It is not on Cfx.re’s list of authorized FiveM hosts (fivem.net, 10 Oct 2026).
| Decision factor | Self-hosted FXServer | Managed hosting |
|---|---|---|
| Router and firewall control | You configure and maintain both. | The provider supplies the network path; your home router is not the game endpoint. |
| Inbound connectivity | Depends on public addressing, NAT and ISP policy. | Normally included as part of the hosting environment; verify the provider’s exact network offer. |
| Recurring cost | Uses your existing connection and hardware, but consumes power and maintenance time. | Requires a recurring hosting fee. |
| Setup complexity | Requires endpoint configuration, fixed LAN addressing, forwarding and firewall rules. | Usually reduces local networking work, but still requires server configuration. |
| Port changes | You can change the endpoint and update the router and firewall yourself. | Port choices depend on the provider’s controls and restrictions. |
| Security updates | You are responsible for the operating system, FXServer, resources and network exposure. | The provider maintains the underlying platform; you remain responsible for your server configuration and resources. |
The official Cfx setup documentation treats game-server hosting providers as another deployment path. Choose based on control, connectivity and maintenance responsibility—not on whether txAdmin happens to load in a browser.
Quick Recap
Quick verification checklist
server.cfgshows the endpoint port you intend to publish.- TCP and UDP forwarding target the current fixed private IP of the FXServer computer.
- The host firewall permits both protocols on that same game port.
- FXServer is running and reports the expected endpoint at startup.
- You are testing with
connect PUBLIC_IP:PORTfrom outside the LAN. - The public IP is current and the router is not behind an unconfigured second NAT device or CGNAT.
- You test direct connection before treating server-list visibility as a separate configuration problem.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




