Translate

How to use nc to check internet connection

 1. What is nc:

Nc is short for netcat, nc can be used to test tcp and udp port on Linux.
* telnet only can used for tcp port

2. How to use:

    2.1 basic usage:

    -l: the host will be used as server and keep listening on this port
    -u: change to use UDP, default is TCP

    2.2 check the port of server is open or not

    server: nc -l port
    client: nc ip port

    Then, type anything on client, if server can receive the words from client. It means this port is open.




No comments:

Post a Comment