-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
How to display the client IP in the log? #4132
Comments
I also encountered this problem. The local host IP is displayed, and the client IP is not displayed |
@gzlearm I perused the AdguardHome Wiki again and found the answer. Since v0.107.0 AdGuard Home is able to restrict DNS-over-HTTPS requests which came from the proxy server not included into "trusted" list. By default, it's configured to accept requests from IPv4 and IPv6 loopback addresses. To enable AdGuard Home to handle DNS-over-HTTPS requests from a reverse proxy server, set the trusted_proxies setting in AdGuardHome.yaml to the IP address of the proxy server. If you have several proxy servers, you can use a CIDR instead of a simple IP address. 1.Editing AdGuardHome.yaml 2.Add your VPS IP address to trusted_proxies Now it's working fine |
This didn't work for me. All requests seem to be coming from 10.0.0.2 I edited the AdguardHome.yaml and added this to trusted proxies below the existing ones which then looked like:
I also tried adding 10.0.0.0/8 |
Any possible cause why this fix doesn't work for me? I checked nginx proxy conf and it looks ok:
|
My problem turned out to be caused by Firewall. I have Endian Firewall in front of the VPS and installed AdGuard Home on a container on this VPS. All the clients except of DoH seem to be having IP 10.0.0.2 which is actually the Endian Firewall's local IP. I tried adding this to DNS servers:
This So now.. How to configure when behind a firewall? |
I installed v:0.107.2 using docker on VPS machine.
docker run --name adguardhome
--restart unless-stopped
-v /my/own/workdir:/opt/adguardhome/work
-v /my/own/confdir:/opt/adguardhome/conf
-p 53:53/tcp -p 53:53/udp
-p 4433:4433/tcp -p 4433:4433/udp -p 3000:3000/tcp
-p 853:853/tcp -p 853:853/udp
-d adguard/adguardhome
Port: 4433 for DOH, using nginx reverse proxy,
Now only the IP of the VPS is displayed, and the IP of the client in the log will not be displayed.

Read: DNS-over-HTTPS queries now use the real IP address of the client instead of the address of the proxy (#2799).I've tried various methods, but I can't solve it.
The text was updated successfully, but these errors were encountered: