Testing a TCP port with curl in Linux

Quick curl command to test a TCP port

SUCCESS - connected to port 443
[root@SERVER1 mail]# curl -v telnet://9.23.7.7:443
* About to connect() to port 443
*   Trying 9.23.7.7... * connected
* Connected to 9.23.7.7 (9.23.7.7) port 443

FAILED - failed connection to port 443
[root@SERVER1 mail]# curl -v telnet://9.23.7.7:443
* About to connect() to 9.23.7.7 port 443
*   Trying 9.23.7.7... * Connection refused
* Closing connection #0
curl: (7) couldn't connect
This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *