Minecraft Server
6 Replies
That's peculiar, can you check your firewall to see if there's any kind of rule in place to block connectivity to your server? For example, do you have a reject all? Have you tried making exceptions for your computer's IP address (if you're not sure where it is, whatsmyip.org can tell you). If you need a little reference point for firewall rules, you can check here:
I hope this helps!
Regards,
Soh
iptables -A INPUT -p tcp --dport 25565 -j ACCEPT
Is that correct?
Iptables listing:
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:25565
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Netstat after starting server:
netstat -l | grep 25565
tcp6 0 0 0.0.0.0:25565 [::]:* LISTEN
This would allow you to accept on port 25565, so the issue may be on the home computer's side. What exactly are you doing to connect? Just hitting the Multiplayer and entering the IP on your home computer? What do you see when you do this?
Regards,
Soh
tcp 0 0 [redacted]:https : LISTEN
tcp6 0 0 [redacted]:https [::]:* LISTEN
When I use iptables command directly I use -I to avoid issues with appending. For regular stuff, on Ubuntu I use ufw, easier.
I just did a test with a simple Spark Java server then a simple Python server and found that Java prefers to bind to tcp6. This guy found the same, use the JVM option he did and it will fix your problem:
netstat -an | grep 25565
tcp6 0 0 0.0.0.0:25565 :::* LISTEN
@javaguy418:
Thanks! I think we're making progress here. I've added -Djava.net.preferIPv4Stack=true to the java startup, but then when I netstat it still show tcp6.
netstat -an | grep 25565 tcp6 0 0 0.0.0.0:25565 :::* LISTEN
Check your Minecraft server logs, or system logs, I'm guessing the server can't come up on tcp, only tcp6. See if you can run another server on the same port and connect to it (after making sure the Minecraft server is shut down) - well first make sure netstat shows it's listening:
python -m SimpleHTTPServer 25565