iptables save debian


Взято с wiki https://wiki.debian.org/iptables
iptables-save > /etc/iptables.up.rules

To make sure the iptables rules are started on a reboot we’ll create a new file:

editor /etc/network/if-pre-up.d/iptables

Add these lines to it:

#!/bin/sh
/sbin/iptables-restore < /etc/iptables.up.rules The file needs to be executable so change the permissions: chmod +x /etc/network/if-pre-up.d/iptables