1

I have a basic standard Ubuntu 14.04 droplet on digital ocean. I used ufw to set some firewall rules but forgot to open port 22 for SSH. I rebooted my server and could no longer log in so DO support booted me into recovery mode so I can fix this up.

Unfortunately I have no idea where the iptables or ufw config files are saved. I've googled for ages and tried all these locations and none exist:

  • /etc/iptables
  • /etc/ufw
  • /etc/sysconfig
  • /lib/ufw
  • /var/lib/iptables

Where could they possibly be?

1

Ah found them at /lib/ufw/user.rules. But it's actually mounted as /mnt/lib/ufw/user.rules in recovery mode.

  • I have a MEAN Stack running on Ubuntu 14.04. I found them in /usr/share/ufw/iptables/{after,before,user}{,6}.rules. – mwfearnley Jul 21 '17 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.