How to Test Port[TCP/UDP] Connectivity from a Linux Server
Applies To:
Oracle Cloud Infrastructure
Oracle Linux
Goal
Procedure to check port [TCP/UDP] connectivity from a Linux server
Solution
Telnet and nc are common tools used to test port connectivity from Linux server. Telnet can be used to test tcp port connections, whereas nc can be used to test both tcp/udp ports connectivity.
Make sure telnet and nc tools are installed on the Linux server you are trying to test connectivity.
# yum install nc
# yum install telnet
Testing tcp port connectivity:
Syntax: telnet <hostname/IP address> <port number>
Example of successful connection:
# telnet <ip address> 22
Trying <ip address>...
Tagged:
0