From c468a1ac5c47c910430b207334978525a41504c7 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Sun, 16 Feb 2025 11:53:56 +1100 Subject: [PATCH] added for sysvinit --- init/nfblocker | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 init/nfblocker diff --git a/init/nfblocker b/init/nfblocker new file mode 100755 index 0000000..f6fdf59 --- /dev/null +++ b/init/nfblocker @@ -0,0 +1,21 @@ +#!/lib/init/init-d-script +### BEGIN INIT INFO +# Provides: atd +# Required-Start: mountkernfs $local_fs +# X-Start-Before: $network +# Default-Start: S +# Required-Stop: +# Short-Description: Block selected HTTP and HTTPS connections +# Description: Firewall agent that blocks outbound connections +# for selected domains +### END INIT INFO +DAEMON=/usr/sbin/nfblocker +DAEMON_ARGS="$(ls /etc/nfblocker/blocked/*.acl 2>/dev/null)" + +do_start_prepare() { + iptables -I OUTPUT -p tcp -j NFQUEUE --queue-num 99 +} + +do_stop_prepare() { + iptables -D OUTPUT -p tcp -j NFQUEUE --queue-num 99 +} -- 2.47.2