I enabled ufw within the server instance, when connected through ssh.But now, I am not able to connect to the server in any way.Is there a way to disable the ufw in the server?I couldnt find any way from aws console.It is a ubuntu server
I enabled ufw in an aws instance. How to stop that?
linux;ubuntu;aws;ufw
I did the same sort of thing once; even worse though as I fried the instance so that it couldn't even boot.  What you do is:Boot some other instance.  Anything will do that can mount the system diskof your old system.Find the old system disk of your old system on your 'Volumes' tab of the ECs console.Shut down your old instance and detach the system volume from it as per the aws documentation.Attach it to your new instance as per the aws documentation as some boring, non-boot drive.Edit the files on it wherein you did the bad thing that made it so that you couldn't access it any more.  In your case 'ufw' configuration files.Now go the other way and detach it from your new instance and hook it back up to your old instance as a system disk.Boot your old instance and hopefully you can get to it now.  If not, rinse, repeat.This method has the advantage that you don't lose any data or configuration work that you might have created between the time that you last did a 'snapshot' of the instance and the time that you fried it.