ec2实例超时

所以我试图build立Postfix的邮件时,ssh'd到我的正在运行的实例。我正在休假这个教程: http : //flurdy.com/docs/postfix/#ec2 。 我到了Shorewall部分,休假了所有的指示。 我想,当我这样做的时候,我把自己锁在了SSH之外。

目前,我想删除locking我的ssh的Shorewall防火墙。 我怎么能这样做?

Shorewall设置:

/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 

解决此问题的正确方法是启动一个新实例并挂载旧的目录。 在使用新实例装载旧目录之后,应该能够撤消防火墙并在实例启动时将其删除。 然后重新启动旧的实例,防火墙不会启动。 然后像正常一样进入。

这是一个很好的教程如何做到这一点。 https://aws.amazon.com/articles/5213606968661598