mirror of
https://github.com/kforney/pentest-distro-builder.git
synced 2024-11-22 01:50:56 -07:00
Update firewalld script.
Former-commit-id: ec1c5210d0e8a718e5123171b902f41544f12945 Former-commit-id: c0c73f48091837dc704a3d7c56028264738a09b5
This commit is contained in:
parent
ef281ce6ea
commit
cc7f45e70c
1 changed files with 13 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# init
|
# init
|
||||||
|
function pause(){
|
||||||
|
echo 'Press any key to continue...'; read -p "$*"
|
||||||
|
}
|
||||||
clear
|
clear
|
||||||
OPTION=$(whiptail --backtitle "Option Menu" \
|
OPTION=$(whiptail --backtitle "Option Menu" \
|
||||||
--title "FirewallD Menu" \
|
--title "FirewallD Menu" \
|
||||||
|
@ -10,9 +13,9 @@ clear
|
||||||
"4." "Firewall Reload........... Reload firewall" \
|
"4." "Firewall Reload........... Reload firewall" \
|
||||||
"5." "Firewall Status........... Show open services and ports" \
|
"5." "Firewall Status........... Show open services and ports" \
|
||||||
"6." "Firewall State............ Run status" \
|
"6." "Firewall State............ Run status" \
|
||||||
"7." "Firewall Services......... Show services" \
|
"7." "Firewall Open RDP......... Open 3389" \
|
||||||
"8." "Firewall Open RDP........ Open 3389" \
|
"8." "Firewall Open Web Server.. Open http/https" \
|
||||||
"9." "Firewall Open Web Server.. Open http/https" \
|
"9." "Firewall Reset to Default. Close http/https/3389" \
|
||||||
"10." "Firewall Panic On......... ENABLE PANIC MODE" \
|
"10." "Firewall Panic On......... ENABLE PANIC MODE" \
|
||||||
"11." "Firewall Panic Off........ DISABLE PANIC MODE" \
|
"11." "Firewall Panic Off........ DISABLE PANIC MODE" \
|
||||||
"12." "Firewall Panic Status..... Check panic mode status" \
|
"12." "Firewall Panic Status..... Check panic mode status" \
|
||||||
|
@ -30,15 +33,18 @@ case "$OPTION" in
|
||||||
pause;;
|
pause;;
|
||||||
6.) firewall-cmd --state
|
6.) firewall-cmd --state
|
||||||
pause;;
|
pause;;
|
||||||
7.) firewall-cmd --get-services
|
7.) firewall-cmd --add-port=3389/tcp --permanent
|
||||||
pause;;
|
|
||||||
8.) firewall-cmd --add-port=3389/tcp --permanent
|
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
pause;;
|
pause;;
|
||||||
9.) firewall-cmd --add-service=http --permanent
|
8.) firewall-cmd --add-service=http --permanent
|
||||||
firewall-cmd --add-service=https --permanent
|
firewall-cmd --add-service=https --permanent
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
pause;;
|
pause;;
|
||||||
|
9.) firewall-cmd --remove-service=http --permanent
|
||||||
|
firewall-cmd --remove-service=https --permanent
|
||||||
|
firewall-cmd --remove-port=3389/tcp --permanent
|
||||||
|
firewall-cmd --reload
|
||||||
|
pause;;
|
||||||
10.) firewall-cmd --panic-on
|
10.) firewall-cmd --panic-on
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
pause;;
|
pause;;
|
||||||
|
|
Loading…
Reference in a new issue