{"id":821,"date":"2026-10-02T02:01:46","date_gmt":"2026-10-02T02:01:46","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=821"},"modified":"2026-10-02T02:01:46","modified_gmt":"2026-10-02T02:01:46","slug":"netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/","title":{"rendered":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting"},"content":{"rendered":"<div style=\"padding:20px\"><p class=\"wp-block-paragraph\">Network faults on a Windows VPS usually show up as a single symptom \u2014 &#8220;the app can&#8217;t connect&#8221; \u2014 while the cause sits somewhere between DNS, the firewall, the listener, and the provider&#8217;s edge. Three tools cover most of that ground: <code>Test-NetConnection<\/code> for end-to-end reachability, <code>Get-NetTCPConnection<\/code> for local listener state, and <code>netsh<\/code> for the lower-level interface, firewall, and trace work. Knowing which to reach for, and in what order, cuts troubleshooting time dramatically.<\/p>\n\n<h2 class=\"wp-block-heading\">Start With Test-NetConnection<\/h2>\n\n<p class=\"wp-block-paragraph\"><code>Test-NetConnection<\/code> is the modern replacement for telnet-based port checks and answers several questions at once.<\/p>\n\n<ul class=\"wp-block-list\"><li><code>Test-NetConnection web01 -Port 443<\/code> \u2014 does the TCP handshake complete? TcpTestSucceeded: True is the answer you want.<\/li><li><code>Test-NetConnection web01 -InformationLevel Detailed<\/code> \u2014 adds source address selection, ping results, and route hints; useful when a host is reachable by IP but not by name.<\/li><li><code>Test-NetConnection 10.0.0.5 -TraceRoute<\/code> \u2014 shows the path, which exposes asymmetric routing and provider edge problems.<\/li><li>Use the IP form to separate a DNS failure from a connectivity failure: if the IP works and the name does not, the problem is resolution, not transport.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">Then Check the Local Listener<\/h2>\n\n<p class=\"wp-block-paragraph\">If the connection fails from outside, confirm something is actually listening and on which address.<\/p>\n\n<ul class=\"wp-block-list\"><li><code>Get-NetTCPConnection -State Listen<\/code> \u2014 every TCP listener with its local address and owning process.<\/li><li><code>Get-NetTCPConnection -LocalPort 443 -State Listen | Select-Object LocalAddress, OwningProcess<\/code> \u2014 narrow to the port in question.<\/li><li><code>Get-Process -Id (Get-NetTCPConnection -LocalPort 443 -State Listen).OwningProcess<\/code> \u2014 identify the process behind the port.<\/li><li>A listener bound to 127.0.0.1 will never accept remote traffic. This is the most common cause of &#8220;the service is running but unreachable&#8221; on a VPS.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">netsh for the Lower Layers<\/h2>\n\n<ul class=\"wp-block-list\"><li><code>netsh interface ipv4 show config<\/code> \u2014 full interface configuration including metrics, which decide which NIC wins when several are present.<\/li><li><code>netsh advfirewall firewall show rule name=all<\/code> \u2014 dump every firewall rule; search for the port and check profile, protocol, and action.<\/li><li><code>netsh advfirewall firewall add rule name=\"App 8090\" dir=in action=allow protocol=TCP localport=8090<\/code> \u2014 add an allow rule when you have confirmed the listener is correct.<\/li><li><code>netsh trace start capture=yes tracefile=C:\\temp\\net.etl<\/code> then <code>netsh trace stop<\/code> \u2014 a built-in packet capture when you need evidence for the provider.<\/li><li><code>netsh int ip reset<\/code> and <code>netsh winsock reset<\/code> \u2014 last-resort stack repairs that require a reboot.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">A Diagnostic Order That Works<\/h2>\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Step<\/th><th>Command<\/th><th>What a failure means<\/th><\/tr><\/thead><tbody><tr><td>1. Resolve name<\/td><td><code>Resolve-DnsName host<\/code><\/td><td>DNS \/ zone \/ forwarder issue<\/td><\/tr><tr><td>2. Test port<\/td><td><code>Test-NetConnection host -Port n<\/code><\/td><td>Route, firewall, or listener<\/td><\/tr><tr><td>3. Confirm listener<\/td><td><code>Get-NetTCPConnection -LocalPort n -State Listen<\/code><\/td><td>App not bound or bound locally only<\/td><\/tr><tr><td>4. Check firewall<\/td><td><code>netsh advfirewall firewall show rule name=all<\/code><\/td><td>Local rule blocking the traffic<\/td><\/tr><tr><td>5. Capture<\/td><td><code>netsh trace start<\/code><\/td><td>Evidence for provider escalation<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<h2 class=\"wp-block-heading\">Provider-Edge Problems Are Their Own Category<\/h2>\n\n<p class=\"wp-block-paragraph\">If steps 1-4 all pass locally but traffic still does not arrive, the block is outside the VM: a provider firewall, a security group, or an upstream ACL. This is where the <code>netsh trace<\/code> capture earns its keep \u2014 it is the artifact a support engineer can act on. Keep a note of the ports you actually use and open only those; a tidy, documented set of inbound rules makes escalation faster and audits shorter. If inconsistent results point to the host platform rather than your configuration, it is worth <a href=\"https:\/\/windows-vps.org\/\">reviewing the VPS platform choices<\/a> before you assume the app is at fault.<\/p>\n\n<h2 class=\"wp-block-heading\">Keep the Toolkit Close<\/h2>\n\n<p class=\"wp-block-paragraph\">These three commands cover name resolution, port reachability, local binding, firewall state, and packet evidence \u2014 the whole chain from client to listener. Practicing them on a known-good server first means that when something breaks at 2 a.m., the sequence is muscle memory rather than guesswork.<\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>Network faults on a Windows VPS usually show up as a single symptom \u2014 &#8220;the app can&#8217;t connect&#8221; \u2014 while the cause sits somewhere between DNS, the firewall, the listener, and the provider&#8217;s edge. Three tools cover most of that ground: Test-NetConnection for end-to-end reachability, Get-NetTCPConnection for local listener state, and netsh for the lower-level &#8230; <a title=\"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\" aria-label=\"Read more about A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":6,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-821","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting - Windows VPS Blog<\/title>\n<meta name=\"description\" content=\"Network faults on a Windows VPS usually show up as a single symptom \u2014 &quot;the app can&#039;t connect&quot; \u2014 while the cause sits somewhere between DNS, the firewall,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting\" \/>\n<meta property=\"og:description\" content=\"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-02T02:01:46+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@myxiechengxuan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\",\"name\":\"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-10-02T02:01:46+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"description\":\"Network faults on a Windows VPS usually show up as a single symptom \u2014 \\\"the app can't connect\\\" \u2014 while the cause sits somewhere between DNS, the firewall,\",\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\",\"https:\/\/x.com\/myxiechengxuan\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting - Windows VPS Blog","description":"Network faults on a Windows VPS usually show up as a single symptom \u2014 \"the app can't connect\" \u2014 while the cause sits somewhere between DNS, the firewall,","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/","og_locale":"en_US","og_type":"article","og_title":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting","og_description":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting","og_url":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-10-02T02:01:46+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_creator":"@myxiechengxuan","twitter_misc":{"Written by":"windows-vps","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/","url":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/","name":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-10-02T02:01:46+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"description":"Network faults on a Windows VPS usually show up as a single symptom \u2014 \"the app can't connect\" \u2014 while the cause sits somewhere between DNS, the firewall,","breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/netsh-get-nettcpconnection-test-netconnection-vps-troubleshooting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"A Field Guide to netsh, Get-NetTCPConnection, and Test-NetConnection for VPS Network Troubleshooting"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog","https:\/\/x.com\/myxiechengxuan"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=821"}],"version-history":[{"count":1,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/821\/revisions"}],"predecessor-version":[{"id":823,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/821\/revisions\/823"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}