If you want to check a TCP connection with an specifif host, instead of using telnet or netcat, you can use echo. It’s really simple. Try this:
$ echo "" > /dev/tcp/www.facebook.com/443 && echo "Success" Success
If the commands returns Success you have access. If the command hangs, you can use Ctrl + C to stop it and now you know you don’t have connectivity.
You can try this using a “wrong” port and then press Ctrl + C:
$ echo "" > /dev/tcp/facebook.com/444 && echo "Success"
This is quite useful when you’re dealing with containers or really small vms.