diff --git a/debian9-x86_64.sh b/debian9-x86_64.sh index eb73d72..8be8496 100644 --- a/debian9-x86_64.sh +++ b/debian9-x86_64.sh @@ -568,6 +568,7 @@ fi if [ "$V2RAY" = "yes" ]; then #apt-get -y -o Dpkg::Options::="--force-overwrite" install v2ray + rm -f /etc/systemd/system/v2ray.service wget -O /tmp/v2ray-${V2RAY_VERSION}-amd64.deb ${VPSURL}/debian/v2ray-${V2RAY_VERSION}-amd64.deb dpkg --force-all -i -B /tmp/v2ray-${V2RAY_VERSION}-amd64.deb rm -f /tmp/v2ray-${V2RAY_VERSION}-amd64.deb @@ -577,6 +578,7 @@ if [ "$V2RAY" = "yes" ]; then rm /etc/v2ray/config.json ln -s /etc/v2ray/v2ray-server.json /etc/v2ray/config.json fi + systemctl daemon-reload systemctl enable v2ray.service fi @@ -1070,7 +1072,7 @@ if ([ "$ID" = "debian" ] && [ "$VERSION_ID" = "10" ]) || ([ "$ID" = "ubuntu" ] & sed -i 's:DROP_DEFAULT=Drop:DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)":g' /etc/shorewall6/shorewall6.conf sed -i 's:REJECT_DEFAULT=Reject:REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)":g' /etc/shorewall6/shorewall6.conf fi -if [ "$(ip r | awk '/default/&&/src/ {print $7}')" != "" ]; then +if [ "$(ip r | awk '/default/&&/src/ {print $7}')" != "" ] && [ "$(ip r | awk '/default/&&/src/ {print $7}')" != "dhcp" ]; then sed -i "s/MASQUERADE/SNAT($(ip r | awk '/default/&&/src/ {print $7}'))/" /etc/shorewall/snat fi diff --git a/omr-service b/omr-service index 9e17665..1aa788f 100755 --- a/omr-service +++ b/omr-service @@ -5,10 +5,12 @@ _multipath() { # Force multipath status source /etc/shorewall/params.net for intf in `ls -1 /sys/class/net`; do - if [ "$intf" = "$NET_IFACE" ]; then - [ "$(multipath $intf | tr -d '\n')" != "$intf is in default mode" ] && multipath $intf on - else - [ "$(multipath $intf | tr -d '\n')" != "$intf is deactivated" ] && multipath $intf off + if [ "$intf" != "bonding_masters" ]; then + if [ "$intf" = "$NET_IFACE" ]; then + [ "$(multipath $intf | tr -d '\n')" != "$intf is in default mode" ] && multipath $intf on + else + [ "$(multipath $intf | tr -d '\n')" != "$intf is deactivated" ] && multipath $intf off + fi fi done } @@ -74,7 +76,7 @@ _gre_tunnels() { } _openvpn_bonding() { - if [ "$(ip link show ovpnbonding1)" != "" ] && ([ "$(ip link show ovpnbonding1 | grep SLAVE)" = "" ] || [ "$(ip link show omr-bonding | grep DOWN)" != "" ] || [ "$(ip link show | grep ovpnbonding | grep -c SLAVE)" != "8" ]); then + if [ "$(ip link show ovpnbonding1)" != "" ] && ([ "$(ip link show ovpnbonding1 | grep SLAVE)" = "" ] || [ "$(ip link show omr-bonding | grep DOWN)" != "" ] || [ "$(ip link show | grep ovpnbonding | grep -c SLAVE | tr -d '\n')" != "8" ]); then echo 0 > /sys/class/net/omr-bonding/bonding/mode ip link set ovpnbonding1 master omr-bonding 2>&1 >/dev/null ip link set ovpnbonding1 up