1

so i am using MineOS, a turnkey with preinstalled node.js webUI for deploying Minecraftservers. Now i want the server to be reachable via IPv6, because thats all i get from my ISP. But my server instance only ever listens on IPv4. How can i get the java minecraft server to listen on IPv6?

Some netstat -ntlp output, which is always the same, regardless of my server.properties in minecraft:

root@MinecraftServer /etc/default# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      493/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1194/master
tcp        0      0 0.0.0.0:25565           0.0.0.0:*               LISTEN      1446/java
tcp        0      0 127.0.0.1:12319         0.0.0.0:*               LISTEN      590/shellinaboxd
tcp        0      0 0.0.0.0:12320           0.0.0.0:*               LISTEN      598/stunnel4
tcp        0      0 0.0.0.0:12321           0.0.0.0:*               LISTEN      598/stunnel4
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      978/mysqld
tcp6       0      0 :::22                   :::*                    LISTEN      493/sshd
tcp6       0      0 :::8443                 :::*                    LISTEN      1026/node

I also tried using the -Djava.net.preferIPv6Adresses=true and -Djava.net.preferIPv6Stack=true. Doesn't change a bit. I changed the value for /proc/sys/net/ipv6/bindv6only to 1.

Here my ip6tables -L:

root@MinecraftServer /etc/default# ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp      anywhere             anywhere             tcp dpt:25565
ACCEPT     tcp      anywhere             anywhere             tcp dpt:25566
ACCEPT     tcp      anywhere             anywhere             tcp dpt:8443

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

I am able to reach a server on a windows maschine over the internet via IPv6! I am also able to reach the webUI over IPv6 on the turnkey maschine.

What else am i missing? All help appretiated!

SOLUTION:

The forge modification for minecraft set java.net.preferIPv4Stack=true up to the version 1.12.2-14.23.1.2555, which ruins every IPv6 attempt. For that reason i am using 6tunnel now, which creates a port forward from IPv6 to IPv4. I am still not reachable from the outside on the minecraftserver, but IPv6 is working.

2

I think you got the property names wrong. According to

The property names are:

  • java.net.preferIPv4Stack - note: IPv4 not IPv6
  • java.net.preferIPv6Addresses - note: two d characters not one.

You also need to check that you are not affected by this bug: https://bugs.mojang.com/browse/MC-3776

  • I tested them all seperate, even the invalid ones. And my minecraft version is not affected by this. I found the culprit to be the forge modification, which just set java.net.preferIPv4Stack=true somewhere in their code. It was also patched but only in the newest versions, so i got unlucky. I am using 6tunnel now and start it with a command at boot. – Hyrikan Dec 17 '17 at 18:32
0

The culprit was the forge modification i used with minecraft. Up to version 1.12.2-14.23.1.2555 it sets java.net.preferIPv4Stack=true. 6tunnel is a workaround, which does a port forward from IPv6 to IPv4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.