Closed M1ke closed 4 years ago
Could be this issue https://stackoverflow.com/questions/44048915/unable-to-access-docker-containers-from-host-over-macvlan-network
Would it work if you declared a private docker network with two steamcache-dns
running?
E.g.
version: '2'
services:
gamecache-dns-ext:
image: steamcache/steamcache-dns:latest
container_name: gamecache-dns
ports:
- "53"
environment:
- USE_GENERIC_CACHE=true
- LANCACHE_IP=192.168.1.240
- UPSTREAM_DNS=8.8.8.8
networks:
external_vlan:
ipv4_address: 192.168.1.253
restart: unless-stopped
gamecache-dns-int:
image: steamcache/steamcache-dns:latest
container_name: gamecache-dns
ports:
- "53:53"
environment:
- USE_GENERIC_CACHE=true
- LANCACHE_IP=172.18.0.240
- UPSTREAM_DNS=8.8.8.8
networks:
- internal_lan
restart: unless-stopped
steamcache:
image: steamcache/generic:latest
container_name: steamcache
ports:
- "80"
environment:
- CACHE_MEM_SIZE=1024m
- CACHE_DISK_SIZE=1024g
networks:
external_vlan:
ipv4_address: 192.168.1.240
internal_vlan:
ipv4_address: 172.18.0.240
restart: unless-stopped
networks:
external_vlan:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 192.168.1.0/24
internal_lan:
ipam:
config:
- subnet: 172.18.0.0/16
I haven't tested this with steamcache-dns and steamcache, but should work since internal_lan has pingable IPs.
@matthewh86 did you solve this? I've not seen this anywhere else which implies it's an oddity of how you've configured docker/your network
Closing due to inactivity, feel free to reopen if there is still something you think we can help with.
Issue Description:
Having installed the DNS resolver on a server, other clients on the network using this server and the docker container as their DNS resolver work correctly to resolve DNS.
However trying a command e.g.
host google.com 192.168.1.253
orhost cs.steampowered.com 192.168.1.253
to direct a DNS resolution at the docker container from the server itself fails. I.e. if the server itself wants to access Steam, it will go via the internet not the cache, however if any separate machines using the DNS want to access the cache it will work.I appreciate maybe there's some more network config required here, but this would be very useful to have documented, as otherwise one can run the container, test it using
host
(a really clear way to test DNS on a server) and it seems to fail.Docker Run Command: