So I was ssh'd into my running instance while trying to set up Postfix for mailing.. I was fallowing this tutorial: http://flurdy.com/docs/postfix/#ec2. I got to the Shorewall part and fallowed all of the instructions. I think while I was doing that, I locked myself out of my SSH.
Currently I would like to remove the Shorewall firewall that is locking me out of the ssh. How could I do this?
Shorewall settings:
/etc/shorewall/interfaces
net eth0 detect dhcp,tcpflags,logmartians,nosmurfs
/etc/shorewall/zones
Add the firewall if not there and the internet as a zone.
fw firewall
# loc ipv4
net ipv4
/etc/shorewall/hosts
# loc eth0:192.168.0.0/24
/etc/shorewall/policy
$FW net ACCEPT
net $FW DROP info
net all DROP info
# The FOLLOWING POLICY MUST BE LAST
all all REJECT info
/etc/shorewall/routestopped
eth0 0.0.0.0 routeback
/etc/shorewall/rules
Ping/ACCEPT net $FW
# Permit all ICMP traffic FROM the firewall TO the net zone
ACCEPT $FW net icmp
# mail lines
SMTP/ACCEPT net $FW
SMTPS/ACCEPT net $FW
Submission/ACCEPT net $FW
IMAP/ACCEPT net $FW
IMAPS/ACCEPT net $FW
#web
Web/ACCEPT net $FW