projects
/
rrq
/
nfblocker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
205d4c0
)
moved
author
Ralph Ronnquist
<rrq@rrq.au>
Mon, 17 Feb 2025 02:47:37 +0000
(13:47 +1100)
committer
Ralph Ronnquist
<rrq@rrq.au>
Mon, 17 Feb 2025 02:47:37 +0000
(13:47 +1100)
nfblockerctl
[new file with mode: 0755]
patch
|
blob
diff --git a/nfblockerctl
b/nfblockerctl
new file mode 100755
(executable)
index 0000000..
aed8d22
--- /dev/null
+++ b/
nfblockerctl
@@ -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