mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 06:08:21 +00:00
Warn with whiptail if firewall-cmd
is running.
This commit is contained in:
parent
62a5e36afd
commit
f7a17248b7
@ -865,8 +865,10 @@ create_pihole_user() {
|
||||
|
||||
configureFirewall() {
|
||||
# Allow HTTP and DNS traffic
|
||||
if firewall-cmd --state &> /dev/null; then
|
||||
echo "::: Configuring FirewallD for httpd and dnsmasq.."
|
||||
if [[ $(firewall-cmd --state) == "running" ]]; then
|
||||
whiptail --title "Firewall in use" --yesno "We have detected a running firewall\n\nPi-hole currently requires HTTP and DNS port access.\n\n\n\nInstall Pi-hole default firewall rules?" ${r} ${c} || \
|
||||
{ echo -e ":::\n::: Not installing firewall rulesets."; return 1; }
|
||||
echo -e ":::\n:::\n Configuring FirewallD for httpd and dnsmasq."
|
||||
firewall-cmd --permanent --add-port=80/tcp --add-port=53/tcp --add-port=53/udp
|
||||
firewall-cmd --reload
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user