mojira.dev
MCPE-234659

IPv6 port vs ipv4 port causing connection failures

Bedrock server supports client access over both IPv4 and IPv6. However, it does not appear to be possible to have the server (I’m using linux via https://github.com/itzg/docker-minecraft-server ) listen on the same port 19132 for both IPv4 and IPv6 - it forces you to use a second port for IPv6, typically 19133. If you have a dual-stacked minecraft server (serves both A and AAAA records), configuring the server with the DNS name rather than the IP results in a failure for those with IPv6 available, because it requires you to set a port in the client/it is not smart enough to do the correct thing automatically.

Setup:

bedrock server with IPv4 listening on 19132 and IPv6 listening on 19133. In DNS as mybedrockserver.example.com. Responds with IPv4 or IPv6 address depending on which is queried.

client with IPv4-only - set up as “mybedrockserver.example.com, 19132” - works

client with IPv4-only - set up as “mybedrockserver.example.com 19133” - fails because this port is not listening for IPv4 connections

client with IPv4 and IPv6 - set up as “mybedrockserver.example.com, 19132” - tries to connect via IPv6, but fails because this port is not listening for IPv6 connections.

client with IPv4 and IPv6 - set up as “mybedrockserver.example.com 19133” - connects successfully to IPv6

If one attempts to set up server.properties with server-portv6=19132, and server-port=19132, the server refuses to start with the error: “Port [19132] may be in use by another process. Free up port and re-run program or adjust server.properties file to use alternate ports for server”

Expected behavior/possible solution:

If use of a different port for IPv4 vs IPv6 is required, do not require port to be specified in client, and let the client connect to the correct port (19132 for IPv4 or 19133 for IPv6) based on which address is provided if a port is not specified.

or -

Allow configuration in server.properties to allow system to listen for both IPv4 and IPv6 connections on the same port, which is a completely standard configuration for any dual-stack server.
or -

implement a standard happy eyeballs mechanism so that client attempts to connect via IPv6 if available, but falls back to IPv4 without user intervention if that fails.

Comments 0

No comments.

Wesley George

(Unassigned)

Unconfirmed

Multiple

1.21.131 Hotfix

Retrieved