mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-22 20:51:17 +01:00
Update check-dns-server.ps1
This commit is contained in:
parent
b185f9b145
commit
2100056e6b
@ -11,44 +11,41 @@
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
function CheckDNS { param($IP, $Name)
|
||||
function CheckDNS { param($Name, $PriIPv4, $SecIPv4)
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
$null = (nslookup whitehouse.gov $IP)
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalMilliseconds
|
||||
" $Name at $IP = $Elapsed ms "
|
||||
$null = (nslookup whitehouse.gov $PriIPv4)
|
||||
[int]$PriIPv4Elapsed = $StopWatch.Elapsed.TotalMilliseconds
|
||||
|
||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
$null = (nslookup whitehouse.gov $SecIPv4)
|
||||
[int]$SecIPv4Elapsed = $StopWatch.Elapsed.TotalMilliseconds
|
||||
|
||||
" `"$Name`"; `"$PriIPv4`"; `"$PriIPv4Elapsed ms`"; `"$SecIPv4`"; `"$SecIPv4Elapsed ms`"; "
|
||||
}
|
||||
|
||||
try {
|
||||
"Checking speed of public DNS server..."
|
||||
CheckDNS 1.1.1.1 "Cloudflare (primary)"
|
||||
CheckDNS 1.0.0.1 "Cloudflare (secondary)"
|
||||
CheckDNS 1.1.1.2 "Cloudflare with malware blocklist"
|
||||
CheckDNS 1.0.0.2 "Cloudflare with malware blocklist"
|
||||
CheckDNS 1.1.1.3 "Cloudflare with malware+adult blocklist"
|
||||
CheckDNS 1.0.0.3 "Cloudflare with malware+adult blocklist"
|
||||
CheckDNS 84.200.69.80 "DNS.Watch (primary)"
|
||||
CheckDNS 84.200.70.40 "DNS.Watch (secondary)"
|
||||
CheckDNS 37.235.1.174 "FreeDNS Vienna (primary)"
|
||||
CheckDNS 37.235.1.177 "FreeDNS Vienna (secondary)"
|
||||
CheckDNS 8.8.8.8 "Google Public DNS (primary)"
|
||||
CheckDNS 8.8.4.4 "Google Public DNS (secondary)"
|
||||
CheckDNS 4.2.2.1 "Level3 one"
|
||||
CheckDNS 4.2.2.2 "Level3 two"
|
||||
CheckDNS 4.2.2.3 "Level3 three"
|
||||
CheckDNS 4.2.2.4 "Level3 four"
|
||||
CheckDNS 4.2.2.5 "Level3 five"
|
||||
CheckDNS 4.2.2.6 "Level3 six"
|
||||
CheckDNS 208.67.222.222 "OpenDNS Basic (primary)"
|
||||
CheckDNS 208.67.220.220 "OpenDNS Basic (secondary)"
|
||||
CheckDNS 208.67.222.123 "OpenDNS Family Shield (primary)"
|
||||
CheckDNS 208.67.220.123 "OpenDNS Family Shield (secondary)"
|
||||
CheckDNS 94.247.43.254 "OpenNIC"
|
||||
CheckDNS 9.9.9.9 "Quad9 with malware blocklist, with DNSSEC"
|
||||
CheckDNS 9.9.9.10 "Quad9, no malware blocklist, no DNSSEC"
|
||||
CheckDNS 9.9.9.11 "Quad9, with malware blocklist, with DNSSEC, with EDNS"
|
||||
CheckDNS 9.9.9.12 "Quad9, with malware blocklist, with DNSSEC, NXDOMAIN only"
|
||||
CheckDNS 64.6.64.6 "Verisign Public DNS (primary)"
|
||||
CheckDNS 64.6.65.6 "Verisign Public DNS (secondary)"
|
||||
" `"Company`"; `"IPv4 primary`"; `"Latency in ms`"; `"IPv4 secondary`"; `"Latency in ms`"; "
|
||||
CheckDNS "Cloudflare" 1.1.1.1 1.0.0.1
|
||||
CheckDNS "Cloudflare with malware blocklist" 1.1.1.2 1.0.0.2
|
||||
CheckDNS "Cloudflare with malware+adult blocklist" 1.1.1.3 1.0.0.3
|
||||
CheckDNS "DNS.Watch" 84.200.69.80 84.200.70.40
|
||||
CheckDNS "FreeDNS Vienna" 37.235.1.174 37.235.1.177
|
||||
CheckDNS "Google Public DNS" 8.8.8.8 8.8.4.4
|
||||
CheckDNS "Level3 one" 4.2.2.1 4.2.2.1
|
||||
CheckDNS "Level3 two" 4.2.2.2 4.2.2.2
|
||||
CheckDNS "Level3 three" 4.2.2.3 4.2.2.3
|
||||
CheckDNS "Level3 four" 4.2.2.4 4.2.2.4
|
||||
CheckDNS "Level3 five" 4.2.2.5 4.2.2.5
|
||||
CheckDNS "Level3 six" 4.2.2.6 4.2.2.6
|
||||
CheckDNS "OpenDNS Basic" 208.67.222.222 208.67.220.220
|
||||
CheckDNS "OpenDNS Family Shield" 208.67.222.123 208.67.220.123
|
||||
CheckDNS "OpenNIC" 94.247.43.254 94.247.43.254
|
||||
CheckDNS "Quad9 with malware blocklist, with DNSSEC" 9.9.9.9 9.9.9.9
|
||||
CheckDNS "Quad9, no malware blocklist, no DNSSEC" 9.9.9.10 9.9.9.10
|
||||
CheckDNS "Quad9, with malware blocklist, with DNSSEC, with EDNS" 9.9.9.11 9.9.9.11
|
||||
CheckDNS "Quad9, with malware blocklist, with DNSSEC, NXDOMAIN only" 9.9.9.12 9.9.9.12
|
||||
CheckDNS "Verisign Public DNS" 64.6.64.6 64.6.65.6
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user