Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.
my focus is whether I can reach the server through specific port [..]
in that case, how to make sure that firewall defined(or not), using tools/commands ?
nc -z -w 1 $ip $port >/dev/null 2>&1
Open in new window
$ /usr/lib64/nagios/plugins/check_tcp -H 192.168.1.100 -p 143
TCP OK - 0.020 second response time on 192.168.1.100 port 143|time=0.019999s;;;0.000000;10.000000
$ /usr/lib64/nagios/plugins/check_tcp -H 192.168.1.102 -p 143 # takes time, no ICMP host unavailable returned appearantly
CRITICAL - Socket timeout
$ /usr/lib64/nagios/plugins/check_tcp -H 192.168.1.100 -p 144 # port unavailble ICMP returned.
connect to address 192.168.1.100 and port 144: Connection refused
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Members can enroll in this course at no extra cost.