Copying Rules from one system to another one

Asked by jean-christophe manciot on 2015-05-05


My source system is Ubuntu desktop 14.10.
The target system is Ubuntu Server 15.04.

If I need to keep the same configuration & rules on both systems, which files must be copied from the source to the destination?

Question information

English Edit question
Ubuntu gui-ufw Edit question
No assignee Edit question
Solved by:
jean-christophe manciot
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

AFAIK gufw is just a graphical frontend for maintaining the settings for ufw.
So I assume that your question would correctly be formulated "how can I copy the ufw rules from one system to another.
And for that question I found this link:
(You have to be aware of potential incompatibilities between different versions.)

Unfortunately, it did not work out; I copied all the following files:


No rules are available in ufw nor in gufw:

ufw status verbose
Status: active
Logging: on (medium)
Default: deny (incoming), allow (outgoing), allow (routed)
New profiles: skip

Manfred Hampl (m-hampl) said : #3

If you start gufw on the target machine, do you see the copied rules?

According to the link that I gave the real rules are in /lib/ufw/* Have you also copied these files?

Some leftovers are available in:
- lib/ufw/user.rules
- lib/ufw/user6.rules
Now, all the rules are set.

As a simple summary, the files that need to be copied are: