[SOLVED] Can't reach server with IPv6

Hey guys,
i installed MineOS on a little server. I can reach the WebUI via IPv4 and the minecraft server also via IPv4, both in local network. Now i got two problems.

  1. I want to reach the minecraft server via IPv6 in my local network.
  2. I want to reach the minecraft server from outside my local network.

I already tried setting up a port forward on 25565. I also disabled the IPv6 firewall from my router. But no luck.

EDIT:
solution in last post :slight_smile:

I updated the ip6tables rules for the port 25565 like the rule for the ip4 port. My server listens on the :: adress on port 25565 and i can still join on the ip4 adress. Any idea? :frowning:

If you go to the Linux command line and type in netstat -ntlp, does it list your Minecraft server listening on IPV6?

# 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:139             0.0.0.0:*               LISTEN      1851/smbd
....
tcp6       0      0 :::139                  :::*                    LISTEN      1851/smbd
tcp6       0      0 :::25565                :::*                    LISTEN      -
....

Thanks for the help :slight_smile:

It seems to only ever listen on 0.0.0.0. I made some screenshots from the command output and also my ip6table rules. I noticed, that i accepted tcp instead of tcp6 in the ip6table. Does that make a big difference?

uploading a file doesn’t work >.<

Ah and i managed to join with ipv6 on a server hosted on my own windows pc from another windows pc.

now i was able to read more info with netstat:

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      1205/master
tcp        0      0 0.0.0.0:8443            0.0.0.0:*               LISTEN      1015/node
tcp        0      0 0.0.0.0:25565           0.0.0.0:*               LISTEN      1408/java
tcp        0      0 127.0.0.1:12319         0.0.0.0:*               LISTEN      605/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      980/mysqld
tcp6       0      0 :::22                   :::*                    LISTEN      493/sshd

Any idea what might go wrong? It seems to be a problem with turnkey or the minecraft server.

Hi.
After somegoogling I sit with the impression that Mojangs support of IPv6 is temperemetal at best.
I’ve readpost that claims htat IPv do not work, does work, works if server only accepts ipv6, works with both ipv6 and ipv4, works if you reconfigure server.properties and listening adress to “:::”. I have seen bugreports from mojangs Jira that is labeled “resolved”, and the minecraft wiki saying “if ipv4 do not work, try ipv6” withou any more description.

There is in other words lots of rumours and little official on the topic “Minecraft IPv6”.

As to why you server do not allow external connections over IPv6 on MineOS the following needs clarification:

  1. Do your MineOS host (the turnkey OS below MineOS) have an IPv6 address? : https://superuser.com/questions/468727/how-to-get-the-ipv6-ip-address-of-linux-machine

  2. Do your ISP actually support and allow assigning IPv6 addresses?

  3. Do your ISP-Modem / Switch / Router support IPv6, both internally (LAN) and externally (WAN)?

  4. Is your WAN to LAN routing set up to allow and route connections?

My ISP is giving out only ipv6 adresses. Our ipv4 is a shared one.
When typing in “ipconfig” in my windows console, i get two ipv6 entrys. and one is labeled temporary. Right now i am testing both on my windows maschine again. As long as i have the port 25565 portforwarded in my router, he is able to connect to the ipv6 on windows. I also read somewhere, that ipv6 is a direct adress, so portforwarding isnt needed, but that only seems to be a rumor.
He can connect to both ipv6.

When i type in “ifconfig” on the mineos i also get an ipv6 entry in the table. one is short and labeled /link, i think its the mask, and one is labeled global. But i cannot use it.

To sum up:

  1. My server got an ipv6 adress.

  2. My ISP assigns ipv6, is not so friendly with servers, but it should work and in a private scale it is allowed.

  3. My router only supports IPv6 forwarding! xD

  4. I set up the portforward to my server. The portforward was previously needed, so that others could connect to the testserver on my windows maschine.

I can’t get the netstat output, where it says “tcp6 :::25565 LISTEN” i ever only get the output with “0.0.0.0:25565”.
When i host the ipv6 server on my windows maschine, i just keep the empty ip tag in the server properties, others can still connect via ipv6.

Ah and it also says “connection refused” when i try to enter on ipv6 on the minecraft server. I made an ip6tables entry (you can see it in a link in the 4. post) but i am not quite sure, whether i hit the nail with it.

I made another test. I used an IPv6 port scan website. When i check my windows maschine 25565 port with the given IPv6 the site says it’s FILTERED, but not blocked. That kinda confirms the reachability.
When i check the minecraft server with it’s IPv6 it says BLOCKED. So it has to be something with turnkeyOS.

Something else i managed to accomplish is to let the webUI LISTEN via IPv6. I edited the mineos.conf. Nothing special, but i can still reach the webUI over the IPv4!

root@MinecraftServer ~# 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 492/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1276/master
tcp 0 0 127.0.0.1:12319 0.0.0.0:* LISTEN 602/shellinaboxd
tcp 0 0 0.0.0.0:12320 0.0.0.0:* LISTEN 604/stunnel4
tcp 0 0 0.0.0.0:12321 0.0.0.0:* LISTEN 604/stunnel4
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 980/mysqld
tcp6 0 0 :::22 :::* LISTEN 492/sshd
tcp6 0 0 :::8443 :::* LISTEN 1013/node

So i think we nailed it down to a java intern problem. I will search the web for more :slight_smile:

AHHHH i can host a pure vanilla server on IPv6! But my server was a forge one. So i have to find the problem in forge :smiley:

1 Like

So i found the problem.
Every forge version, which is older than 14.23.1.2556 for 1.12.2 has a line of code near the start of the programm, which says: java.net.preferIPv4Stack=true.
WHICH IS HILARIOUS!
So as long as you want to use forge and ipv6 you can only use it from 1.12.2 onwards.

I am still looking for a way to remove that line out of the forge code, because it is just one line of code with no penaltys. But the forge mods are quite stubborn and just tell me, that i am not qualified to modify my forge files, when i got some questions.

I am using 6tunnel now. It can establish a port forward from IPv6 to an IPv4 port. Needs some time to get it to work, but looks promising.

1 Like