mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-24 22:32:58 +03:00
openwrt : simplify iptables in firewall include scripts
This commit is contained in:
@@ -2,8 +2,10 @@ QNUM=200
|
||||
IPT_FILTER_PRE="-p tcp --sport 80"
|
||||
IPT_FILTER_POST="-p tcp --dport 80"
|
||||
|
||||
iptables -t raw -C PREROUTING $IPT_FILTER_PRE -j NFQUEUE --queue-num $QNUM --queue-bypass ||
|
||||
iptables -t raw -I PREROUTING $IPT_FILTER_PRE -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||
ipt()
|
||||
{
|
||||
iptables -C $@ 2>/dev/null || iptables -I $@
|
||||
}
|
||||
|
||||
iptables -t mangle -C POSTROUTING $IPT_FILTER_POST -j NFQUEUE --queue-num $QNUM --queue-bypass ||
|
||||
iptables -t mangle -I POSTROUTING $IPT_FILTER_POST -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||
ipt PREROUTING -t raw $IPT_FILTER_PRE -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||
ipt POSTROUTING -t mangle $IPT_FILTER_POST -j NFQUEUE --queue-num $QNUM --queue-bypass
|
||||
|
Reference in New Issue
Block a user