Skip to content

Instantly share code, notes, and snippets.

@Canx
Created September 4, 2018 20:06
Show Gist options
  • Save Canx/a75da75d7a5ffc40cff3da31098e4b58 to your computer and use it in GitHub Desktop.
Save Canx/a75da75d7a5ffc40cff3da31098e4b58 to your computer and use it in GitHub Desktop.
#!/bin/bash
exec 3>&1;
ips=$(dialog --title "IPs internas permitidas" --inputbox "Indica las IPs que podrán navegar sin restricciones (192.168.0.X)" 0 0 2>&1 1>&3);
exec 3>&1;
for ip in $ips; do
echo "iptables -I FORWARD -s 192.168.0.$ip -j ACCEPT";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment