Forwarding ports
This guide will teach you how to forward your ports for your FiveM server!
What is portforwarding?
Section titled “What is portforwarding?”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.
Ports we use
Section titled “Ports we use”- FXServer uses port
30120by default (TCP/UDP). - txAdmin uses port
40120by default (TCP).
Windows Defender Firewall
Section titled “Windows Defender Firewall”- Look for Windows Powershell on your computer.
- Make sure to run this app as
administrator! - In the Powershell command line you paste the following:
netsh advfirewall firewall add rule name="FXServer-TCP" dir=in action=allow protocol=TCP localport=30120netsh advfirewall firewall add rule name="FXServer-UDP" dir=in action=allow protocol=UDP localport=30120In case you also want to open the txAdmin port, paste this as well:
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.
Router
Section titled “Router”- 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!