mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix for omr-bypass, only default ss-rules supported for now
This commit is contained in:
parent
9ad332c841
commit
41e188a71c
1 changed files with 24 additions and 24 deletions
|
@ -333,14 +333,14 @@ _intf_rule() {
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ "$(iptables --wait=40 -t nat -L -n | grep ss_rules_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep omr_dst_bypass_$intf)" = "" ]; then
|
if [ "$(iptables --wait=40 -t nat -L -n | grep ss_rules_default_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep omr_dst_bypass_$intf)" = "" ]; then
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*nat
|
*nat
|
||||||
-I ss_rules_dst 1 -m set --match-set omr_dst_bypass_$intf dst -j RETURN
|
-I ss_rules_default_dst 1 -m set --match-set omr_dst_bypass_$intf dst -j RETURN
|
||||||
-I ss_rules_local_out 1 -m set --match-set omr_dst_bypass_$intf dst -j RETURN
|
-I ss_rules_default_local_out 1 -m set --match-set omr_dst_bypass_$intf dst -j RETURN
|
||||||
-I ss_rules_local_out 2 -m mark --mark 0x539$count -j RETURN
|
-I ss_rules_default_local_out 2 -m mark --mark 0x539$count -j RETURN
|
||||||
-I ss_rules_pre_src 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
|
-I ss_rules_default_pre_src 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count
|
||||||
-I ss_rules_pre_src 2 -m mark --mark 0x539$count -j RETURN
|
-I ss_rules_default_pre_src 2 -m mark --mark 0x539$count -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -352,14 +352,14 @@ _intf_rule() {
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ "$(ip6tables --wait=40 -t nat -L | grep ss_rules6_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L | grep omr6_dst_bypass_$intf)" = "" ]; then
|
if [ "$(ip6tables --wait=40 -t nat -L | grep ss_rules6_default_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L | grep omr6_dst_bypass_$intf)" = "" ]; then
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*nat
|
*nat
|
||||||
-I ss_rules6_dst 1 -m set --match-set omr6_dst_bypass_$intf dst -j RETURN
|
-I ss_rules6_default_dst 1 -m set --match-set omr6_dst_bypass_$intf dst -j RETURN
|
||||||
-I ss_rules6_local_out 1 -m set --match-set omr6_dst_bypass_$intf dst -j RETURN
|
-I ss_rules6_default_local_out 1 -m set --match-set omr6_dst_bypass_$intf dst -j RETURN
|
||||||
-I ss_rules6_local_out 2 -m mark --mark 0x6539$count -j RETURN
|
-I ss_rules6_default_local_out 2 -m mark --mark 0x6539$count -j RETURN
|
||||||
-I ss_rules6_pre_src 1 -m set --match-set omr6_dst_bypass_$intf dst -j MARK --set-mark 0x6539$count
|
-I ss_rules6_default_pre_src 1 -m set --match-set omr6_dst_bypass_$intf dst -j MARK --set-mark 0x6539$count
|
||||||
-I ss_rules6_pre_src 2 -m mark --mark 0x6539$count -j RETURN
|
-I ss_rules6_default_pre_src 2 -m mark --mark 0x6539$count -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -483,14 +483,14 @@ start_service() {
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ "$(iptables --wait=40 -t nat -L -n | grep ss_rules_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep omr_dst_bypass_all)" = "" ]; then
|
if [ "$(iptables --wait=40 -t nat -L -n | grep ss_rules_default_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep omr_dst_bypass_all)" = "" ]; then
|
||||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*nat
|
*nat
|
||||||
-I ss_rules_dst 1 -m set --match-set omr_dst_bypass_all dst -j RETURN
|
-I ss_rules_default_dst 1 -m set --match-set omr_dst_bypass_all dst -j RETURN
|
||||||
-I ss_rules_local_out 1 -m set --match-set omr_dst_bypass_all dst -j RETURN
|
-I ss_rules_default_local_out 1 -m set --match-set omr_dst_bypass_all dst -j RETURN
|
||||||
-I ss_rules_local_out 2 -m mark --mark 0x539 -j RETURN
|
-I ss_rules_default_local_out 2 -m mark --mark 0x539 -j RETURN
|
||||||
-I ss_rules_pre_src 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
-I ss_rules_default_pre_src 1 -m set --match-set omr_dst_bypass_all dst -j MARK --set-mark 0x539
|
||||||
-I ss_rules_pre_src 2 -m mark --mark 0x539 -j RETURN
|
-I ss_rules_default_pre_src 2 -m mark --mark 0x539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -502,14 +502,14 @@ start_service() {
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ "$(ip6tables --wait=40 -t nat -L | grep ss_rules6_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L | grep omr6_dst_bypass_all)" = "" ]; then
|
if [ "$(ip6tables --wait=40 -t nat -L | grep ss_rules6_default_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L | grep omr6_dst_bypass_all)" = "" ]; then
|
||||||
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
ip6tables-restore -w --wait=60 --noflush <<-EOF
|
||||||
*nat
|
*nat
|
||||||
-I ss_rules6_dst 1 -m set --match-set omr6_dst_bypass_all dst -j RETURN
|
-I ss_rules6_default_dst 1 -m set --match-set omr6_dst_bypass_all dst -j RETURN
|
||||||
-I ss_rules6_local_out 1 -m set --match-set omr6_dst_bypass_all dst -j RETURN
|
-I ss_rules6_default_local_out 1 -m set --match-set omr6_dst_bypass_all dst -j RETURN
|
||||||
-I ss_rules6_local_out 2 -m mark --mark 0x6539 -j RETURN
|
-I ss_rules6_default_local_out 2 -m mark --mark 0x6539 -j RETURN
|
||||||
-I ss_rules6_pre_src 1 -m set --match-set omr6_dst_bypass_all dst -j MARK --set-mark 0x6539
|
-I ss_rules6_default_pre_src 1 -m set --match-set omr6_dst_bypass_all dst -j MARK --set-mark 0x6539
|
||||||
-I ss_rules6_pre_src 2 -m mark --mark 0x6539 -j RETURN
|
-I ss_rules6_default_pre_src 2 -m mark --mark 0x6539 -j RETURN
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue