mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix omr-bypass
This commit is contained in:
parent
a054179ac7
commit
fad135665c
1 changed files with 13 additions and 7 deletions
|
@ -354,12 +354,14 @@ _bypass_proto() {
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539
|
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539
|
||||||
|
-A omr-bypass-dpi -m mark --mark 0x539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
if [ "$disableipv6" = "0" ]; then
|
if [ "$disableipv6" = "0" ]; then
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539
|
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539
|
||||||
|
-A omr-bypass6-dpi -m mark --mark 0x6539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -367,12 +369,14 @@ _bypass_proto() {
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539$intfid
|
-A omr-bypass-dpi -m ndpi --proto $proto -j MARK --set-mark 0x539$intfid
|
||||||
|
-A omr-bypass-dpi -m mark --mark 0x539$intfid -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
if [ "$disableipv6" = "0" ]; then
|
if [ "$disableipv6" = "0" ]; then
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539$intfid
|
-A omr-bypass6-dpi -m ndpi --proto $proto -j MARK --set-mark 0x6539$intfid
|
||||||
|
-A omr-bypass6-dpi -m mark --mark 0x6539$intfid -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -725,13 +729,13 @@ start_service() {
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
:omr-bypass -
|
:omr-bypass -
|
||||||
-I PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass
|
-A PREROUTING -j omr-bypass
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
:omr-bypass-local -
|
:omr-bypass-local -
|
||||||
-I OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-local
|
-A OUTPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-local
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
if [ "$disableipv6" = "0" ]; then
|
if [ "$disableipv6" = "0" ]; then
|
||||||
|
@ -739,7 +743,7 @@ start_service() {
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
:omr-bypass6 -
|
:omr-bypass6 -
|
||||||
-I PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass6
|
-A PREROUTING -j omr-bypass6
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -786,11 +790,13 @@ start_service() {
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
-A omr-bypass -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
||||||
|
-A omr-bypass -m mark --mark 0x539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
-A omr-bypass-local -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
-A omr-bypass-local -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
||||||
|
-A omr-bypass-local -m mark --mark 0x539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -803,8 +809,8 @@ start_service() {
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
:omr-bypass-dpi -
|
:omr-bypass-dpi -
|
||||||
-A INPUT -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
|
-A INPUT -j omr-bypass-dpi
|
||||||
-A FORWARD -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
|
-A FORWARD -j omr-bypass-dpi
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
if [ "$disableipv6" = "0" ]; then
|
if [ "$disableipv6" = "0" ]; then
|
||||||
|
@ -812,8 +818,8 @@ start_service() {
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
:omr-bypass6-dpi -
|
:omr-bypass6-dpi -
|
||||||
-A INPUT -m addrtype ! --dst-type LOCAL -j omr-bypass6-dpi
|
-A INPUT -j omr-bypass6-dpi
|
||||||
-A FORWARD -m addrtype ! --dst-type LOCAL -j omr-bypass6-dpi
|
-A FORWARD -j omr-bypass6-dpi
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue