Skip to content

Linux Networking Netcat

Links: Linux Networking Index


Netcat

  • We can use netcat for troubleshooting networking issues.
  • Command to test a basic connection for a service that has a particular IP and is listening on a specific port:
    • nc -vz <IP-Address/Host-name> <port>
    • -z option is used for reporting connection status without establishing a connection.
    • -v is for verbose mode.
  • Sending a udp packet: nc -u <host> <port>
  • Create a chat server:
    • nc -l -p <port>
    • Connecting to the chat server: nc -v <host> <port>

References


Last updated: 2023-05-24