lancachenet / lancache-dns

DNS Docker service for a lancache.
https://hub.docker.com/r/lancachenet/lancache-dns/
MIT License
282 stars 74 forks source link

Cant map port 53 #39

Closed agassparkle closed 5 years ago

agassparkle commented 6 years ago

Issue Description: Cant map port 53

Docker Run Command: docker run --name steamcache-dns -p 53:53/udp -e STEAMCACHE_IP=$STEAMCACHE_IP steamcache/steamcache-dns

docker run --name steamcache-dns -p 53:53/udp -e STEAMCACHE_IP=$STEAMCACHE_IP steamcache/steamcache-dns

Docker Container Output: docker: Error response from daemon: driver failed programming external connectivity on endpoint steamcache-dns (4d2f5a9245e16928e952f4a7344fe7de08f70c7172c7cb6440dbc321213fd5b4): Error starting userland proxy: listen udp 0.0.0.0:53: bind: address already in use. ERRO[0001] error waiting for container: context canceled

matthewh86 commented 6 years ago

run sudo lsof -i :53 to see what process is using it. then research whether you should kill it.

if you're using Ubuntu 18.04 LTS, it has its own DNS running (dnsmasq) already which you'll need to disable.

alternatively, use this docker-compose to bring them all up

https://github.com/noxtech/gamecache-docker-compose

stuff to customize:

JasonRivers commented 6 years ago

This is a problem with dnsmasq, if you use the IP in your -p flag, you should be OK:

docker run --name steamcache-dns -p 192.168.0.100:53:53 -e STEAMCACHE_IP=$STEAMCACHE_IP steamcache/steamcache-dns

Without defining an IP on the command line, it will try and listen on all interfaces (including loopback devices)

We have also just published a compose file to set most of this up for you, it will run a full-stack cache and run everything on a single IP using a reverse proxy: https://github.com/steamcache/docker-compose