By paxprajapati
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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
https://www.digitalocean.com/docs/droplets/resources/console/
If you decide you don’t want to use UFW, you can disable it with this command:
- sudo ufw disable
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:
- sudo ufw reset
Hope that this helps! Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.