<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd" -->

---
title: Using netcat for a Simple Connectivity Test | daily.dev
description: A quick reference for using netcat (`nc`) to test network connectivity between two hosts. Start a listener with `nc -l -p 9999` and connect to it with `nc...
canonical: https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Using netcat for a Simple Connectivity Test | daily.dev
og:description: A quick reference for using netcat (`nc`) to test network connectivity between two hosts. Start a listener with `nc -l -p 9999` and connect to it with `nc...
og:url: https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd
og:image: https://api.daily.dev/og/posts/pxf9xQNBD.png
og:image:alt: Using netcat for a Simple Connectivity Test
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Using netcat for a Simple Connectivity Test

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 1 min read · 3 upvotes · 0 comments

## Summary

A quick reference for using netcat (`nc`) to test network connectivity between two hosts. Start a listener with `nc -l -p 9999` and connect to it with `nc <listener-host> 9999`. Works with Docker Compose container names as hostnames or localhost for same-host testing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2026/07/using-netcat-for-a-simple-connectivity-test>

## Similar posts on daily.dev

- [Linux Fu: UPNP A Port Mapping Odyssey](https://daily.dev/posts/linux-fu-upnp-a-port-mapping-odyssey-elhoupfc4) · Hackaday · 0 upvotes · 0 comments

---

Tags: [#docker](https://daily.dev/tags/docker), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Using netcat for a Simple Connectivity Test","url":"https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd"},"datePublished":"2026-07-02T21:10:27.562Z","dateModified":"2026-07-02T21:11:32.969Z","description":"A quick reference for using netcat (`nc`) to test network connectivity between two hosts. Start a listener with `nc -l -p 9999` and connect to it with `nc...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"No Dogma Blog (Bryan Hogan)","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"No Dogma Blog (Bryan Hogan)","logo":"https://media.daily.dev/image/upload/s--0RnGeoPG--/f_auto,q_auto/v1780213499/logos/bryanhogan?_a=BAMAMiWQ0","url":"https://daily.dev/sources/bryanhogan"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/using-netcat-for-a-simple-connectivity-test-pxf9xqnbd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"docker,networking","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"No Dogma Blog (Bryan Hogan)","item":"https://daily.dev/sources/bryanhogan"},{"@type":"ListItem","position":3,"name":"Using netcat for a Simple Connectivity Test"}]}
```

