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

aAdGuardhome #86

Open
aiastia opened this issue Nov 6, 2024 · 0 comments
Open

aAdGuardhome #86

aiastia opened this issue Nov 6, 2024 · 0 comments

Comments

@aiastia
Copy link
Owner

aiastia commented Nov 6, 2024

为什么aAdGuardhome配置中开启了“重定向53端口到adguardhome”,AdGuardhome无法获取客户端的真实IP,而只能显示为localhost?
#iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
#iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
#[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
#[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
这几行iptables规则会将所有进入路由器的UDP/TCP 53端口流量重定向到本地(localhost)的53端口。由于重定向是在本地进行的,所以AdGuardhome收到的所有流量的源IP地址都将被重定向为localhost,导致Adguardhome客户端IP均显示为localhost 127.0.0.1。将这些防火墙规则加“#”注释或直接删除,再重启防火墙即可。

https://www.right.com.cn/forum/thread-8282165-1-1.html

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