> Intel // field guide_

How to Port Forward a Minecraft Server (Complete Guide)

By Matthew Zhao||Updated
MinecraftGuides

Port forwarding sounds like something only IT professionals deal with, but it's what lets your friends join your Minecraft server from anywhere on the internet. If you're hosting a Minecraft server on your PC and your friends can't connect, port forwarding is usually the missing piece.

This guide covers what port forwarding is, why you need it, and step-by-step instructions for common routers.

What Port Does Minecraft Use?

Minecraft servers listen for connections on a specific port. By default, Minecraft Java Edition uses TCP port 25565. A port works a bit like an apartment number in a building: your router needs to know exactly which device should receive incoming Minecraft traffic.

When your friends try to connect, their connection arrives at your router on port 25565. Without a forwarding rule, your router doesn't know to pass that traffic to the PC running the server.

Some servers use other ports (like 25566 or a custom number), but 25565 is the default. If you use a different port, substitute it in the instructions below. Bedrock Edition servers are different: Bedrock Dedicated Server uses UDP port 19132 by default.

Why Port Forwarding Matters for Minecraft

Your router blocks unsolicited traffic from the internet by default. That's good for security, but it also means that when someone outside your network tries to connect to your Minecraft server, the connection never reaches it.

Port forwarding tells your router: "When someone on the internet tries to reach port 25565, send them to the computer running my Minecraft server." It's the bridge between your private home network and the public internet.

Without port forwarding:

  • Local players on your Wi-Fi can connect
  • Players outside your network cannot connect
  • Outside players get connection errors or "cannot reach server" messages

