Update mm-scripts.sh

This commit is contained in:
2023-03-24 23:30:17 -05:00
parent ca69e8eb9b
commit be8c98da28

View File

@@ -159,7 +159,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
/bin/ip route add default dev ${VPN_INTERFACE}
/bin/ip route add 0.0.0.0/1 dev ${VPN_INTERFACE}
/bin/ip route add 128.0.0.0/1 dev ${VPN_INTERFACE}
/bin/ip route add $(cat ${MMFOLDER}/vpn_server_address)/32 via 10.10.0.1 dev eth0
/bin/ip route add ${vpn_server_address}/32 via 10.10.0.1 dev eth0
echo -e "${idsCL[Green]} done${idsCL[Default]}"
zerogw=$(/sbin/ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
@@ -375,7 +375,7 @@ MMSTOP(){
fi
done
[ "$(/sbin/ip route show | grep default | cut -d' ' -f 3)" != "10.10.0.1" ] && /bin/ip route add default via 10.10.0.1 && ip route del $(cat ${MMFOLDER}/vpn_server_address)
[ "$(/sbin/ip route show | grep default | cut -d' ' -f 3)" != "10.10.0.1" ] && /bin/ip route add default via 10.10.0.1 && ip route del ${vpn_server_address}
[ $VERBOSE = true ] && echo "$(date) - Added default route back in" >> $logfile
rm -f ${MMFOLDER}/vpninfo*