mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-19 21:42:59 +03:00
init scripts : minor cleanup
This commit is contained in:
parent
1e7ce5c4c2
commit
be487f7475
@ -45,7 +45,7 @@ run_daemon()
|
|||||||
create_ipset()
|
create_ipset()
|
||||||
{
|
{
|
||||||
echo "Creating ipset"
|
echo "Creating ipset"
|
||||||
($IPSET_CR)
|
$IPSET_CR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# For systemd :
|
|
||||||
# install : /usr/lib/lsb/install_initd zapret
|
|
||||||
# remove : /usr/lib/lsb/remove_initd zapret
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: zapret
|
# Provides: zapret
|
||||||
# Required-Start: $local_fs $network
|
# Required-Start: $local_fs $network
|
||||||
@ -70,7 +67,6 @@ fw_tpws_del()
|
|||||||
ipt PREROUTING -t nat -i $SLAVE_ETH -p tcp $1 -j DNAT --to 127.0.0.1:$2
|
ipt PREROUTING -t nat -i $SLAVE_ETH -p tcp $1 -j DNAT --to 127.0.0.1:$2
|
||||||
}
|
}
|
||||||
ipt_del OUTPUT -t nat -m owner ! --uid-owner $TPWS_USER -p tcp $1 -j DNAT --to 127.0.0.1:$2
|
ipt_del OUTPUT -t nat -m owner ! --uid-owner $TPWS_USER -p tcp $1 -j DNAT --to 127.0.0.1:$2
|
||||||
true
|
|
||||||
}
|
}
|
||||||
fw_nfqws_add_pre()
|
fw_nfqws_add_pre()
|
||||||
{
|
{
|
||||||
@ -83,7 +79,6 @@ fw_nfqws_del_pre()
|
|||||||
# $1 - iptable filter
|
# $1 - iptable filter
|
||||||
echo "Deleting iptables rule for nfqws prerouting : $1"
|
echo "Deleting iptables rule for nfqws prerouting : $1"
|
||||||
ipt_del PREROUTING -t raw -p tcp --tcp-flags SYN,ACK SYN,ACK $1 -j NFQUEUE --queue-num $QNUM --queue-bypass
|
ipt_del PREROUTING -t raw -p tcp --tcp-flags SYN,ACK SYN,ACK $1 -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
true
|
|
||||||
}
|
}
|
||||||
fw_nfqws_add_post()
|
fw_nfqws_add_post()
|
||||||
{
|
{
|
||||||
@ -96,7 +91,6 @@ fw_nfqws_del_post()
|
|||||||
# $1 - iptable filter
|
# $1 - iptable filter
|
||||||
echo "Deleting iptables rule for nfqws postrouting : $1"
|
echo "Deleting iptables rule for nfqws postrouting : $1"
|
||||||
ipt_del POSTROUTING -t mangle -p tcp $1 -j NFQUEUE --queue-num $QNUM --queue-bypass
|
ipt_del POSTROUTING -t mangle -p tcp $1 -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||||
true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_daemon()
|
run_daemon()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user