AdguardTeam/AdGuardHome
View on GitHubDocker Containers can connect to AdGuard GUI but Unable to Resolve via host IP
Open
#6,442 opened on Nov 19, 2023
dockerhelp wantedwaiting for data
Description
Prerequisites
-
I have checked the Wiki and Discussions and found no answer
-
I have searched other issues and found no duplicates
-
I want to report a bug and not ask a question or ask for help
-
I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Linux, AMD64 (aka x86_64)
Installation
Docker
Setup
On one machine
AdGuard Home version
v0.107.41
Action
Please bear with me on this. It's a confusing issue.
First of all, adguard docker-compose.yml:
version: "3.9"
services:
adguardhome:
image: adguard/adguardhome
container_name: adguardhome
ports:
- 53:53/tcp
- 53:53/udp
- 3000:3000/tcp
- 3001:80/tcp
- 3002:8902/tcp
volumes:
- ./conf:/opt/adguardhome/conf
- ./data:/opt/adguardhome/work
restart: always
network_mode: bridge
Pretty vanilla setup.
The host IP here is 192.168.25.81.
user@192.168.25.81$ nslookup google.com 192.168.25.81
<success>
# now try to resolve from another docker container:
user@192.168.25.81:~/docker-configs/mosquitto$ docker compose exec mosquitto nslookup google.com 192.168.25.81
;; connection timed out; no servers could be reached
# however, the adguard container can still be reached on different ports.. why is that??
user@192.168.25.81:~/docker-configs/mosquitto$ docker compose exec mosquitto wget 192.168.25.81:3001 -O -
Connecting to 192.168.25.81:3001 (192.168.25.81:3001)
writing to stdout
<!doctype html><html lang="en"><head><meta charset="utf-8"><me.... (snip)
### Expected result
I should be able to use the host IP to resolve from other containers. Since it can connect to the GUI, why can't it connect to the DNS server on port 53?
### Actual result
See above. Thank you!
### Additional information and/or screenshots
_No response_