Quick way to test connectivity between two hosts via nc (concatenate and redirect sockets)
ncat is a feature packed network utility which reads and write data across network from the command line.
Note: hostA is server and hostB is client
hostA# nc -l 80
--> leave it running in a listening status
hostB# nc -vnz
OR if you are using any NAT ip address to reach to the internal network from outside world
Using curl and python.
On the server side run the
hostA# python -m SimpleHTTPServer 33101
Serving HTTP on 0.0.0.0 port 33101 ...
from hostB
hostb# curl -vs
you will see the Rebuilt URL to the IP address of the server via specified port and connecting successfully followed by closing the connection