No route to host error with Minecraft server and SSH

I am hosting a modded minecraft server for me and my friends. Up until recently, it was working fine with no issues. However, as of the day before yesterday, it has been impossible to connect from a device that is not the device hosting the server. The issues seem to have started around the same time as some SSH issues I had. I was running SSH on both port 22 and 443, and the port 443 server was not working, and is still giving the same error as minecraft. The port 22 server is working fine, however. I do not have iptables, UFW or firewalld running. My router has a firewall, but its setting have not changed since long before the issues started happening. The “No route to host” error occurs when trying to connect from within the network (my router has NAT loopback enabled), and when my friend tries to connect to the minecraft server, he gets a “Connection timed out: no further information” error. I do not have any VPN currently running, although I tried ZeroTier, which still didn’t work.

Does anyone have any ideas?

Don’t run ssh on 443 - it is dedicated to https

I sounds like a sort of X Y problem - you have tried to fix the connection and now you are trying to fix the fix - I suggest going back to the root.

I would check

  • the server’s ip address
  • your network’s public ip address
  • forwarding rules in the router
  • if you want to obscure your service open a high port e.g. 44422 and forward to your servers port 22
  • minecraft expose it’s own port - use portforwarding for that port

Looks very much like you use the wrong IP for server.

If your friends is connecting remotely - your public IP may have changed.

Most routers allow for sending a periodic request to a dynamic DNS service and update a configured host name.

2 Likes

I have forwarded port 25565, however it doesn’t work even from other devices connecting to my private IP (192.168.1.201) from within the network. I checked my public IP, and it hasn’t changed since before the issues started. In addition, prior to the issues starting, SSH on 443 was working completely fine, and I do not have an HTTP or HTTPS server running that could have been interfering. I was not at home when the issues started, so I do not know what happened.

Have you checked your cables ?

I would also try to ping the server IP from inside the network

If you logon using the console of the server - verify the network is up and functional by troubleshooting the outgoing connection from your device.

Check the iptables configuration (with no rules configured it should look like this)

 $ sudo iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

Did you update the server ?

Have you restarted the server ?

3 Likes

I probably should have specified that what I call a server is actually just my desktop running a Minecraft server. All of the cables are securely in place. My computer is connected to the internet, as it is the device I am posting this from. sudo iptables --list returns

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain DOCKER (0 references)
target     prot opt source               destination         

Chain DOCKER-BRIDGE (0 references)
target     prot opt source               destination         

Chain DOCKER-CT (0 references)
target     prot opt source               destination         

Chain DOCKER-FORWARD (0 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION-STAGE-1 (0 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION-STAGE-2 (0 references)
target     prot opt source               destination         

Chain DOCKER-USER (0 references)
target     prot opt source               destination  

I have updated (with sudo pacman -Syu), which said that there were no packages to update. I have restarted both the minecraft server and the actual computer several times.

What is the output of:

ss --tcp --numeric --listening --processes | grep ":443"

# or

ss -tnlp | grep ":443"

ss -tnlp | grep “:443” returns

LISTEN 0      128                        0.0.0.0:443        0.0.0.0:*    users:(("sshd",pid=1089,fd=6))           
LISTEN 0      128                           [::]:443           [::]:*    users:(("sshd",pid=1089,fd=7))

I am currently dual booting, and booting into windows results in a working minecraft server. I am going to see if I am able to rollback to before the issues started, and see if that fixes anything.

I decided to reinstall Manjaro to fix the issues. I am reinstalling it now.

Sounds like a really simple fix, but there’s not enough information to really go on.

You set sshd to listen on port 443?

grep Port\  /etc/ssh/sshd_config

Returns: Port 22 for most.

(Getting that back to normal would be my first step.. But that’s not the problem, moving on.)

This test. You are connecting to the private IP and port with from within the private LAN? (And not the connecting to the router’s IP?)

And this forwarded port, is coming from a router (that your ISP provided, or that you setup)?

There are a lot of unknowns to us.


Here is another test you can do, instead of using a Minecraft server and client for each test.

You can you plain ol’ netcat (nc). First you can take this router out of the equation for troubleshooting, then use this test with it.

On the server run:

sudo nc -l -p $PORT

Then from any other host, you can test port connectivity. (Up to Windows 10 even has telnet. And still does as an “Add/Remove Feature” in Settings.)

telnet $IP $PORT

You will get connection refused if it doesn’t work, and this if it works:

Trying 10.2.4.10...
Connected to mbox.
Escape character is '^]'.

I already reinstalled Manjaro to fix the issue, which worked. I did try connecting using telnet, which would return the same error. The router was not provided by our ISP.

I intentionally configured SSH to listen on both port 22 and 443. I tried connecting to both my private and public IP from another computer, neither worked.

Thank you for trying to help.

Is there a way to flag this as solved, now that I have it working?

Not in this case, since a reinstallation doesn’t provide a real solution to the original issue, which could likely have been fixed. :wink:

There’s a lesson to be learned from this thread:

If you’re running a server (or host), it’s one of your administrative duties to document everything you change in the basic configuration. This is called a changelog.

This might seem like unnecessary work. But if something goes wrong, this changelog is an excellent basis for fixing the problem.

Even when you have to reinstall, the changelog from the previous server (or host) is invaluable because it makes setting it up much faster.

:footprints:

1 Like