Minecraft doesn't work if I use dnscrypt-proxy, what to do?

I have dnscrypt-proxy setup to use a few resolvers of my liking, but minecraft multiplayer refuses to work unless I use google’s dns. What do I do here?
Is there a way to make dnscrypt-proxy use google’s DNS only when minecraft is running?

I’ve thought about creating two separate shell scripts. The first one:

sudo systemctl stop dnscrypt-proxy.service
sudo rm /etc/resolv.conf
sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf

and the second would be the reverse of this process:

sudo rm /etc/resolv.conf
sudo echo "nameserver ::1" >> /etc/resolv.conf
sudo echo "nameserver 127.0.0.1" >> /etc/resolv.conf
sudo echo "options edns0 single-request-reopen" >> /etc/resolv.conf
sudo systemctl start dnscrypt-proxy.service

However I was wondering if there was a more elegant way of doing such things.

My advice would be determine the source of the problem and fix it. Minecraft doesn’t require google’s DNS servers.

I can’t say for sure what the cause of your problem is but my guess with zero additional information would be that whatever you are connecting to on the other side of your dnscrypt-proxy is blacklisting something.

First thing to check is what is failing. Is your account failing to authorize for multiplayer or can you not connect to certain servers?

If it is the former, try running DNS queries to the minecraft.net domain that the client uses and see if they resolve. If it is the latter, you could either add the IPs of the servers to a hosts file or just connect via IP to those servers.

Of course, more information would be helpful to provide better advice.

1 Like

The exact error message I get when trying to connect (when using dnscrypt-proxy):
io.netty.channel.ConnectTimeoutException: connection timed out: ChronicleofSolstice.aternos.me/51.159.162.169:25565

Connecting via the ip address doesn’t work either.

I also tried running resolvers which aren’t supposed to filter anything.

This probably means you’re connecting to the wrong IP address.

(And hence the DNS resolver isn’t resolving the domain to the correct IP.)

This was technically the issue. https://support.aternos.org/hc/en-us/articles/360026805072

Basically the server ip changes every time you restart it, but dnscrypt-proxy’s cache may last longer than that. So now the question is, how to flush dnscrypt-proxy’s cache? I couldn’t find anything online (would it be possible to ensure that only a specific domains ip is not cached?).

You could try playing with the cache TTL settings, e.g.

or setting it up as recommended behind another resolver (e.g. unbound, dnsmasq) that can exclude certain domains (e.g. aternos.me) from the cache.

1 Like

Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.