There are may ways to check for open TCP ports. Usually I prefer to use netcat or telnet, however in some cases (especially within docker containers) these tools are not installed or available. This post shows most common ways to check if a remote port is open or not. telnet Even though the telnet client tool is supposed to be used for the telnet protocol (ie. remotely logging in to a Unix computer before we had ssh), it is also a handy tool to check for an open port. For example, we can use it to check if we can access www.google.com via HTTPS: $ telnet www.google.com 443 Trying 142.250.70.196... Connected to www.google.com. If we see the " Connected " message, we can deduct from this that the port is open - even though there are protocol differences. Furthermore, if the service is unencrypted, telnet will show us status messages / protocol hints and versions etc. The following connects to a Google mail / SMTP server. $ telnet smtp.google.com 25 Trying 74.125.24.27... Co
Everything Unix, Cloud and Kubernetes