This commit is contained in:
2026-01-21 11:59:07 +02:00
parent 8ec4722193
commit 27070a4c2f
2 changed files with 7 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
set -eu set -eu
/bin/sh /root/stopblock.sh >/dev/null 2>&1 || true /bin/sh /root/stopblock.sh >/dev/null 2>&1 || true
sleep 1
#grep -q "block" /etc/rc.local || cat /root/rc.local-with > /etc/rc.local
grep -qi "block" /etc/rc.local || sed -i '/^exit 0$/i\/root/startblock.sh' /etc/rc.local
LAN_IF="br-lan" LAN_IF="br-lan"
LAN_NET="192.168.2.0/24" LAN_NET="192.168.2.0/24"
@@ -62,3 +65,4 @@ done
iptables -I FORWARD 1 -i "$LAN_IF" -s "$LAN_NET" -j CAPTIVE_BLOCK iptables -I FORWARD 1 -i "$LAN_IF" -s "$LAN_NET" -j CAPTIVE_BLOCK
echo "OK: filter rules applied" echo "OK: filter rules applied"

View File

@@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
#cat /root/rc.local-with | grep -v block > /etc/rc.local
grep -qi "block" /etc/rc.local && sed -i '\|^/root/startblock\.sh$|d' /etc/rc.local
LAN_IF="br-lan" LAN_IF="br-lan"
LAN_NET="192.168.2.0/24" LAN_NET="192.168.2.0/24"