Skip to content

Forwarding ports

This guide will teach you how to forward your ports for your FiveM server!

Port forwarding is a networking technique used to make sure that devices from outside the host network can communicate with the host network over the specified port. When you want people to be able to join your FiveM server, you need to forward the port.

  • FXServer uses port 30120 by default (TCP/UDP).
  • txAdmin uses port 40120 by default (TCP).
  • Look for Windows Powershell on your computer.
  • Make sure to run this app as administrator!
  • In the Powershell command line you paste the following:
Terminal window
netsh advfirewall firewall add rule name="FXServer-TCP" dir=in action=allow protocol=TCP localport=30120
netsh advfirewall firewall add rule name="FXServer-UDP" dir=in action=allow protocol=UDP localport=30120

In case you also want to open the txAdmin port, paste this as well:

Terminal window
netsh advfirewall firewall add rule name="txAdmin-TCP" dir=in action=allow protocol=TCP localport=40120
  • If the console says “Ok” 2 or 3 times, you have successfully added the rules to the Windows Defender Firewall.
  • First of all, open a CMD on your computer.
  • In the CMD you type ipconfig.
  • What you need is the value of “Default Gateway”.
  • The next step is using this IP to browse to your router’s webpage.
  • You should now be on the webpage of your router, it will prompt for a username and a password, you can find these 2 on the back of your router, physically.
  • Once you are logged in you need to look for the “Port forward” option. Where this is located differs per router, I suggest Googling your router brand + model to find out where this option is if you can’t find it.
  • Once you have done the whole configuration you can check if the port is opened using this website.
  • All you need to do there is fill in the port number and see if it says “Closed” or “Opened”.
  • If it says “Opened”, your FiveM server should be accessible from the outside!