mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
CentOS Firewall fix
This commit is contained in:
parent
94dd5b1ebe
commit
570611fc09
1 changed files with 2 additions and 8 deletions
|
@ -764,14 +764,8 @@ create_pihole_user(){
|
|||
configureFirewall() {
|
||||
# Allow HTTP and DNS traffic
|
||||
if [ -x "$(command -v firewall-cmd)" ]; then
|
||||
firewall-cmd --state > /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "::: Configuring firewalld for httpd and dnsmasq.."
|
||||
firewall-cmd --permanent --add-port=80/tcp
|
||||
firewall-cmd --permanent --add-port=53/tcp
|
||||
firewall-cmd --permanent --add-port=53/udp
|
||||
firewall-cmd --reload
|
||||
fi
|
||||
firewall-cmd --state &> /dev/null && ( echo "::: Configuring firewalld for httpd and dnsmasq.." && firewall-cmd --permanent --add-port=80/tcp && firewall-cmd --permanent --add-port=53/tcp \
|
||||
&& firewall-cmd --permanent --add-port=53/udp && firewall-cmd --reload) || echo "::: FirewallD not enabled"
|
||||
elif [ -x "$(command -v iptables)" ]; then
|
||||
echo "::: Configuring iptables for httpd and dnsmasq.."
|
||||
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
|
||||
|
|
Loading…
Reference in a new issue