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.

23 lines
1.0 KiB

##############################################
# #
# Allow SSH in IPTables #
# Author: Taylor Bockman #
# <tbockman@taylorbockman.com> #
# #
##############################################
echo "SSH Port:"
read sshport
echo "Interface: "
read interface
# Allow incoming SSH
sudo iptables -A INPUT -i $interface -p tcp --dport $sshport -m state --state NEW,ESTABLISHED -j ACCEPT -m comment --comment "SSH Incoming"
sudo iptables -A OUTPUT -o $interface -p tcp --sport $sshport -m state --state ESTABLISHED -j ACCEPT -m comment --comment "SSH Incoming"
# Allow outgoing SSH
sudo iptables -A OUTPUT -o $interface -p tcp --dport $sshport -m state --state NEW,ESTABLISHED -j ACCEPT -m comment --comment "SSH Outgoing"
sudo iptables -A INPUT -i $interface -p tcp --sport $sshport -m state --state ESTABLISHED -j ACCEPT -m comment --comment "SSH Outgoing"
echo "Completed opening up SSH on interface $interface, port $sshport."