[PJUG Javamail] ICMP Echo in Java
VY
vyau5678 at gmail.com
Sun Jun 7 01:43:37 EDT 2009
Dear All:
I have written a Java program that performs various duties. One of them is
to use InetAddress.isReachable() to
ping remote IPs.
We have a portion of our network that is very secure. When I test my
program,
I had it on run on a Linux box and a Solaris box. Both of them are *NOT*
part of this secure network and the program works fine.
When I placed the program under a Solaris box that is part of that very
secure network, ALL IPs (even bogus ones) are reported to be
up by that method. I then discovered that I lack some sort of permission
(to some port on the network) to truly perform an ICMP echo.
The Solaris ping program is setuid to root which fixes this problem. If I
make the java executable setuid to root, all other java programs will have
root privilege during runtime which will make a lot of people unhappy (e.g.
sys admins). I have tried doing Runtime.exec() and called the local Solaris
ping but the performance is very poor (which is understandable).
Does anyone know what port(s) should be opened for this isReachable() to
function properly? I can convince the sys admins to open up just those
ports much easier than convincing them to setuid java to root. I am also
open to other suggestions.
Thanks in advance for any tips.
--Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pjug.org/pipermail/javamail/attachments/20090606/ac1b4a5a/attachment.html
More information about the Javamail
mailing list