Simple use of netcat for checking a port is open on a firewall/load balancer

Server (Listener)

    root@server:/var/tmp> cat pcanham.txt
    Welcome to the Server on port 7735.
    root@server:/var/tmp> netcat -l -s server.example.com -p 7735 <pcanham.txt

Client

    root@scar:/> telnet server.example.com 7735
    Trying 10.10.10.20...
    Connected to server.example.com.
    Escape character is '^]'.
    Welcome to the Server on port 7735.
    ^]
    telnet> q
    Connection to server.example.com closed.
Share