While working on VMware Unified Access Gateway, we needed to test TCP/UDP port connectivity from within the appliance to a syslog server.

The appliance did not have the usual go to tool, netcat. So, what are the alternatives to test port connectivity in Linux?

Interestingly, you can use bash to test port connectivity for you, like below:

To test tcp port connectivity to on port 514, use the command

localhost:~# cat < /dev/tcp/

If the connection is not successful, you would notice an error similar to:

-bash: connect: Connection refused
-bash: /dev/tcp/ Connection refused