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)

๋Œ“๊ธ€

Mojang Session Servers Down? Here's Why You Can't Log Into Minecraft Right Now

Photo by Patrik Kernstock on Unsplash So you sit down to play some Minecraft, probably after a long day, maybe you've got friends waiting in a server lobby, and you get smacked with this: Failed to connect to the server. Error: Authentication servers are down for maintenance. Or sometimes it shows up as: Failed to login: Invalid session (Try restarting your game and the launcher) Yeah. The Mojang session servers are down, or at least they're not talking to your game properly. I've seen this come up constantly in forums and Discord servers whenever there's a Mojang outage, and the frustrating part is — half the time people don't even realize it's not their fault. Here's what's actually going on. Why This Happens Minecraft doesn't just let you waltz into a multiplayer server. Every time you connect, your client reaches out to Mojang's session servers at session.minecraft.net to verify you...

what is art therapy AI painting checker Introducing the AI HTP Test Site: A New Era in Art Therapy

 #what is art therapy #art therapy activities   AI Art Above is the AI ​​picture psychological test. Below is the AI ​​HTP tree human house test.  Psychotherapy test AI Art Psychotherapy HTP test Introducing the AI HTP Test Site: A New Era in Art Therapy What Is HTP? HTP (House-Tree-Person) is a well-known projective drawing test commonly used in art therapy and psychological evaluation. Participants draw a house, a tree, and a person, and mental health professionals interpret these drawings to gain insights into the individual’s emotional state, personality traits, and underlying issues. AI Meets HTP Thanks to advancements in artificial intelligence, the HTP test has evolved. Our AI HTP Test Site allows you to upload your drawings and receive a detailed, automated analysis. The system evaluates various elements—line thickness, spatial arrangement, color usage, and more—to provide immediate, data-drive...

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

Zoho Mail IMAP Not Working: Every Fix I've Actually Used

Quick Summary Zoho Mail IMAP stops working for the dumbest reasons - wrong port, 2FA blocking app passwords, or DNS that looks fine but isn't. I've fixed this across Outlook 2016, iPhones, Android, and Mac Mail, and the root cause is almost always one of four things. Here's the exact step-by-step with real menu paths so you're not clicking around for two hours like I was the first time. Photo by Juanjo Jaramillo on Unsplash It was a Monday morning. One of our sales guys walks up and says his Outlook stopped pulling emails from Zoho. Just stopped. Overnight. Nothing changed - or so he said. Checked his machine, checked the account settings, everything looked right on the surface. Port 993, SSL enabled, correct email address. And yet. Nothing. Here's the thing - Zoho Mail IMAP issues have this annoying pattern where the settings look correct but something underneath is broken. Could be an app password that got invalidated when someone toggled 2FA. Could be IMAP ac...
↑