Firewall – Copy UFW rules between servers

firewallufw

I'm doing a hardware refresh on a my Colo, I just need to copy my UFW rules from my old server to my new server. I dont seem to be able to get them copy all the active rules from my old server to my new one.

How do I copy my active UFW rules between servers?

Best Answer

I found the rules in /etc/ufw/user.rules and for ipv6 you can find the rules in /etc/ufw/user6.rules.

If you copy those files between the servers, disable and then re-enable ufw.

Related Topic