{"id":644,"date":"2008-02-18T17:06:00","date_gmt":"2008-02-18T23:06:00","guid":{"rendered":"http:\/\/www.cls-solutions.com\/blog\/?p=644"},"modified":"2008-02-18T17:06:00","modified_gmt":"2008-02-18T23:06:00","slug":"check-ipport","status":"publish","type":"post","link":"http:\/\/www.cls-solutions.com\/blog\/check-ipport\/","title":{"rendered":"Check IP\/Port"},"content":{"rendered":"<p>If you need to quickly check an external IP &#038; port w\/o sending anything..<\/p>\n<p>\/home\/egatetst\/scripts > ksh i-tcp-param.sh 170.999.0.67 3111<br \/>passed<\/p>\n<p>\/home\/egatetst\/scripts > ksh i-tcp-param.sh 170.999.0.67 3112<br \/>i-tcp-param.sh[3]: \/dev\/tcp\/170.999.0.67\/3112: cannot create<br \/>failed<\/p>\n<p>>>>>START CODE<<<<<<<<<<<<<<<<<<<<<br \/>#!\/usr\/bin\/ksh<br \/># example : ksh i-tcp-param.sh 170.999.0.67 8888<br \/>if [ exec 3<> \/dev\/tcp\/$1\/$2 ]<br \/>then<br \/>echo &#8220;passed&#8221;<br \/>else<br \/>echo &#8220;failed&#8221;<br \/>fi<br \/>>>>>>>>>>END CODE<<<<<<<<<<<<\n\n*NOTE: if this hangs it means that theres &#8216;no response&#8217; from IP \n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need to quickly check an external IP &#038; port w\/o sending anything.. \/home\/egatetst\/scripts > ksh i-tcp-param.sh 170.999.0.67 3111passed \/home\/egatetst\/scripts > ksh i-tcp-param.sh 170.999.0.67 3112i-tcp-param.sh[3]: \/dev\/tcp\/170.999.0.67\/3112: cannot createfailed >>>>START CODE<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":0,"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cls-solutions.com\/blog\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}