I have an EC2 Instance with Ubuntu.
I used sudo ufw enable
and after only allow the mongodb port
sudo ufw allow 27017
When th
I know this is an old question but I fixed mine by adding a command in View/Change User Data using bootcmd
I first stopped my instance
Then I added this in User Data
#cloud-config
bootcmd:
- cloud-init-per always fix_broken_ufw_1 sh -xc "/usr/sbin/service ufw stop >> /var/tmp/svc_$INSTANCE_ID 2>&1 || true"
- cloud-init-per always fix_broken_ufw_2 sh -xc "/usr/sbin/ufw disable>> /var/tmp/ufw_$INSTANCE_ID 2>&1 || true"
#Note: My instance is Ubuntu