mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
bsd: use not diverted filter for incoming traffic also
This commit is contained in:
parent
57c9742005
commit
8385394fd6
@ -515,7 +515,7 @@ pktws_ipt_prepare()
|
||||
|
||||
IPFW_ADD divert $IPFW_DIVERT_PORT tcp from me to any $1 proto ip${IPV} out not diverted not sockarg
|
||||
# for autottl mode
|
||||
IPFW_ADD divert $IPFW_DIVERT_PORT tcp from any $1 to me proto ip${IPV} tcpflags syn,ack in
|
||||
IPFW_ADD divert $IPFW_DIVERT_PORT tcp from any $1 to me proto ip${IPV} tcpflags syn,ack in not diverted not sockarg
|
||||
;;
|
||||
opf)
|
||||
opf_prepare_dvtws $1
|
||||
|
@ -156,7 +156,7 @@ For all traffic:
|
||||
ipfw delete 100
|
||||
ipfw add 100 divert 989 tcp from any to any 80,443 out not diverted not sockarg xmit em0
|
||||
# required for autottl mode only
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in recv em0
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in not diverted not sockarg recv em0
|
||||
/opt/zapret/nfq/dvtws --port=989 --dpi-desync=split2
|
||||
```
|
||||
|
||||
@ -166,7 +166,7 @@ ipfw delete 100
|
||||
ipfw add 100 allow tcp from me to table\(nozapret\) 80,443
|
||||
ipfw add 100 divert 989 tcp from any to table\(zapret\) 80,443 out not diverted not sockarg xmit em0
|
||||
# required for autottl mode only
|
||||
ipfw add 100 divert 989 tcp from table\(zapret\) 80,443 to any tcpflags syn,ack in recv em0
|
||||
ipfw add 100 divert 989 tcp from table\(zapret\) 80,443 to any tcpflags syn,ack in not diverted not sockarg recv em0
|
||||
/opt/zapret/nfq/dvtws --port=989 --dpi-desync=split2
|
||||
```
|
||||
|
||||
|
@ -124,7 +124,7 @@ ipfw add 100 fwd ::1,988 tcp from any to any 80,443 proto ip6 recv em1
|
||||
ipfw delete 100
|
||||
ipfw add 100 divert 989 tcp from any to any 80,443 out not diverted not sockarg xmit em0
|
||||
# required for autottl mode only
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in recv em0
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in not diverted not sockarg recv em0
|
||||
/opt/zapret/nfq/dvtws --port=989 ---dpi-desync=split2
|
||||
|
||||
Для трафика только на таблицу zapret, за исключением таблицы nozapret :
|
||||
@ -132,7 +132,7 @@ ipfw delete 100
|
||||
ipfw add 100 allow tcp from me to table\(nozapret\) 80,443
|
||||
ipfw add 100 divert 989 tcp from any to table\(zapret\) 80,443 out not diverted not sockarg xmit em0
|
||||
# required for autottl mode only
|
||||
ipfw add 100 divert 989 tcp from table\(zapret\) 80,443 to any tcpflags syn,ack in recv em0
|
||||
ipfw add 100 divert 989 tcp from table\(zapret\) 80,443 to any tcpflags syn,ack in not diverted not sockarg recv em0
|
||||
/opt/zapret/nfq/dvtws --port=989 --dpi-desync=split2
|
||||
|
||||
Недопущение зацикливания - повторного вхождения фейк пакетов на обработку.
|
||||
|
@ -28,7 +28,7 @@ ipfw add 100 fwd ::1,988 tcp from any to any 80,443 proto ip6 recv em1
|
||||
ipfw delete 100
|
||||
ipfw add 100 divert 989 tcp from any to any 80,443 out not diverted not sockarg xmit em0
|
||||
; required for autottl mode
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in recv em0
|
||||
ipfw add 100 divert 989 tcp from any 80,443 to any tcpflags syn,ack in not diverted not sockarg recv em0
|
||||
; udp
|
||||
ipfw add 100 divert 989 udp from any to any 443 out not diverted not sockarg xmit em0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user