Open keigel2001 opened 6 years ago
This is an issue (feature) with docker not with this container. Using the hostnetwork is currently the only solution, but should be fine.
Do you know how this "feature" is called? Are they (docker) aware of this issue? Why is the readme of the teamspeak docker images then advising to use the bridged mode, when it's not fully working? Maybe there should be at least a notice to this issue and how to avoid it.
This is part of the network isolation for every container. When you publish ports --publish
, a proxy forwards all traffic for this specific port from host to container. In this process all origin ips getting lost and you will only see the containers std gateway ip.
The bridge mode
is the default network configuration for every container and its different from the host mode
.
Further informations: https://docs.docker.com/network/host/
And i'm also voting for some documentation cause client ips are essential for bans etc.
You can run your container in host mode
as already mentioned by @cebor or alternatively enable forwarding in bridge mode
.
Further information: https://docs.docker.com/network/bridge/#enable-forwarding-from-docker-containers-to-the-outside-world
This is an issue (feature) with docker not with this container. Using the hostnetwork is currently the only solution, but should be fine.
@cebor Actually you can use https://github.com/robbertkl/docker-ipv6nat when you want working IPv6 while connecting to an IPv6 address
What about the database itself?? I still want to have it running inside a container on its network but cannot configure TS3 container to use different port for the database.. Any ideas how to make it work? Tried:
TS3SERVER_DB_PORT: XXX <- not respected
TS3SERVER_DB_HOST: IP:PORT <- doesnt work as well
EDIT: This also doesn't work: https://docs.docker.com/network/bridge/#enable-forwarding-from-docker-containers-to-the-outside-world
@cebor Well I dont agree.. Explain to me how I am supposed to make this setup work if I already have a mysql DB on the host running on the default port? Your dockerized image does not allow to change port of the DB and it doesn't work when specified in the TS3SERVER_DB_HOST: IP:PORT
..
This is the limitation of the TeamSpeak not the docker containers.. If you can reach public services within the container you should be able to determine the public IPs users are coming from. Simple as that. This issue has been open for almost 9 months, please make some progress on that.
TS version 3.5.1 Docker version 18.09 I've just ran into the issue. I haven't seen the problem before on version 3.1. If a user joined for the first time or he was disconnected for a few hours he gets his public IP but if he reconnects he has a local ip (172.20.0.1).
EDIT: This also doesn't work: https://docs.docker.com/network/bridge/#enable-forwarding-from-docker-containers-to-the-outside-world
I agree with it. Changing to host-mode is the only solution
User docker run --net=host ...
https://docs.docker.com/network/host/
I have the same problem. Cause I can't/don't wanna join the db
container into the host
network (security reasons), I can't join the teamspeak
container into the host
network (cause you can't join e.g. the host
network and a second network at the same time). Therefore we need another solution, how to get client's ip addresses into the teamspeak
container.
Same issue while hosting over Traefik with Docker Swarm
@ProteanCode I ran into the same issue when deploying Teamspeak into my swarm. I also use traefik but you won't need it here. The solution was to set up proper port forwarding.
ports:
- target: 9987
published: 9987
protocol: udp
mode: host
@ProteanCode I ran into the same issue when deploying Teamspeak into my swarm. I also use traefik but you won't need it here. The solution was to set up proper port forwarding.
ports: - target: 9987 published: 9987 protocol: udp mode: host
Yeah but mode: host makes both traefik and swarm useless, you can run it using docker-compose or plain docker command. Anyway I have used that solution since I have TS hosted on single node anyway
@mikilian @ProteanCode So you both are do the same for the DB container?
@mikilian @ProteanCode So you both are do the same for the DB container?
I use file storage for that, afaik its sqlite?
@flothemaker No, I only do this for the container where teamspeak is located. Also don't link the network where traefik is located, but a separate one intended for the use of the mysql server. I also don't see why anything should be useless here.
@ProteanCode I ran into the same issue when deploying Teamspeak into my swarm. I also use traefik but you won't need it here. The solution was to set up proper port forwarding.
ports: - target: 9987 published: 9987 protocol: udp mode: host
this is working perfectly! no need to put the whole container in anotehr network
@ProteanCode I ran into the same issue when deploying Teamspeak into my swarm. I also use traefik but you won't need it here. The solution was to set up proper port forwarding.
ports: - target: 9987 published: 9987 protocol: udp mode: host
this is working perfectly! no need to put the whole container in anotehr network
Also tried this, but then connection via ipv6 is not possible.
This comment here seems to fix the issue: https://github.com/moby/moby/issues/16720#issuecomment-444862701
TL;DR: conntrack -D -p udp
after the container has started fixes the issue
When showing the client information of connected clients in teamspeak, it's showing the wrong ip. It's showing 172.17.0.1. All clients are connecting from 172.17.0.1. This is actually the gateway-ip of docker (you can look it up with docker inspect containername)
I had the same problem with multiple other teamspeak docker images for the last months. I even installed a VM with just debian stretch and docker on it to test if another application is interfering. Same problem. It's not happening everytime, but very often. Seems like a round-robin thing or sth.
Only solution I've found was changing the docker --network to host. But that's not the greatest solution in terms of security.