000firewall 261 Bytes
Newer Older
amnesia's avatar
amnesia committed
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh

# Exit if lo interface
[ "$METHOD" = "loopback" ] && exit 0

IPTABLES_RULES=/etc/firewall.conf

[ -x /sbin/iptables-restore ]	|| exit 2
[ -n "$IPTABLES_RULES" ]	|| exit 3
[ -r "$IPTABLES_RULES" ]	|| exit 4

/sbin/iptables-restore < "$IPTABLES_RULES"