server-scripts/fw-apply

16 lines
269 B
Plaintext
Raw Normal View History

2014-10-19 15:27:33 +00:00
#!/bin/sh
if ! [ $EUID -eq 0 ]
then
echo "Must be root!" >&2
exit 1
fi
cd /etc
if ferm --interactive --timeout 10 ferm.conf
then
ferm -n -l --domain ip ferm.conf > /etc/iptables/iptables.rules
ferm -n -l --domain ip6 ferm.conf > /etc/iptables/ip6tables.rules
fi