fix
This commit is contained in:
parent
9784681f9b
commit
936d51c215
57
modules/module-menu.sh
Normal file
57
modules/module-menu.sh
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
FIREWALL="/opt/firewall/firewall.sh"
|
||||||
|
MENU_TOP="=============================FireWall================================="
|
||||||
|
MENU_BOTTOM="====================================================================="
|
||||||
|
|
||||||
|
menu() {
|
||||||
|
clear
|
||||||
|
echo
|
||||||
|
echo $MENU_TOP
|
||||||
|
echo "1. Start"
|
||||||
|
echo "2. Stop"
|
||||||
|
echo "3. Reseearch"
|
||||||
|
echo "4. Forgive"
|
||||||
|
echo "5. Status"
|
||||||
|
echo "6. EMPTY"
|
||||||
|
echo "7. Test Bot Search Rules"
|
||||||
|
echo "8. Research IP"
|
||||||
|
echo "9. View Current Rule Set"
|
||||||
|
echo "0. Quit"
|
||||||
|
echo $MENU_BOTTOM
|
||||||
|
echo
|
||||||
|
read -p 'Choice: ' CHOICE
|
||||||
|
echo
|
||||||
|
if [ "$CHOICE" = "1" ]; then
|
||||||
|
echo
|
||||||
|
echo "Starting Firewall"
|
||||||
|
bash $FIREWALL start
|
||||||
|
read -p 'Press Enter to Continue ' -e-
|
||||||
|
elif [ "$CHOICE" = "2" ]; then
|
||||||
|
echo
|
||||||
|
echo "Stopping Firewall"
|
||||||
|
bash $FIREWALL stop
|
||||||
|
read -p 'Press Enter to Continue ' -e
|
||||||
|
elif [ "$CHOICE" = "3" ]; then
|
||||||
|
bash $FIREWALL research
|
||||||
|
read -p 'Press Enter to Continue ' -e
|
||||||
|
elif [ "$CHOICE" = "4" ]; then
|
||||||
|
bash $FIREWALL forgive
|
||||||
|
elif [ "$CHOICE" = "5" ]; then
|
||||||
|
bash $FIREWALL status
|
||||||
|
read -p 'Press Enter to Continue ' -e
|
||||||
|
elif [ "$CHOICE" = "7" ]; then
|
||||||
|
bash $FIREWALL test-bots
|
||||||
|
read -p 'Press Enter to Continue ' -e
|
||||||
|
elif [ "$CHOICE" = "8" ]; then
|
||||||
|
bash $FIREWALL research-ip
|
||||||
|
read -p 'Press Enter to Continue ' -e
|
||||||
|
elif [ "$CHOICE" = "9" ]; then
|
||||||
|
nft -s list ruleset | less
|
||||||
|
elif [ "$CHOICE" = "0" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
menu
|
||||||
|
}
|
||||||
|
|
||||||
|
menu
|
Loading…
Reference in New Issue
Block a user