moved
authorRalph Ronnquist <rrq@rrq.au>
Mon, 17 Feb 2025 02:47:37 +0000 (13:47 +1100)
committerRalph Ronnquist <rrq@rrq.au>
Mon, 17 Feb 2025 02:47:37 +0000 (13:47 +1100)
nfblockerctl [new file with mode: 0755]

diff --git a/nfblockerctl b/nfblockerctl
new file mode 100755 (executable)
index 0000000..aed8d22
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Control script for manual use of nfblocker.
+
+do_start() {
+    iptables -I OUTPUT -p tcp -j NFQUEUE --queue-num 99
+    nfblocker /etc/nfblocker/blocked/*.acl &
+}
+
+do_stop() {
+    iptables -D OUTPUT -p tcp -j NFQUEUE --queue-num 99
+    pkill nfblocker
+}
+
+case "$1" in
+    start) do_start ;;
+    reload) do_stop ; do_start ;;
+    stop) do_stop ;;
+    *) echo "Use start, stop or reload" >&2 ;;
+esac