Last active
March 18, 2026 17:03
-
-
Save notmayo/212735c96fb0e573d26e1713ac658915 to your computer and use it in GitHub Desktop.
Crude dashboard to monitor network connectivity in even the most austere network environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// | |
| # This script was originally written as a crude dashboard to monitor a DoD/DoW deployed network that had dual WANs & a SATCOM NMS server. | |
| # If a connection to the given IP or DNS hostname is successful, the status is printed in green. If the connection fails, the status is printed in red. | |
| # This script can be used with any three WAN or LAN IP addresses or DNS hostnames that you want to monitor. The three categories in the example below are just suggestions. | |
| # | |
| # WAN1: Unclassified (NIPR) - The DoD's unclassified network. Services below are only accessible via NIPR and NOT over commercial internet. | |
| # DISA DNS Servers: | |
| # Primary: 152.229.110.232 | dns1.disa.mil | |
| # Secondary: 131.77.60.232 | dns2.disa.mil | |
| # Tertiary: 214.3.125.232 | dns3.disa.mil | |
| # WAN2: Commercial internet / "The Internet" / Clearnet / "dirty net" - Google, Facebook, etc. | |
| # Google: 8.8.8.8, 8.8.4.4 | 2001:4860:4860::8888, 2001:4860:4860::8844 | google.com | |
| # Cloudflare: 1.1.1.1, 1.0.0.1 | 2606:4700:4700::1111, 2606:4700:4700::1001 | cloudflare.com | |
| # Quad9: 9.9.9.9 | 2620:fe::fe | dns.quad9.net | |
| # SATCOM NMS: A network management server for a SATCOM system | |
| # Usually a LAN IP address. | |
| # | |
| # You can modify the IP addresses and/or DNS hostnames below to fit your needs. | |
| $WAN1 = "dns1.disa.mil" # Defaulted to DISA's primary DNS server hostname. | |
| $WAN2 = "8.8.8.8" # Defaulted to Google's primary public DNS server IP. | |
| $NetworkMonitor = "172.30.14.6" # Random LAN IP address for a SATCOM NMS server. | |
| # /// Do not modify below this line unless you know what you are doing. /// | |
| set-executionpolicy unrestricted | |
| clear | |
| while($true) | |
| { | |
| $date = Get-Date | |
| $sleep = 10 | |
| $Tab = [char]9 | |
| Write-Host -Fore "Blue" "Ping status $date" | |
| Write-Output ----- | |
| ForEach($MachineName In $PingCommercial) | |
| {$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" | | |
| Select-Object StatusCode | |
| If ($PingStatus.StatusCode -eq 0) | |
| {Write-Host Commercial: $($tab)$($tab) $MachineName $($tab)$($tab) Connection successful -Fore "Green"} | |
| Else | |
| {Write-Host Commercial: $($tab)$($tab) $MachineName $($tab)$($tab) Connection failure -Fore "Red"}} | |
| ForEach($MachineName In $PingNIPR) | |
| {$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" | | |
| Select-Object StatusCode | |
| If ($PingStatus.StatusCode -eq 0) | |
| {Write-Host NIPR: $($tab) $($tab)$($tab) $MachineName $($tab)$($tab) Connection successful -Fore "Green"} | |
| Else | |
| {Write-Host NIPR: $($tab) $($tab)$($tab) $MachineName $($tab)$($tab) Connection failure -Fore "Red"}} | |
| ForEach($MachineName In $PingNMS) | |
| {$PingStatus = Gwmi Win32_PingStatus -Filter "Address = '$MachineName'" | | |
| Select-Object StatusCode | |
| If ($PingStatus.StatusCode -eq 0) | |
| {Write-Host SATCOM NMS: $($tab)$($tab) $MachineName $($tab)$($tab) Connection successful -Fore "Green"} | |
| Else | |
| {Write-Host SATCOM NMS: $($tab)$($tab) $MachineName $($tab)$($tab) Connection failure -Fore "Red"}} | |
| Write-Output ----- | |
| Write-Host -Fore "White" "Waiting $($sleep) second(s)" | |
| Write-Output " " | |
| start-sleep -seconds $sleep | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment