I’ve access to a droplet. Then I’ve installed ufw and left all the ports disallowed. Now I can’t ssh back into the machine.
How to disable the ufw?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello @paxprajapati
You can access the droplet via the DigitalOcean console from your account and then disable UFW from there.
The Droplet console provides out-of-band access and is available regardless of your network settings. It emulates the access you would have if you were sitting down with a keyboard and monitor attached to the actual server. You can use this feature to log in and revert bad settings to regain normal access.
You can check this article - How to Regain Access to Droplets using the DigitalOcean Droplet Console
If you decide you don’t want to use UFW, you can disable it with this command:
Any rules that you created with UFW will no longer be active. You can always run
sudo ufw enable
if you need to activate it later.If you already have UFW rules configured but you decide that you want to start over, you can use the reset command:
Hope that this helps! Regards, Alex