With port forwarding enabled:

  • Anyone with your public IP address (and port, if it isn't 25565) can join
  • Your friends don't need special software or VPNs
  • Your server is reachable from anywhere on the internet

Step 1: Find Your Local IP Address (192.168.x.x)

Before you can forward a port, you need the IP address of the computer running your Minecraft server on your home network. This is your local IP address (often starting with 192.168.x.x or 10.x.x.x).

On Windows

  1. Press Win + R, type cmd, and press Enter
  2. Type ipconfig and press Enter
  3. Look for "IPv4 Address" under your network adapter
  4. It should look something like 192.168.1.150

On Mac or Linux

  1. Open Terminal
  2. On macOS, type ipconfig getifaddr en0 (use en1 if you're on a different adapter). On Linux, type ip addr
  3. Find your local IP address (on Linux it's listed after inet)

Tip: Write down this IP address. You'll need it for your router settings.

Step 2: Log In to Your Router's Admin Panel

This is where things get router-specific, but the concept is the same everywhere. You need to open your router admin panel to create the port forwarding rule.

Finding your router's IP address

  1. On Windows, open Command Prompt and type ipconfig
  2. Look for "Default Gateway". That's usually your router (often 192.168.1.1 or 192.168.0.1)
  3. Open a web browser and go to that address

Some newer routers are managed through a phone app instead of a web page. If so, look for the port forwarding option in the app.

Logging in

  • Check the sticker on your router for the default username and password
  • Common defaults are admin/admin or admin/password
  • Change the default password after you log in

Step 3: Port Forward on Your Router

The exact steps vary by manufacturer, model and firmware version, so menu names on your router may differ from the ones below. Look for a section called "Port Forwarding", "Virtual Server" or "NAT Forwarding".

In every example, the internal IP address is the local IP you found in Step 1.

TP-Link Router

  1. Log into your router admin panel (often 192.168.0.1)
  2. Go to Forwarding → Virtual Servers (on newer firmware: Advanced → NAT Forwarding → Virtual Servers)
  3. Click Add New or Add
  4. Set:
    • Service Port / External Port: 25565
    • Internal IP Address: Your Minecraft server's local IP
    • Internal Port: 25565
    • Protocol: TCP
  5. Click Save

Netgear Router

  1. Access the admin panel
  2. Go to Advanced → Advanced Setup → Port Forwarding/Port Triggering
  3. Select Port Forwarding and add a custom service
  4. Fill in:
    • Service Name: Minecraft
    • External Port: 25565
    • Internal Port: 25565
    • Internal IP: Your Minecraft server's local IP
    • Protocol: TCP
  5. Click Apply

Linksys Router

  1. Open the admin panel
  2. Go to Apps & Gaming → Single Port Forwarding (on Smart Wi-Fi models it's under Security → Apps and Gaming)
  3. Enter:
    • Application Name: Minecraft
    • External Port: 25565
    • Internal Port: 25565
    • Protocol: TCP
    • Device IP Address: Your Minecraft server's local IP
  4. Click Save or Save Settings

ASUS Router

  1. Go to the admin panel
  2. Open WAN → Virtual Server / Port Forwarding
  3. Turn on port forwarding and add a new entry:
    • Service Name: Minecraft
    • External Port: 25565
    • Internal IP: Your server's local IP
    • Internal Port: 25565
    • Protocol: TCP
  4. Click OK or Apply

Step 4: Configure Firewall Exceptions

Your computer's firewall can also block incoming connections. You need to allow the Minecraft server through.

Windows Defender Firewall

  1. Open Windows Security (search "Windows Security" in the Start menu)
  2. Go to Firewall & network protection
  3. Click Allow an app through firewall, then Change settings
  4. Find Java (it's often listed as "OpenJDK Platform binary" or "Java(TM) Platform SE binary"), since the server runs inside Java
  5. Make sure Private is checked (and that your home network is set to Private in Windows)
  6. Click OK

If Java isn't listed

  1. Click Allow another app
  2. Browse to the java.exe (or javaw.exe) your server uses
  3. Click Add

Windows often shows a firewall prompt the first time you start the server. Allowing it on private networks has the same effect.

macOS

If the macOS firewall is on, open System Settings → Network → Firewall → Options and allow incoming connections for Java. macOS may also ask you the first time the server starts.

Linux (UFW)

sudo ufw allow 25565/tcp

Step 5: Test Your Port Forwarding

Make sure your Minecraft server is running, then check it before inviting friends:

  1. Find your public IP: Visit a site such as whatismyipaddress.com from inside your network
  2. Check port status: Use an online port checker (search "port 25565 checker"). It only reports the port as open while the server is running
  3. Ask a friend to connect: Have someone outside your network join using your public IP address

Testing with your own public IP from inside your home network doesn't always work, because many routers don't support connecting back to themselves (sometimes called NAT loopback or hairpinning). Use your local IP when you play on the same network, and rely on an outside friend or a port checker for the real test.

If the port checker shows the port as closed, double-check your forwarding rule, the local IP, and your firewall.

Common Issues and Troubleshooting

"My friends still can't connect"

Check your ISP restrictions: Some ISPs block incoming ports or use CGNAT (Carrier-Grade NAT), which prevents port forwarding entirely. Ask your ISP whether you have a public IP address.

Verify your firewall isn't blocking it: Temporarily turn the firewall off to test, then turn it back on straight away and fix the rule.

Restart your router: Sometimes forwarding rules don't take effect immediately. Unplug your router for 30 seconds and try again.

"My local IP address keeps changing"

This breaks your forwarding rule, because the rule points at the old address. The simplest fix is a DHCP reservation: most routers let you reserve a fixed local IP for a device in their DHCP or LAN settings.

You can also set a static IP address on the server PC itself.

Windows

  1. Go to Settings → Network & Internet → Advanced network settings
  2. Click More network adapter options
  3. Right-click your network adapter → Properties
  4. Select Internet Protocol Version 4 (TCP/IPv4) → Properties
  5. Choose Use the following IP address
  6. Set a static address outside your router's DHCP range (e.g., 192.168.1.150), plus the subnet mask, default gateway and DNS server shown by ipconfig

Understanding NAT, IPv4 vs IPv6, and CGNAT

NAT (Network Address Translation): This is how your router translates between your private home network and the public internet. Port forwarding is a NAT rule.

IPv4 vs IPv6: Most home setups still rely on IPv4 (addresses like 192.168.1.1). IPv6 doesn't use NAT in the same way; instead, you allow the traffic in your router's IPv6 firewall settings. Check your router documentation if you want players to connect over IPv6.

CGNAT (Carrier-Grade NAT): Some ISPs add an extra layer of NAT on their side, which makes port forwarding on your router impossible. If the WAN or internet IP shown on your router's status page is between 100.64.0.0 and 100.127.255.255, or doesn't match the public IP shown by an IP lookup site, you're probably behind CGNAT. Ask your ISP for a public IP, or use a hosted server instead.

FAQ: Port Forwarding for Minecraft

Q: Is port forwarding safe? A: Port forwarding opens one specific port to one device on your network. As long as it points at a legitimate application (your Minecraft server) that you keep updated, the risk is limited. Only open the ports you need, keep online-mode=true in server.properties, and use a whitelist if the server is just for friends.

Q: Do I need to port forward both TCP and UDP? A: For a Java Edition server, TCP on port 25565 is enough. You only need UDP if you add something that uses it, such as the optional query protocol, a voice chat mod, or a Bedrock Edition server (UDP 19132).

Q: What if I'm using a router from my ISP? A: ISP-provided routers usually have the same port forwarding settings, although the layout differs. Some ISPs manage the settings through their own app or website. Contact your ISP's support if you can't find them.

Q: Can I use a port other than 25565? A: Yes. Change server-port in server.properties, forward that port instead, and tell your friends to connect with address:port.

Q: Will this work if I'm using a VPN? A: If the computer running the server is connected to a VPN, its traffic goes through the VPN provider instead of your home connection, so a forwarding rule on your home router usually won't help while the VPN is on. A regular VPN also won't get you around CGNAT or ISP port blocks.

Q: How do I turn off port forwarding later? A: Log into your router admin panel and delete the forwarding rule. Your server will no longer be reachable from the internet.

Final Thoughts

Port forwarding is necessary for most home-hosted Minecraft servers, but it doesn't have to be intimidating. Follow these steps carefully and your friends should be able to join. If your ISP uses CGNAT or blocks ports, a hosted server is usually the easier route.

For more on setting up a server, see How to Set Up a Minecraft Server, How to Make a Modded Minecraft Server and Best Modded Minecraft Server Hosting.

Skip Port Forwarding with EZ Game Host

A hosted server doesn't depend on your home router, so there's nothing to forward. EZ Game Host offers Minecraft server hosting for Java and Bedrock Edition, with a subdomain included for your players to connect to, 3 backup slots, and full console access. Every plan includes 24/7 support and a 99.9% monthly uptime SLA, and you choose your server region at checkout.

Plan Price RAM CPU Players Storage
Basic $12/mo 4GB 1 Thread 10 40GB NVMe
Standard $24/mo 8GB 2 Threads 30 40GB NVMe
Pro $48/mo 16GB 4 Threads 100+ 80GB NVMe

Advertised allocations as of October 12, 2026. See Minecraft plans for current details.

We use cookies for analytics, ad measurement and session recordings. Accept to allow them, or Decline to opt out of analytics and the sale or sharing of your personal information. Privacy Policy