Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS queries fail inside Docker containers on same host as AGH #5602

Closed
3 tasks done
samcro1967 opened this issue Mar 16, 2023 · 1 comment
Closed
3 tasks done

DNS queries fail inside Docker containers on same host as AGH #5602

samcro1967 opened this issue Mar 16, 2023 · 1 comment

Comments

@samcro1967
Copy link

samcro1967 commented Mar 16, 2023

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

Operating system type

Linux, Other (please mention the version in the description)

CPU architecture

AMD64

Installation

Docker

Setup

On one machine

AdGuard Home version

v0.107.26

Description

What did you do?

AGH is running on two Linux hosts (host1 and host2) in docker containers. From either host, I am able to do nslookups against both host1 and host2 and get the correct responses. If I docker exec into a container on host1 and run the same tests, the DNS query fails to host1 and succeeds to host2. The same happens on host 2. DNS queries inside a container on host2 to host1 succeed and fail to host2.

From host1, dig +tcp @host1 test.local returns the correct result from inside a Docker container.

I see the source IP address is an internal Docker IP instead of the container IP of 192.168.1.104. I tried setting the bind_hosts in AdGuardHome.yaml to 192.168.1.104, but that had no impact.

Not sure if I am missing or if somethign isn't working correctly. Hoping someone can help.

Expected result

From host 1
docker exec -it adguardhome /bin/sh
nslookup test.local host1
Returns correct value

Actual result

;; reply from unexpected source: 172.18.0.1#53, expected 192.168.1.104#53

Additional information

OS: Ubuntu 22.04
Docker: 23.0.1
Docker image: adguard/adguardhome:latest

@samcro1967
Copy link
Author

Putting the AGH container on the Docker host network instead of a bridge network works as expected.

Maybe DNS resolution in containers with AGH also in a Docker container all on the same host and bridge network is not a supported configuration???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant