summaryrefslogtreecommitdiff
path: root/firehol2nft-load
diff options
context:
space:
mode:
Diffstat (limited to 'firehol2nft-load')
-rwxr-xr-xfirehol2nft-load21
1 files changed, 21 insertions, 0 deletions
diff --git a/firehol2nft-load b/firehol2nft-load
new file mode 100755
index 0000000..5325553
--- /dev/null
+++ b/firehol2nft-load
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PATH=/usr/bin:/usr/sbin:/bin:/sbin
+
+FIREHOL=`mktemp`
+wget -q -O $FIREHOL https://iplists.firehol.org/files/firehol_level1.netset
+if [ $? != 0 ]; then
+ echo "ERROR: Could not download file"
+ exit 1
+fi
+
+/usr/local/sbin/firehol2nft -f $FIREHOL > /etc/nftables-firehol.conf
+if [ $? != 0 ]; then
+ echo "ERROR"
+ exit 1
+fi
+
+rm $FIREHOL
+
+nft -f /etc/nftables-firehol.conf
+exit $?