Tip: How to test remote opened ports
At the beginning of times when computers had to be connected among them, some questions arose in the mind of system administrators: Can I check this before the roll-up at night? :)
But, what happens when the systems are so minimal without the possibility to install new packages? Answer; Use nc command.
Telnet
Surely is the most used tool for this task, but inherently it has an enormous disadvantage: has to be explicitly installed by the administrator.
$ telnet site.com port
NC
NC is installed by default in almost all GNU/Linux distros, so, you can use it to test the opened ports of other hosts.
┌[lyonn@almanegra] [/dev/pts/1]
└[~]> nc -zv google.com 443
Connection to google.com (142.251.33.238) 443 port [tcp/https] succeeded!
Netcat
I do not know anybody that keeps netcat in production servers, but it’s ok for demonstration purposes.
┌[lyonn@almanegra] [/dev/pts/1]
└[~]> nmap -sT google.com
Starting Nmap 7.80 ( https://nmap.org ) at 2023-04-03 20:00 CST
Nmap scan report for google.com (142.251.33.238)
Host is up (0.0072s latency).
Other addresses for google.com (not scanned): 2607:f8b0:4012:812::200e
rDNS record for 142.251.33.238: qro01s26-in-f14.1e100.net
Not shown: 997 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
1723/tcp open pptp
Nmap done: 1 IP address (1 host up) scanned in 4.44 seconds
Note: NC and netcat are the same thing but with some variations in behavior and compilation time, among others.
Check this post for more information!