itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.19k stars 224 forks source link

Listening on localhost but not on network ip #451

Closed masrudyn closed 2 months ago

masrudyn commented 2 months ago

hi, any reason why the container is listening on 127.0.0.1 only and not on my server ip ? I have other containers running with no issues. I am using docker-compose to start the service. Should not matter right ?

version: '3.3' services: bds: image: itzg/minecraft-bedrock-server environment: EULA: "TRUE" ports:

itzg commented 2 months ago

Why do you think it's listening on 127.0.0.1?

masrudyn commented 2 months ago

I can telnet to port 19132 when using 127.0.1.1 but not on my ip:

$ telnet debian 19132 Trying 127.0.1.1... Connected to debian. Escape character is '^]'. Connection closed by foreign host.

$ telnet 192.168.1.92 19132 Trying 192.168.1.92... telnet: Unable to connect to remote host: Connection refused

I can ping to my ip (I also have other containers that I can connect to other port used by those containers): $ ping 192.168.1.92 PING 192.168.1.92 (192.168.1.92) 56(84) bytes of data. 64 bytes from 192.168.1.92: icmp_seq=1 ttl=64 time=0.098 ms 64 bytes from 192.168.1.92: icmp_seq=2 ttl=64 time=0.081 ms

itzg commented 2 months ago

Bedrock only uses UDP. Telnet is connecting with TCP not UDP. Run docker ps to see what network interface your port mappings are bound to.

masrudyn commented 2 months ago

It is mapped to 0.0.0.0. You are right ! I can connect to it from the game. I thought I needed to check if the port is opened.

Thank you so much!! :-)

340a375f8ab3 itzg/minecraft-bedrock-server "/usr/local/bin/entr…" 16 hours ago Up 16 hours (healthy) 0.0.0.0:19132->19132/tcp, 0.0.0.0:19132->19132/udp, :::19132->19132/tcp, :::19132->19132/udp itzg_bds_1