пятница, 22 ноября 2013 г.

iptables autostart in debian

Можно сделать вот так

vim /etc/network/interfaces
iface lo inet loopback
        post-up /sbin/iptables-restore < /etc/firewall.conf

можно так

iptables-save > /etc/firewall.conf
vim /etc/network/if-up.d/iptables
#!/bin/sh
iptables-restore < /etc/firewall.conf
chmod +x /etc/network/if-up.d/iptables

или так

vim /etc/rc.local
iptables-restore < /etc/firewall.conf