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

adguard not resolving #49

Closed
pjdog opened this issue Jan 6, 2024 · 6 comments
Closed

adguard not resolving #49

pjdog opened this issue Jan 6, 2024 · 6 comments
Labels
question Further information is requested

Comments

@pjdog
Copy link

pjdog commented Jan 6, 2024

This is probably my own issue but I can't seem to get the adguard hostname/ip to resolve. I have tried looking for dhcp settings I'm missing or something similar, but an numeric or url or ip address I try in the .env doesn't resolve. There are no issues in the container logs for docker. If its something I'm missing, perhaps just giving an example of how to do it correctly would help in the readme! Not sure whats happening exactly, and thank you for the help, and this repo.

@AdrienPoupa
Copy link
Owner

Hi there, I'm not sure to understand the "not resolving"; are you talking about the Adguard Home dashboard itself or websites not resolving due to a DNS issue after setting Adguard Home as your resolver?

@AdrienPoupa AdrienPoupa added the question Further information is requested label Jan 7, 2024
@pjdog
Copy link
Author

pjdog commented Jan 10, 2024

Sorry I've spent some time making sure I haven't missed something. Thank you again for your help.

For some reason I can't as you said get the web ui to resolve, and cant reach adguard home. I'm running on a mac which may be part of the reason, but I have an ethernet and a wifi connection. I've tried setting the adguardhome address to the ip of either of those. I've only once been able to reach the adguard setup page. I cannot for the life of me figure out why they wont resolve. I believe it has something to do with the way mac interacts with the vpn and ethernet adaper. Here are the relevant logs from the failing dhcp container2024-01-09 20:50:30 exiting. 2024-01-09 20:51:30 Requesting: enp2s0 as upstream: N downstream: Y 2024-01-09 20:51:30 Requesting: br_adguard as upstream: Y downstream: N 2024-01-09 20:51:30 Internet Systems Consortium DHCP Relay Agent 4.4.3-P1 2024-01-09 20:51:30 Copyright 2004-2022 Internet Systems Consortium. 2024-01-09 20:51:30 All rights reserved. 2024-01-09 20:51:30 For info, please visit https://www.isc.org/software/dhcp/ 2024-01-09 20:51:30 Listening on LPF/br_adguard/02:42:80:91:01:fd 2024-01-09 20:51:30 Sending on LPF/br_adguard/02:42:80:91:01:fd 2024-01-09 20:51:30 Failed to get interface index: No such device

@AdrienPoupa
Copy link
Owner

Thanks for the details, I think this makes sense: Failed to get interface index: No such device. On Mac, there is no enp2s0 network interface, it will usually be one of enX. You may use ifconfig to determine which one you are using, and replace enp2s0.

@pjdog
Copy link
Author

pjdog commented Jan 10, 2024

I think theres an additional piece of information still missing. I think mac dockers interacts with the virtual machine interfaces. I have two interfaces to the machine this is running on, ethernet en3 and wifi en0. Both give the same log in dhcp except replacing enp2s0 in the message with the other two. I think only eth0 is available in a docker container for mac. I verified that by going into the containers and running ifconfig. Heres the documentation: https://docker-docs.uclv.cu/docker-for-mac/networking/#:~:text=Known%20limitations%2C%20use%20cases%2C%20and%20workarounds%20%F0%9F%94%97%201,two%20scenarios%20that%20the%20above%20limitations%20affect%3A%20

I changed that line to replace enp2s0 with eth0 and now the dhcp container is no longer constantly unhealthy and restarting. However; we still have only a response of 502 bad gateway when you actually go to the url/ip of the adguardhome. I think I need to reclone this repo and pruin any images to make sure I'm not carrying along wrong info (for example I've changed the ip since I made the letsencrypt acme.json). Then I think i'll have to change the rest of the containers to fit the port mapping detailed on the above link

@pjdog
Copy link
Author

pjdog commented Jan 10, 2024

Also I really appreciate you coming back and helping multiple times. I will submit the changes necessary into a commit changing the README.md detailing how I got this working if I ever do.

@AdrienPoupa
Copy link
Owner

In theory, network_mode: host should make the host network interfaces available in Docker, but it looks like it does not work on Windows and Mac: https://docs.docker.com/network/drivers/host/

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

As a workaround, I'd disable DHCP in Mac/Windows installations and use a native DHCP server if needed, or use the one in your router.

I don't think the bad gateway in Adguard Home is related though, are there other logs?

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

No branches or pull requests

2 participants