############################################ # # # Setup default chains in IPTables # # Author: Taylor Bockman # # # # # # # ############################################ echo "Are you on a VPS? [Y/N]" read onvps if [ $onvps=="Y" ]; then echo "Did you open your SSH ports on iptables? Otherwise this will kill your access. [Y/N]" read openedssh if [ $openedssh=="Y" ]; then echo "Dropping INPUT and FORWARD..." sudo iptables -P INPUT DROP sudo iptables -P FORWARD DROP echo "INPUT and FORWARD are now dropping traffic. You will have to configure a source and destination for each rule" else echo "Please configure your SSH access with IPTables and run this script again" fi else echo "Dropping INPUT and FORWARD..." sudo iptables -P INPUT DROP sudo iptables -P FORWARD DROP echo "INPUT and FORWARD are now dropping traffic. You will have to configure a source and destination for each rule." fi