We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 ,直接查询 8.8.8.8、114.114.114.114,然后也会被重定向成 8.8.8.8$FORWARD_DNS_REDIRECT,稍微改一下好像可以解决这种问题。
ip daddr \$LOCAL_SUBNET tcp dport 53 dnat $FORWARD_DNS_REDIRECT ip daddr \$LOCAL_SUBNET udp dport 53 dnat $FORWARD_DNS_REDIRECT
另外想请教一下,如果是tproxy 转发tcp,udp 还是tun处理,应该怎么写?下面的写法测试了一下发现没有生效。
table clash { chain forward { type filter hook prerouting priority 0; policy accept; ip protocol != { tcp, udp } accept iif utun accept ip daddr \$LOCAL_SUBNET accept ip protocol udp mark set $NETFILTER_MARK accept ip protocol tcp tproxy to 127.0.0.1$FORWARD_PROXY_REDIREC } chain forward-dns-redirect { type nat hook prerouting priority 0; policy accept; ip protocol != { tcp, udp } accept ip daddr \$LOCAL_SUBNET tcp dport 53 dnat $FORWARD_DNS_REDIRECT ip daddr \$LOCAL_SUBNET udp dport 53 dnat $FORWARD_DNS_REDIRECT } }
The text was updated successfully, but these errors were encountered:
我测试下来发现,有的应用会无视系统 DNS ,直接查询 8.8.8.8、114.114.114.114,然后也会被重定向成 8.8.8.8$FORWARD_DNS_REDIRECT,稍微改一下好像可以解决这种问题。 ip daddr \$LOCAL_SUBNET tcp dport 53 dnat $FORWARD_DNS_REDIRECT ip daddr \$LOCAL_SUBNET udp dport 53 dnat $FORWARD_DNS_REDIRECT 另外想请教一下,如果是tproxy 转发tcp,udp 还是tun处理,应该怎么写?下面的写法测试了一下发现没有生效。 table clash { chain forward { type filter hook prerouting priority 0; policy accept; ip protocol != { tcp, udp } accept iif utun accept ip daddr \$LOCAL_SUBNET accept ip protocol udp mark set $NETFILTER_MARK accept ip protocol tcp tproxy to 127.0.0.1$FORWARD_PROXY_REDIREC } chain forward-dns-redirect { type nat hook prerouting priority 0; policy accept; ip protocol != { tcp, udp } accept ip daddr \$LOCAL_SUBNET tcp dport 53 dnat $FORWARD_DNS_REDIRECT ip daddr \$LOCAL_SUBNET udp dport 53 dnat $FORWARD_DNS_REDIRECT } }
tproxy 我也没搞定,我也不是很熟悉nftables,也是摸索着写。谢谢提供的修改,看到晚了很抱歉。
Sorry, something went wrong.
另外还有一个问题就是,不确定alpine linux 里面的 nftable 可以使用 tproxy,曾经尝试过,忘记了是卡在哪一步就放弃了。。。感觉 tun + redir 的模式性能还可以就没再往下研究了
update nftable rules #1
b695723
No branches or pull requests
我测试下来发现,有的应用会无视系统 DNS ,直接查询 8.8.8.8、114.114.114.114,然后也会被重定向成 8.8.8.8$FORWARD_DNS_REDIRECT,稍微改一下好像可以解决这种问题。
另外想请教一下,如果是tproxy 转发tcp,udp 还是tun处理,应该怎么写?下面的写法测试了一下发现没有生效。
The text was updated successfully, but these errors were encountered: