I am new to firewalls. I was playing with iptables on ec2 instance earlier today but now I am unable to connect via ssh - "Connection timed out". The console shows the instance is running and the ssh keys are good, ping is successful. So my conclusion is that I might have disabled/disallowed the ssh port connections while playing with the iptables.
Is there a way to undo the changes without going for a complete re-install ?
Note: I don't have access to shell since I cannot ssh
A simple reboot from the AWS console should do. Hopefully you didn't enable the iptables service in the instance so that it starts at boot up.
If you enabled the iptables services you are going to have to create another instance, instance B
(hopefully you are using EBS instances). Also assuming your original instance is instance A
:
instance A
instance B
as say /dev/xvdfinstance B
run: mkdir -p /mnt/xvdf; mount /dev/xvdf /mnt/xvdf
/mnt/xvdf
on instance B
instance B
: umount /mnt/xvdf
instance A
as root.instance A
If you are using instance-store
types of instances you are out of luck.