How to install telnet on MacOS

If you don’t have Homebrew then go ahead and install it:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install telnet:

brew install telnet

Example of usage:

telnet google.com 80

Output:

Trying 142.250.180.238…
Connected to google.com.
Escape character is ‘^]’.

Instead of telnet you can use nc (netcat)command

Example:

nc -v google.com
Read the rest

How to create port listener on Linux

Install nc if needed

yum install nc

Run listener on port 3000

nc -l 3000 &
nc -l -k 3000 &

where -k is –keep-open will keep connection opened and allows multiple connections in listen mode

Check on the server’s side:

netstat -tunap |grep :3000

Output:

tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN      82786/nc            

Check from local machine:

$ nmap -p 3000 SERVERS_IP_ADDRESS

Output:

Starting Nmap 7.01 ( https://nmap.org
Read the rest