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
:
- Detach the root EBS volume from
instance A
- Attach that EBS volume to
instance B
as say /dev/xvdf - On
instance B
run:mkdir -p /mnt/xvdf; mount /dev/xvdf /mnt/xvdf
- Repair your volume mounted on
/mnt/xvdf
oninstance B
- Unmount volume from
instance B
:umount /mnt/xvdf
- Attach volume back to
instance A
as root. - Restart
instance A
If you are using instance-store
types of instances you are out of luck.