Check IP/Port

If you need to quickly check an external IP & port w/o sending anything..

/home/egatetst/scripts > ksh i-tcp-param.sh 170.999.0.67 3111
passed

/home/egatetst/scripts > ksh i-tcp-param.sh 170.999.0.67 3112
i-tcp-param.sh[3]: /dev/tcp/170.999.0.67/3112: cannot create
failed

>>>>START CODE<<<<<<<<<<<<<<<<<<<<
#!/usr/bin/ksh
# example : ksh i-tcp-param.sh 170.999.0.67 8888
if [ exec 3<> /dev/tcp/$1/$2 ]
then
echo “passed”
else
echo “failed”
fi
>>>>>>>>>END CODE<<<<<<<<<<<<

*NOTE: if this hangs it means that theres ‘no response’ from IP[amazonify]::omakase::300:250[/amazonify]


Leave a Comment

(required)

(required)

Formatting Your Comment

The following XHTML tags are available for use:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

URLs are automatically converted to hyperlinks.