dnsmasq: support DNS redirect for IPv6
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> (cherry picked from commit 7535adf0d1f4252f00f7c0ca0d03903a71543671)
This commit is contained in:
parent
e8492b9f83
commit
c8b98241ee
@ -1117,7 +1117,10 @@ dnsmasq_start()
|
||||
|
||||
config_get_bool dns_redirect "$cfg" dns_redirect 0
|
||||
config_get dns_port "$cfg" port 53
|
||||
[ "$dns_redirect" = 1 ] && iptables -t nat -A PREROUTING -m comment --comment "DNSMASQ" -p udp --dport 53 -j REDIRECT --to-ports $dns_port
|
||||
if [ "$dns_redirect" = 1 ]; then
|
||||
iptables -t nat -A PREROUTING -m comment --comment "DNSMASQ" -p udp --dport 53 -j REDIRECT --to-ports $dns_port
|
||||
[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -m comment --comment "DNSMASQ" -p udp --dport 53 -j REDIRECT --to-ports $dnsport
|
||||
fi
|
||||
}
|
||||
|
||||
dnsmasq_stop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user