diff --git a/mm-scripts.sh b/mm-scripts.sh index ce0353e..d0402d7 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -149,7 +149,8 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf defaultgw=$(/sbin/ip route show | grep default | cut -d' ' -f 3) # if [ "${zerogw}" != "${defaultgw}" ]; then - if [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then + # if [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then + if [ "${zerogw}" != "${defaultgw}" ] || [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then echo "$(date) - Adding VPN default routes" >> $logfile echo -en "${idsCL[LightCyan]}Adding VPN default routes :${idsCL[Default]}" /bin/ip route del default