Checking the port connectivity in case telnet is not installed.
Many times telnet is not installed on the production systems so in
this case port connectivity testing can be done with alternative method
by using Wget - The non-interactive network downloader Linux utility
usually available on the production systems. You can run this as regular
user without being "root" user and test the connectivity to the desired
port. Here is the example:
prodone-t> wget 10.22.176.3:5222
--2015-02-25 10:50:08-- http://10.22.176.3:5222/
Connecting to 10.22.176.3:5222... connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: “index.html”
[ <=> ] 305 --.-K/s in 0s
2015-02-25 10:50:09 (29.3 MB/s) - “index.html” saved [305]
Don't worry about the error you see in index.html. That is not our goal, focus on the line-
Connecting to 10.22.176.3:5222... connected.
-------------------------------------------------------
Here is nmap example if in case you do not have either of telnet & wget:
In example 1 is checking the status of the running port. In example 2
nmap is checking the status of the port which you can make out is a non-standard
port.
example 1:
sateprod-1> nmap 10.11.160.5 -sT -p 5222
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2015-02-25 10:57 PST
Interesting ports on sateprod-1.capgroup.com (10.11.160.5):
PORT STATE SERVICE
5222/tcp open unknown
Nmap finished: 1 IP address (1 host up) scanned in 0.118 seconds
example 2:
sateprod-1> nmap 10.11.160.5 -sT -p 522
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2015-02-25 10:57 PST
Interesting ports on iosatprd-v1.capgroup.com (10.11.160.5):
PORT STATE SERVICE
522/tcp closed ulp
Nmap finished: 1 IP address (1 host up) scanned in 0.106 seconds
example 3:
Another way to test the connectivity is wget
# wget 10.120.33.23:22
# wget 10.120.33.23:69