path white list

main
fanta 4 days ago
parent 1f12281be5
commit 2c510308e6

@ -1,5 +1,7 @@
# paranoic
Script para bloquear todo por defecto y solamente permitir el acceso de la white.list
Dependencias: ufw
Script para bloquear todo por defecto y solamente permitir el acceso de la white.list
Dependencias: ufw
copy white.list o /usr/local/etc/

@ -7,6 +7,7 @@ nic="wlo1"
user=$(whoami)
opt="$1"
version="0.1"
whiteList="/usr/local/etc/white.list"
function who {
if [ "$(whoami)" != "root" ]; then echo "please run paranoic with the user root"; exit; fi
@ -25,7 +26,7 @@ function enable {
ip=$(echo $data | cut -d ";" -f 1)
comment=$(echo $data | cut -d ";" -f 2)
ufw allow out on $nic from any to $ip comment "$comment"
done < white.list
done < $whiteList
ufw enable
ufw status numbered

Loading…
Cancel
Save