lancachenet / lancache-dns

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

Restart on local Upstream DNS #72

Closed GodOfOwls closed 5 years ago

GodOfOwls commented 5 years ago

Issue Description: Stemcache-dns restarts when i use my local DNS as upstream. When i use a external Server as upstream everything works. My local DNS is a OPNsense Box with DNSmasq forwarding to 1.1.1.1, 8.8.8.8 and 9.9.9.9

Docker Run Command:

sudo docker run \
  --restart unless-stopped -d \
  --name steamcache-dns \
  --dns 192.168.0.1\
  -p 192.168.0.50:53:53/udp \
  -e UPSTREAM_DNS=192.168.0.1 \
  -e APPLECACHE_IP=192.168.0.100 \
  -e ARENANETCACHE_IP=192.168.0.101 \
  -e BLIZZARDCACHE_IP=192.168.0.102 \
  -e DAYBREAKCACHE_IP=192.168.0.103 \
  -e FRONTIERCACHE_IP=192.168.0.104 \
  -e HIREZCACHE_IP=192.168.0.105 \
  -e NEXUSMODSCACHE_IP=192.168.0.106 \
  -e NINTENDOCACHE_IP=192.168.0.107 \
  -e ORIGINCACHE_IP=192.168.0.108 \
  -e RENEGADEXCACHE_IP=192.168.0.109 \
  -e RIOTCACHE_IP=192.168.0.110 \
  -e ROCKSTARCACHE_IP=192.168.0.111 \
  -e SONYCACHE_IP=192.168.0.112 \
  -e STEAMCACHE_IP=192.168.0.113 \
  -e UPLAYCACHE_IP=192.168.0.114 \
  -e TWITCHCACHE_IP=192.168.0.115 \
  -e WARGAMINGCACHE_IP=192.168.0.116 \
  -e WSUSCACHE_IP=192.168.0.117 \
  -e XBOXLIVECACHE_IP=192.168.0.118 \
  steamcache/steamcache-dns:latest

Docker Container Output:

Bootstrapping DNS from https://github.com/uklans/cache-domains
     _                                      _                       _
    | |                                    | |                     | |
 ___| |_ ___  __ _ _ __ ___   ___ __ _  ___| |__   ___   _ __   ___| |_
/ __| __/ _ \/ _` | '_ ` _ \ / __/ _` |/ __| '_ \ / _ \ | '_ \ / _ \ __|
\__ \ ||  __/ (_| | | | | | | (_| (_| | (__| | | |  __/_| | | |  __/ |_
|___/\__\___|\__,_|_| |_| |_|\___\__,_|\___|_| |_|\___(_)_| |_|\___|\__|

configuring /etc/resolv.conf to stop from looping to ourself

Bootstrapping DNS from https://github.com/uklans/cache-domains
     _                                      _                       _
    | |                                    | |                     | |
 ___| |_ ___  __ _ _ __ ___   ___ __ _  ___| |__   ___   _ __   ___| |_
/ __| __/ _ \/ _` | '_ ` _ \ / __/ _` |/ __| '_ \ / _ \ | '_ \ / _ \ __|
\__ \ ||  __/ (_| | | | | | | (_| (_| | (__| | | |  __/_| | | |  __/ |_
|___/\__\___|\__,_|_| |_| |_|\___\__,_|\___|_| |_|\___(_)_| |_|\___|\__|

configuring /etc/resolv.conf to stop from looping to ourself

Bootstrapping DNS from https://github.com/uklans/cache-domains
     _                                      _                       _
    | |                                    | |                     | |
 ___| |_ ___  __ _ _ __ ___   ___ __ _  ___| |__   ___   _ __   ___| |_
/ __| __/ _ \/ _` | '_ ` _ \ / __/ _` |/ __| '_ \ / _ \ | '_ \ / _ \ __|
\__ \ ||  __/ (_| | | | | | | (_| (_| | (__| | | |  __/_| | | |  __/ |_
|___/\__\___|\__,_|_| |_| |_|\___\__,_|\___|_| |_|\___(_)_| |_|\___|\__|

configuring /etc/resolv.conf to stop from looping to ourself

Bootstrapping DNS from https://github.com/uklans/cache-domains
VibroAxe commented 5 years ago

**Edit

I am unable to reproduce this bug using your command line, are you sure your dns server is listening on 192.168.0.1

What is the output of cat /etc/resolv.conf on the host?

GodOfOwls commented 5 years ago

Yes i am sure the DNS Server is listening there since i use it at this moment. Heres the Output of cat /etc/resolv.conf

steamdns@steamdns-alpha:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search eulehome
steamdns@steamdns-alpha:~$
VibroAxe commented 5 years ago

can you run the following commands within the container (docker exec -it steamcache-dns bash) and post your results

GodOfOwls commented 5 years ago

Error response from daemon: Container b0ac32759a9dff7340100c1868844a78beddababdd49c0ac666775d1a5713c87 is restarting, wait until the container is running

It constantly restarts so there is no chance for me to do anything.

VibroAxe commented 5 years ago

Can you try the latest version?

yurividal commented 5 years ago

I have the same issue. running latest version. container keeps restarting if using -e UPSTREAM_DNS=192.168.36.13 192.168.36.14

VibroAxe commented 5 years ago

Try using only one DNS @yurividal

yurividal commented 5 years ago

@VibroAxe it seemed to have worked using a single local dns, but after 1 minute, lancache-dns is back to the bootloop

yurividal commented 5 years ago

Doing this seems to have solved it! I was able to use my local dns (primary and secondary) after following these steps: https://github.com/lancachenet/lancache-dns/issues/93#issuecomment-535783908