How to Fix Minecraft Firewall Settings (Can't Connect to Servers or LAN)

How to Fix Minecraft Firewall Settings (Can't Connect to Servers or LAN)

Photo by wesfly on Unsplash

So there I was, trying to set up a LAN world for my nephew on a Saturday afternoon, and Minecraft just refused to see the other computer. No error message, no explanation — just nothing. After about 20 minutes of head-scratching, I realized Windows Firewall was silently blocking the connection. Classic. If you're hitting a wall (pun intended) trying to connect to a Minecraft server or a LAN world, there's a solid chance your firewall is the culprit.

The "can't connect to server" problem in Minecraft usually shows up looking something like this:

io.netty.channel.AbstractChannel$AnnotatedConnectException:
Connection refused: no further information: <server-ip>:25565

Or for LAN worlds, you just see an empty list where other worlds should appear. No drama, no error — just a blank screen mocking you.

Why Does This Actually Happen?

Here's the thing — Windows Firewall, and even third-party antivirus software like Avast or Norton, will sometimes block Java or the Minecraft executable from making network calls. This happens especially after a Minecraft update, because the new executable is treated as an "unknown" program. The firewall sees a new file it doesn't recognize and just... blocks it. Same deal if you recently switched from Minecraft Java Edition to the Bedrock launcher or vice versa.

Port 25565 is the default Minecraft server port, and if that's not open, nothing's getting through. On LAN games, Minecraft picks a random port dynamically, which makes firewall rules even trickier to get right.

Fix 1: Allow Minecraft Through Windows Firewall (The GUI Way)

This is the first thing to try, and honestly it fixes it 80% of the time. Go to your Windows search bar and type Windows Defender Firewall, then click "Allow an app or feature through Windows Defender Firewall." Hit "Change settings" (you'll need admin rights), then scroll down and look for Java or Minecraft in the list.

If you see it there but the checkboxes for Private and Public aren't both ticked — tick them. If it's not there at all, click "Allow another app," browse to your Minecraft installation folder, and add the executable manually.

For Java Edition, the file you're looking for is usually here:

C:\Program Files\Eclipse Adoptium\jdk-17\bin\javaw.exe

The path can vary depending on which Java version you've got installed, so just dig around in Program Files if that exact path doesn't exist. For Bedrock/Windows 10 Edition, you're looking for the Minecraft app in the Microsoft Store apps list inside the firewall panel.

Fix 2: Open Port 25565 Using PowerShell

If the GUI method didn't cut it — or you're the type who just prefers getting things done in a terminal — you can manually open the Minecraft port using PowerShell. Run it as Administrator and paste these two commands:

New-NetFirewallRule -DisplayName "Minecraft Server Inbound" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow

New-NetFirewallRule -DisplayName "Minecraft Server Outbound" -Direction Outbound -Protocol TCP -LocalPort 25565 -Action Allow

That opens port 25565 for both incoming and outgoing TCP traffic. If you're running a local server and people are connecting over UDP too (some mods and plugins use it), just duplicate the commands and swap TCP for UDP.

To double-check the rules actually got created, run:

Get-NetFirewallRule -DisplayName "Minecraft*"

You should see both rules listed with "Enabled: True". If not, something went sideways and you may need to check your admin privileges.

Fix 3: Temporarily Disable the Firewall to Test (Don't Skip This Step)

I know, I know — this sounds reckless. But hear me out. If you're not sure whether it's actually the firewall causing your Minecraft connection issues, the fastest diagnostic is to temporarily disable it and test. If Minecraft works with the firewall off, you know for certain that's where the block is. If it still doesn't work, you're chasing the wrong problem entirely — could be your router, DNS, or the server itself being down.

To disable Windows Firewall temporarily via command line:

netsh advfirewall set allprofiles state off

Try connecting to your Minecraft server or LAN world. If it works, turn the firewall back on immediately:

netsh advfirewall set allprofiles state on

Then go apply Fix 1 or Fix 2 properly. Don't leave your firewall off — that's just asking for trouble.

(Side note: if you've got a third-party antivirus with its own firewall built in — looking at you, McAfee — you'll need to check that software's settings separately. Windows Firewall and your antivirus firewall are different things, and both can block Minecraft independently.)

Fallback Tip: Check Your Router's Port Forwarding

If none of the above fixes work and you're trying to connect to a server hosted outside your local network, the issue might not be your PC's firewall at all — it might be your router. For people hosting a Minecraft server at home and sharing it with friends online, you need to forward port 25565 through your router to your local machine's IP address.

Every router interface is a little different, but the general path is something like Advanced Settings → Port Forwarding → Add Rule. Set the external and internal port to 25565, protocol TCP, and point it at your PC's local IP (find that with ipconfig in Command Prompt — look for IPv4 Address).

ipconfig

Your friends will connect using your public IP, which you can find at a site like whatismyip.com. This is a whole separate rabbit hole, but worth knowing if you're running your own Minecraft server and the firewall stuff checked out fine.

In my experience, the Windows Firewall blocking javaw.exe after an update is the single most common reason people suddenly can't connect — even when they could connect just fine the day before. Hope this saves you the Saturday afternoon I lost to it.

Related: How to Fix "Failed to Connect to Server" in Minecraft (2024)

๋Œ“๊ธ€

Zoho IMAP Settings: The Complete Fix When Your Email Stops Syncing

Quick Summary Zoho IMAP breaks more often than it should, and the error messages are genuinely useless. The fix is usually a combination of using the right server address, enabling IMAP inside Zoho Mail's settings, and generating an app-specific password. This guide covers the exact steps for Outlook, iPhone, Thunderbird, and Android so you stop going in circles. Photo by Fotis Fotopoulos on Unsplash So your Zoho Mail stopped syncing. Emails aren't coming in, your phone shows a spinning indicator forever, or Outlook throws some vague authentication error and you have no idea what changed. Sound familiar? I've seen this exact situation probably thirty times across different clients, and every single time the person swears they didn't change anything. And honestly? They usually didn't. Zoho changed something on their end, or an app update reset a setting, or someone enabled two-factor authentication without realizing what that does to third-party mail clients. The...

Zoho Mail IMAP Configuration: Exact Settings That Work First Time

Quick Summary Getting Zoho Mail IMAP to work in Outlook or Thunderbird is not as straightforward as Zoho's docs make it sound. The port numbers, SSL settings, and app password requirements catch almost everyone off guard the first time. Here are the exact settings and steps that actually work, without the back-and-forth with support. Photo by Fotis Fotopoulos on Unsplash Last month I spent almost two hours on a Friday afternoon helping a new employee get Zoho Mail working in Outlook. Two hours. The settings look simple on paper — and honestly, they are — but there are two or three specific things that Zoho just does not make obvious, and if you miss any one of them, you get a generic authentication error that tells you absolutely nothing useful. Sound familiar? The thing is, I've set up Zoho IMAP maybe forty times across different clients and different mail apps. Outlook, Thunderbird, Apple Mail, even some third-party Android clients. And every single time, someone new come...

์ด ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰

Magnesium Glycinate vs Magnesium Citrate: Which One Actually Fixed My Sleep

Quick Summary I spent months trying different magnesium forms after my sleep fell apart, and the difference between glycinate and citrate is way bigger than I expected Glycinate is the gentler, slower option great for sleep and anxiety, while citrate works faster but comes with some digestive surprises nobody warns you about If you're confused about which one to take, this breaks down exactly what each form does and who should actually be using it Photo by Anshu A on Unsplash About two years ago I hit a wall. I was waking up at 3am every single night, my legs felt restless, and I was grinding my teeth so bad my jaw hurt in the morning. My doctor ran some basic labs, everything came back "normal," and I left that appointment feeling completely dismissed. A friend of mine — she's really into functional nutrition — casually mentioned that I might just be magnesium deficient. I kind of rolled my eyes at first. It sounded like one of those wellness buzzwords people throw...
↑