- To take the rules back to the default settings:
sudo ufw reset
Note:
If you want to see how the sudo ufw reset
will change your rules
use --dry-run
option first, then compare the /etc/ufw/before.rules.20170513_185835
file to the /etc/ufw/before.rules.20170513_185835
file.
Example:
sudo ufw --dry-run reset
To compare:
sudo diff /etc/ufw/after.rules.20170513_185835 /etc/ufw/before.rules.20170513_185835
After reset your server is able to login via ssh