path white list

main
fanta 5 days ago
parent 1f12281be5
commit 2c510308e6

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

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

Loading…
Cancel
Save