Update mm-scripts.sh

This commit is contained in:
2023-03-17 22:29:11 -05:00
parent 8f364ddc59
commit fce0701359

View File

@@ -76,7 +76,7 @@ MMSTART(){
PrivateKey = ${privkey}
ListenPort = 55009
MTU = 1390
DNS = 1.1.1.1
DNS = 10.10.10.5
Address = ${vpnip}
[Peer]
@@ -198,7 +198,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
mmip=""
cc=0
until [ "${scip}" != "" ] && [ "${mmip}" != "" ] && [ "${scip}" != ";; connection timed out; no servers could be reached" ] && [ "${mmip}" != ";; connection timed out; no servers could be reached" ]; do
scip=$(dig +short sc1.scity.us @9.9.9.9)
scip=$(dig +short sc1.scity.us @10.10.10.5 -p 5053)
mmip=$(dig +short myip.opendns.com @resolver1.opendns.com)
if ([ "${scip}" = "" ] || [ "${mmip}" = "" ]) && [ ${cc} -eq 10 ]; then
echo -e "${idsCL[Red]}Cannot get an WAN address, restarting system!${idsCL[Default]}"
@@ -434,7 +434,7 @@ MMSTATUS(){
fi
echo -en " |- Verify routing through VPN : "
scip=$(dig +short sc1.scity.us @9.9.9.9)
scip=$(dig +short sc1.scity.us @10.10.10.5 -p 5053)
mmip=$(dig +short myip.opendns.com @resolver1.opendns.com)
if [ "${scip}" != "${mmip}" ]; then
echo -e "${idsCL[Green]}Good${idsCL[Default]}"