dnsmasq now uses 5353 port and we redirect requests from 53 to 5353.
Fixes #96
This commit is contained in:
16
create_ap
16
create_ap
@ -740,8 +740,14 @@ _cleanup() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$SHARE_METHOD" != "bridge" ]]; then
|
if [[ "$SHARE_METHOD" != "bridge" ]]; then
|
||||||
iptables -w -D INPUT -p tcp -m tcp --dport 53 -j ACCEPT
|
if [[ $NO_DNS -eq 0 ]]; then
|
||||||
iptables -w -D INPUT -p udp -m udp --dport 53 -j ACCEPT
|
iptables -w -D INPUT -p tcp -m tcp --dport 5353 -j ACCEPT || die
|
||||||
|
iptables -w -D INPUT -p udp -m udp --dport 5353 -j ACCEPT || die
|
||||||
|
iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
|
||||||
|
-p tcp -m tcp --dport 53 -j REDIRECT --to-ports 5353 || die
|
||||||
|
iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
|
||||||
|
-p udp -m udp --dport 53 -j REDIRECT --to-ports 5353 || die
|
||||||
|
fi
|
||||||
iptables -w -D INPUT -p udp -m udp --dport 67 -j ACCEPT
|
iptables -w -D INPUT -p udp -m udp --dport 67 -j ACCEPT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1708,9 +1714,13 @@ fi
|
|||||||
# start dhcp + dns (optional)
|
# start dhcp + dns (optional)
|
||||||
if [[ "$SHARE_METHOD" != "bridge" ]]; then
|
if [[ "$SHARE_METHOD" != "bridge" ]]; then
|
||||||
if [[ $NO_DNS -eq 0 ]]; then
|
if [[ $NO_DNS -eq 0 ]]; then
|
||||||
DNS_PORT=53
|
DNS_PORT=5353
|
||||||
iptables -w -I INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT || die
|
iptables -w -I INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT || die
|
||||||
iptables -w -I INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT || die
|
iptables -w -I INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT || die
|
||||||
|
iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
|
||||||
|
-p tcp -m tcp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die
|
||||||
|
iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
|
||||||
|
-p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die
|
||||||
else
|
else
|
||||||
DNS_PORT=0
|
DNS_PORT=0
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user