iptables -LActivate rules from file:
iptables-restore < iptables.rulesSave rules:
iptables-save > /etc/iptables.up.rulesThese rules need to be restored when the network connection is going up.
touch /etc/network/if-pre-up.d/iptables chmod +x /etc/network/if-pre-up.d/iptablesAdd the following to /etc/network/if-pre-up.d/iptables:
#!/bin/sh /sbin/iptables-restore < /etc/iptables.up.rules
No comments :
Post a Comment