2

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 Answer 1

2

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

1
  • 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, 2017 at 9:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .