Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

Java security question in server environment

Thread view: 
Tom - 04 Jan 2007 17:02 GMT
Hello all,

I'm running a Java server using Sun's JRE using the following command:

javaw.exe -jar c:\PHP\ext/JavaBridge.jar INET_LOCAL:9384

I'm doing it this way instead of invoking Java from each apache instance
because I don't want to run multiple Java processes and have the resource
usage for each one.

I'm then using the php-java bridge to access the java server and call
functions via my php apps (mostly to access jasperreports).

Is there a better way without having communications to the java server sent
to a port via tcp/ip on the machine?  Maybe direct interprocess
communication using pipes or the filesystem?

I'm concerned about this setup for publishing my server to the internet
(currently it's only on the intranet) because couldn't theoretically a
client machine directly call my java process on port 9384 and call java
classes on my server?  Am I missing something?

Btw, is there any reason to use Java.exe instead of Javaw.exe (javaw
doesn't open a console window) and what's the difference between Sun's
server implementation vs client (for example calling the server
implemetation would be done by calling "javaw.exe -server -jar c:\PHP
\ext/JavaBridge.jar INET_LOCAL:9384" with the -server tag being the only
difference in the call).

Thanks everyone!  Any help would be greatly appreciated,

Tom
Nigel Wade - 05 Jan 2007 14:41 GMT
> Hello all,
>
[quoted text clipped - 17 lines]
> client machine directly call my java process on port 9384 and call java
> classes on my server?  Am I missing something?

Firstly, if you machine is connected directly to the Internet it should really
have a firewall. That firewall ought not to have port 9384 open. If it's
connected via a NAT router then port 9384 on your server won't be visible to
the Internet unless you explicitly map it with a static NAT entry.

Secondly, I would interpret INET_LOCAL:9384 as an interface:port, and INET_LOCAL
to mean the loopback interface so that the Java server can only be contacted by
processes on the local machine. Of course, since I don't know JavaBridge and
it's command line parameters I may be wrong. You should be able to determine
whether this is the case by looking to see what ports are open on what
interfaces. I'd expect that port 9384 is only open on the loopback interface.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.