Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

You add a rule like this:

ufw allow 22/tcp

The rule is saved, and is applied even after reboot. But it's not written anywhere in /etc/ufw. Where is it saved to? (Ubuntu, using ufw as pre-installed.)

share|improve this question
add comment

3 Answers

up vote 10 down vote accepted

In my Ubuntu 11 server, the firewall rules are saved in /lib/ufw/user.rules

share|improve this answer
    
Bingo, thanks. There's also a user6.rules (which doesn't have all the rules I created, but otherwise looks similar). –  Steve Bennett Feb 13 '13 at 8:20
    
user6.rules is for IP version 6 (ipv6) firewall rules. –  Daniel t. Feb 13 '13 at 14:41
    
Oh of course, thanks. –  Steve Bennett Feb 15 '13 at 0:44
add comment

I believe it's under lib/ufw/rules[6].rules

share|improve this answer
add comment

In my version, 8.04 LTS Server the files are stored in /var/lib/ufw as /var/lib/ufw/user.rules and /var/lib/ufw/user6.rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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