A package of scripts for a sane installation of slackware on a VPS for remote development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

############################################
# #
# Setup default chains in IPTables #
# Author: Taylor Bockman #
# <tbockman@taylorbockman.com> #
# #
# #
############################################
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