i am adding to this script but take it and try it out for yourself…

#****************************************************************

# This script will test direct access
# it is very much work in progress and will be modified…
# at the minute this script will test which tunnel mode you are using
# i have a deep problem into teredo and will do the reset!

$useteredo = “0”
$use6to4 = “0”
$usehttps = “0”

$6to4 = netsh interface 6to4 show state
write-host “Checking to see if you are using 6to4……..”
Foreach ($6 in $6to4)
{
if ($6 -match “disabled”)
{
write-host “6to4 protocol is disabled”
write-host “You must be behind a NAT Device..”
}
else
{
$use6to4 = “1”
}

}

$teredo = netsh interface teredo show state
write-host “Checking to see if you are using teredo……..”
Foreach ($t in $teredo)
{
if ($t -match “disabled”)
{
write-host “Teredo protocol is disabled”
write-host “Your NAT Device Seems to be blocking UDP 3544”
}
else
{
$useteredo = “1”

}

}

$iphttps = netsh interface httpstunnel show interface

Foreach ($i in $iphttps)
{
 

if ($i -match “disabled”)
{
write-host “IPHTTPS protocol is disabled”

}

else
{
$usehttps = “1”

}

}

if($useteredo -eq “1”)
{
write-host “You are using Teredo”
$teredo1 = netsh interface teredo show state
$teredo2 = $teredo1 | where-object {$_ -match “Server Name”} |foreach-object {$_.Split(“:”)[1].Trim()}
$teredo3 = $teredo2.split(“(“)
Write-Host
Write-Host
Write-host “Direct Access Public Hostname is…. :” $teredo3[0]
Write-Host
Write-Host “Pinging host….” $teredo3[0]
$ping = ping $teredo3
$ping1 = $ping | Where-Object{ $_ -match “Request”}
$ping2 = $ping | Where-Object{ $_ -match “Reply”}
Write-Host
Write-Host
if ($ping1 -ne $null)
{
write-host $teredo3[0] “could not be contacted”
$noreach = 1
}
elseif ($ping2 -ne $null)
{
Write-Host $teredo3[0] “could be reached”
$noreach = 0
}

if ($noreach = 1)
{
write-host “Testing Internet Connection…..”
$testhost = “tpm.daccess.microsoft.com”
$inettest = ping $testhost
$inettest1 = $inettest | Where-Object{ $_ -match “Reply”}

if ($inettest1 -ne $null)
{
Write-Host “You have a connection to the internet!”
}
else {write-host ” you have no internet connection please check with your provider”}
}

}
elseif($use6to4 -eq “1”)
{
write-host “You are using 6to4”
}
elseif($usehttps -eq “1”)
{
write-host “You are using HTTPSTUNNEL”
}
else
{write-host “All protocols are disabled”}

#*************************************************************************************************