Useful utilities :
Scenario: For checking remote system tcp 80 port status
Usage :
telnet myserver.com 80
nc -v myserver.com 80
nmap myserver.com 80
Response Analysis :
if you get a time out or deny : the port is not open
suppose if you get "Connection refused" : then port is open but process is not listerning
If you get a connection successful : Port is open and process is listen
Solution:
start/restart the listening process (if connection refused)
Ask network team to monitor the connection we can confirm whether it is blocked from intermediate network firewall or from server firewall/iptables
Note :
- Suppose firewall configured to Reject packets instead of Drop then u
will get "connection refused" error , so here in this case we can't
ensure wheteher process is listern or not.
For checking udp port (like ntp) you can use below nc option
nc -uzv yourserver.com 123
telnet
will return "connection timeout". I don't know what makes you cosider this as "not useful"telnet <ip address> <port-no>
would return "connection refused". Yes, after reading the answer below and your comment, I tried it again and it's giving the results as expected. Thanks