Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #304 from garywill/patch-1
Browse files Browse the repository at this point in the history
fix dns_port hard code in cleaning()
  • Loading branch information
oblique committed Dec 24, 2017
2 parents b8df69a + 648fb69 commit f906559
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions create_ap
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ ADDN_HOSTS=
DHCP_DNS=gateway
NO_DNS=0
NO_DNSMASQ=0
DNS_PORT=
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
Expand Down Expand Up @@ -760,12 +761,12 @@ _cleanup() {

if [[ "$SHARE_METHOD" != "bridge" ]]; then
if [[ $NO_DNS -eq 0 ]]; then
iptables -w -D INPUT -p tcp -m tcp --dport 5353 -j ACCEPT
iptables -w -D INPUT -p udp -m udp --dport 5353 -j ACCEPT
iptables -w -D INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT
iptables -w -D INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT
iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
-p tcp -m tcp --dport 53 -j REDIRECT --to-ports 5353
-p tcp -m tcp --dport 53 -j REDIRECT --to-ports $DNS_PORT
iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \
-p udp -m udp --dport 53 -j REDIRECT --to-ports 5353
-p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT
fi
iptables -w -D INPUT -p udp -m udp --dport 67 -j ACCEPT
fi
Expand Down

0 comments on commit f906559

Please sign in to comment.