mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-10 16:10:56 +00:00
add udp port 53 to iptables/firewalld configuration
This commit is contained in:
parent
97737ee9e3
commit
d0b6ff2d08
@ -749,12 +749,14 @@ configureFirewall() {
|
|||||||
$SUDO echo "::: Configuring firewalld for httpd and dnsmasq.."
|
$SUDO echo "::: Configuring firewalld for httpd and dnsmasq.."
|
||||||
$SUDO firewall-cmd --permanent --add-port=80/tcp
|
$SUDO firewall-cmd --permanent --add-port=80/tcp
|
||||||
$SUDO firewall-cmd --permanent --add-port=53/tcp
|
$SUDO firewall-cmd --permanent --add-port=53/tcp
|
||||||
|
$SUDO firewall-cmd --permanent --add-port=53/udp
|
||||||
$SUDO firewall-cmd --reload
|
$SUDO firewall-cmd --reload
|
||||||
fi
|
fi
|
||||||
elif [ -x "$(command -v iptables)" ]; then
|
elif [ -x "$(command -v iptables)" ]; then
|
||||||
$SUDO echo "::: Configuring iptables for httpd and dnsmasq.."
|
$SUDO echo "::: Configuring iptables for httpd and dnsmasq.."
|
||||||
$SUDO iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
|
$SUDO iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
|
||||||
$SUDO iptables -A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
|
$SUDO iptables -A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
|
||||||
|
$SUDO iptables -A INPUT -p tcp -m udp --dport 53 -j ACCEPT
|
||||||
else
|
else
|
||||||
$SUDO echo "::: No firewall detected.. skipping firewall configuration."
|
$SUDO echo "::: No firewall detected.. skipping firewall configuration."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user