How to fix Minecraft client attempt to authenticate server while playing on LAN with Linux’s network namespaces

So I recently stumbled upon a problem provoked by a random craving of launching a VPN-LAN party with my friends. The game we chose is called Minecraft, and it suggests, that one can easily host a game by launching a singleplayer game and then clicking the “Open to LAN” button. Thing is, it doesn’t work that well on VPN’s.

We chose to connect by a Hamachi network, I was the one who hosted the server. I did it by the means I described in the last paragraph, and – to my sheer surprise – no one could connect, everyone was being kicked from the server with a mysterious prompt of:

mc_error_authFailed to log in: The authentication servers are currently down for maintenance.

That’s weird, isn’t it? But anyway, my idea was – let’s just launch Minecraft with access only to the VPN network, not to the internet itself – maybe there will be no authentication attempts if it detects no Internet?

I proceeded to the scripting. Scripting, because on a Linux, one can run a process in a namespace, where it’s going to be sandboxed only to those network interfaces one selects.

Let’s list my interfaces then:


As you see, there’s a ham0 VPN interface that pops out after installing Hamachi, and wlp3s0 which provides me the Internet via WIFI. Now, as we know this, we need to run a minecraft-launcher in a namespace with ham0 only:


It does what it suggests in the echo’s. After running it I exclaimed SUCCESS!
Minecraft successfuly ran in the offline mode:


That’s great, but now it’s the worst part – my friends use Windows and I had no idea of scripting the same thing on it. I had luck, though – after googling I found out that someone wrote a small program that does exactly what my script did, but on Windows – it’s called ForceBindIP, and as it suggests, it binds a specific network interface / port to the process:

After installing, one can call Minecraft binded to its Hamachi IP by calling in cmd:

"C:\Program Files (x86)\ForceBindIP\ForceBindIP.exe" 25.60.2 33.140 "D:\Data\Minecraft\MinecraftLauncher.exe"

Where the first part is the place where ForceBindIP is installed, the second part is Hamachi IP and the third part is the Minecraft Launcher installation directory.

That’s the moment when we tried again to play. I hosted the game with a launcher I started with my script, my friend tried to connect via ForceBindIP and….


It worked!
And yes, I know that one can download only a *server* and it’s probably going to work – but if that so, why the Open to lan button anyway?


3 thoughts on “How to fix Minecraft client attempt to authenticate server while playing on LAN with Linux’s network namespaces

  1. That’s a great find (0x)dbeef! 🙂

    Once upon a time, blocking certain domains using (Windows) HOSTS was sufficient to play together on LAN.

    It was only a day ago when i noticed this HOSTS solution didn’t do the trick anymore (i wonder what Microsoft/Mojang changed… probably something server-sided).

    However, what i find mind boggling/bending is that they require the client to authenticate itself ONLINE, to be able to play LOCALLY…. well, that was UNTIL i found out about this site/blog/page =)

    Though, i’m still wondering what exactly causes the game to keep attempting to look ONLINE, whereas force-binding to a specific IP is enough to make it work.

    Before, i used to block/relay, and LAN worked fine, but at present, even when blocking,, and whatnot, it still won’t make LAN work….

    (i looked up the requests using ipconfig /displaydns )

    I haven’t yet peeked into WireShark…. that seems a little overkill, but hey… i’m desperate XD

    – copyitright


    1. Haha, glad to see that I am not the only one who was wondering why-the-heck would I need an internet connection while playing on LAN. That kept me infuriated for a while since I bought the game.

      Yeah, WireShark looks like an overkill, lol, but the idea to find domain the game connects and blocking packets is nice. You could also try to set up a local proxy with python like this guy:

      It would be easier to monitor/edit/craft packets, since all would be done on a python language level, without Wireshark.

      Anyway, check my other posts, I make a homebrew remake of Spelunky Classic for Nintendo DS!


      1. Hey man,

        Well, in the end i couldn’t resist and used WireShark and did some “://” string hex-edit searching. I found loads of URLs and blocked most of them.

        I even blocked internet access using netsh advfirewall firewall add rule name=”Block default gateway” dir=out action=block remoteip=%IP_GATEWAY%

        I then used ForceBindIP on the client side… but for some unknown reason the launcher could still connect because it still showed me release info/screenshots.

        I haven’t yet come to the VPN part, because i still can’t believe (nor understand/comprehend) why Microsoft/Mojang decided to make “Open to LAN” a forced “online” experience.

        TL;DR warning:

        Online i also see a lot of bug tickets and posts from complaining people. Those once fun/joyful family moments where people could play together over LAN, without the need to be connected to the internet. That time is pretty much gone.

        Of course, your investigating has showed that there is in fact a solution to this problem, but unfortunately it didn’t (or doesn’t seem to) work out for me.

        (if you want, and don’t mind, i can record a video and show you what happens… i can post the YT link here later on, or on my Discord server which you can find by clicking on my name and going to Support).

        Also: Python is cool.. just not my way of understanding (haven’t really looked into it yet.. xd)

        – copyitright


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s