How to Set Up Port Forwarding for Your FiveM Server

Port forwarding is crucial for hosting a FiveM server and ensuring players can connect. This guide will show you how to set it up and troubleshoot common issues like FiveM server port forwarding not working.

What is Port Forwarding?

Port forwarding allows traffic from the internet to enter a specific port on your local network. It's necessary for hosting game servers like FiveM, enabling other players to connect to your server.

Prerequisites

Before you start, you’ll need:

  • Access to your router’s login credentials (username and password).
  • The IP address of your router.
  • The internal IP address of the machine hosting the FiveM server.
  • The specific ports that FiveM requires to be open (default: 30120).

Step-by-Step Guide

Step 1: Find Your Router’s IP Address

Here's how to find it:

Windows:

  1. Press Windows + R, type cmd, and press Enter.
  2. In the Command Prompt, type ipconfig and press Enter.
  3. Look for the Default Gateway. This is your router’s IP address (e.g., 192.168.1.1).

Mac:

  1. Open System Preferences and click on Network.
  2. Select your network connection and click Advanced.
  3. Go to the TCP/IP tab and find the Router IP address.

Step 2: Log Into Your Router

  1. Open a web browser and type your router’s IP address in the address bar.
  2. Enter your router’s login credentials (often found on the router or provided by your ISP).

Step 3: Find the Port Forwarding Section

The location varies by router but check these common areas:

  • Advanced Settings
  • NAT Forwarding
  • Virtual Server
  • Port Forwarding

If you have trouble, refer to your router’s manual or search online for instructions specific to your model.

Step 4: Create a Port Forwarding Rule for FiveM

Enter the following details:

  • Service Name: Name the rule, e.g., "FiveM Server".
  • Protocol: Set to UDP or Both (UDP/TCP).
  • Internal IP Address: The local IP of your server machine (use ipconfig on Windows or Network settings on Mac to find this).
  • Internal/External Ports: Default is 30120.
  • Enable/Apply: Save the settings.

Step 5: Verify the Port is Open

  • Use an Online Port Checker (like canyouseeme.org) to see if port 30120 is open.
  • On Windows, use Command Prompt: Type netstat -an and look for port 30120.

Additional Tips

  • Static IP Address: Ensure the server machine has a static internal IP to avoid disruptions. Configure this in your router's DHCP settings or on your computer.
  • Firewall Settings: Make sure your firewall allows traffic through port 30120.
  • Check ISP Restrictions: Some ISPs block certain ports. If needed, contact your ISP.

Common Issues & Troubleshooting

  • Port Still Closed: Double-check the internal IP, firewall settings, and router configuration.
  • Server Not Showing: It might not appear on the public FiveM server list immediately. You can connect using your server's IP.

Step-by-Step Guide: Configuring Windows Advanced Firewall for FiveM

Step 1: Open Windows Firewall

Press the Windows key, type Windows Defender Firewall, and select Windows Defender Firewall with Advanced Security.

Step 2: Create a New Inbound Rule

  1. Click Inbound Rules on the left.
  2. In the Actions pane, click New Rule.
  3. Select Port and click Next.

Step 3: Specify the Port

Choose UDP and enter 30120. Click Next.

Step 4: Allow the Connection

Select Allow the connection and click Next.

Step 5: Apply the Rule

Select all profiles (Domain, Private, Public) and click Next.

Step 6: Name the Rule

Name it "FiveM Server UDP Port 30120" and click Finish.

Step 7: Create an Outbound Rule (Optional)

For extra connectivity, repeat these steps for an Outbound Rule in the Outbound Rules section.

Additional Resources

Need reliable hosting for better performance? Check out HTNetwork's FiveM Server Hosting:

  • FiveM server hosting VPS options for a smooth experience.
  • FiveM server hosting for cheap: Affordable plans for everyone.
  • Widely recommended on FiveM server hosting Reddit forums.
  • Compare FiveM server hosting cost and choose what fits your budget.
  • With HTNetwork, your server can easily be added to the FiveM server list.
Was this answer helpful? 1 Users Found This Useful (1 Votes)