This is such a simple trick, I'm still surprised. When you need to test a connection (TCP) but have no telnet or nc, you can use this workaround:
echo > /dev/tcp/google.com/80
You won't get a response back, but that exitstatus ($?) will be either:
If it takes really long for the command line to get back, not connection is possible.
You can use this to send data to UDP, but since UDP is stateless, the exit status will always be "0".