mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-02 14:40:52 +03:00
init.d fix
This commit is contained in:
parent
2f118c74a4
commit
02238eadd3
@ -29,4 +29,4 @@ ISP support : TKT support
|
|||||||
|
|
||||||
v5
|
v5
|
||||||
|
|
||||||
nfqws : ipv6 support в nfqws
|
nfqws : ipv6 support in nfqws
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
||||||
ISP=mns
|
ISP=mns
|
||||||
#ISP=tkt
|
#ISP=rt
|
||||||
#ISP=beeline
|
#ISP=beeline
|
||||||
#ISP=domru
|
#ISP=domru
|
||||||
|
|
||||||
@ -32,12 +32,18 @@ case "$1" in
|
|||||||
|
|
||||||
echo "Adding iptables rule"
|
echo "Adding iptables rule"
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns)
|
||||||
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null ||
|
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null ||
|
||||||
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
DAEMON=$NFQWS
|
DAEMON=$NFQWS
|
||||||
DAEMON_OPTS="--qnum=$QNUM --wsize=4"
|
DAEMON_OPTS="--qnum=$QNUM --wsize=4"
|
||||||
;;
|
;;
|
||||||
|
rt)
|
||||||
|
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null ||
|
||||||
|
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
|
DAEMON=$NFQWS
|
||||||
|
DAEMON_OPTS="--qnum=$QNUM --wsize=20"
|
||||||
|
;;
|
||||||
beeline)
|
beeline)
|
||||||
iptables -t mangle -C POSTROUTING -p tcp --dport 80 -m set --match-set zapret dst -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null ||
|
iptables -t mangle -C POSTROUTING -p tcp --dport 80 -m set --match-set zapret dst -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null ||
|
||||||
iptables -t mangle -I POSTROUTING -p tcp --dport 80 -m set --match-set zapret dst -j NFQUEUE --queue-num $QNUM --queue-bypass
|
iptables -t mangle -I POSTROUTING -p tcp --dport 80 -m set --match-set zapret dst -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
@ -65,7 +71,7 @@ case "$1" in
|
|||||||
echo "Deleting iptables rule"
|
echo "Deleting iptables rule"
|
||||||
|
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns|rt)
|
||||||
iptables -t raw -D PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
iptables -t raw -D PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
DAEMON=$NFQWS
|
DAEMON=$NFQWS
|
||||||
;;
|
;;
|
||||||
|
5
init.d/openwrt/firewall.user.rt
Normal file
5
init.d/openwrt/firewall.user.rt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# put it to /etc/firewall.user
|
||||||
|
|
||||||
|
# for Rostelecom ISP
|
||||||
|
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num 200 --queue-bypass ||
|
||||||
|
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num 200 --queue-bypass
|
@ -1,5 +0,0 @@
|
|||||||
# put it to /etc/firewall.user
|
|
||||||
|
|
||||||
# for TKT ISP
|
|
||||||
iptables -t raw -D PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num 200 --queue-bypass 2>/dev/null
|
|
||||||
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num 200 --queue-bypass
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
||||||
#ISP=mns
|
#ISP=mns
|
||||||
#ISP=tkt
|
#ISP=rt
|
||||||
#ISP=beeline
|
#ISP=beeline
|
||||||
ISP=domru
|
ISP=domru
|
||||||
|
|
||||||
@ -22,10 +22,14 @@ START=18
|
|||||||
|
|
||||||
get_daemon() {
|
get_daemon() {
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns)
|
||||||
DAEMON_OPTS="--qnum=$QNUM --wsize=4"
|
DAEMON_OPTS="--qnum=$QNUM --wsize=4"
|
||||||
DAEMON=$NFQWS
|
DAEMON=$NFQWS
|
||||||
;;
|
;;
|
||||||
|
rt)
|
||||||
|
DAEMON_OPTS="--qnum=$QNUM --wsize=20"
|
||||||
|
DAEMON=$NFQWS
|
||||||
|
;;
|
||||||
beeline)
|
beeline)
|
||||||
DAEMON_OPTS="--qnum=$QNUM --hostcase"
|
DAEMON_OPTS="--qnum=$QNUM --hostcase"
|
||||||
DAEMON=$NFQWS
|
DAEMON=$NFQWS
|
||||||
|
@ -5,7 +5,7 @@ stop on runlevel [!2345]
|
|||||||
|
|
||||||
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
# CHOOSE ISP HERE. UNCOMMENT ONLY ONE LINE.
|
||||||
env ISP=mns
|
env ISP=mns
|
||||||
#env ISP=tkt
|
#env ISP=rt
|
||||||
#env ISP=beeline
|
#env ISP=beeline
|
||||||
#env ISP=domru
|
#env ISP=domru
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ pre-start script
|
|||||||
/opt/zapret/ipset/create_ipset.sh
|
/opt/zapret/ipset/create_ipset.sh
|
||||||
|
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns|rt)
|
||||||
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass ||
|
iptables -t raw -C PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass ||
|
||||||
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
iptables -t raw -I PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
;;
|
;;
|
||||||
@ -45,10 +45,14 @@ end script
|
|||||||
|
|
||||||
script
|
script
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns)
|
||||||
NFEXE=$NFQWS
|
NFEXE=$NFQWS
|
||||||
NFARG="--qnum $QNUM --wsize=4"
|
NFARG="--qnum $QNUM --wsize=4"
|
||||||
;;
|
;;
|
||||||
|
rt)
|
||||||
|
NFEXE=$NFQWS
|
||||||
|
NFARG="--qnum $QNUM --wsize=20"
|
||||||
|
;;
|
||||||
beeline)
|
beeline)
|
||||||
NFEXE=$NFQWS
|
NFEXE=$NFQWS
|
||||||
NFARG="--qnum $QNUM --hostcase"
|
NFARG="--qnum $QNUM --hostcase"
|
||||||
@ -63,7 +67,7 @@ end script
|
|||||||
|
|
||||||
pre-stop script
|
pre-stop script
|
||||||
case "${ISP}" in
|
case "${ISP}" in
|
||||||
mns|tkt)
|
mns|rt)
|
||||||
iptables -t raw -D PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
iptables -t raw -D PREROUTING -p tcp --sport 80 --tcp-flags SYN,ACK SYN,ACK -m set --match-set zapret src -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
;;
|
;;
|
||||||
beeline)
|
beeline)
|
||||||
|
Loading…
Reference in New Issue
Block a user