You would have to specify an java.rmi.server.RMIServerSocketFactory instance that allowed for binding on a specific interface:
<attribute name="ServerSocketFactory">MyRMIServerSocketFactory </attribute>
We should probably just be installing an implementation that used the BindAddress setting if specified. I'll make that change.
-- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
Phil Packer wrote:
Hi, I hope someone can help me with what may be a simple JNDI problem.
I have a multi-homed host running JBoss-3.0.6/j2sdk1.4.2 (on RedHat 9) and I have another application on the other side of a firewall that need to be able to do JNDI and RMI to this JBoss instance
I've managed to make JNDI return references relative to a given interface by starting JBoss with a -Djava.rmi.server.hostname=<IP_address_of_interface>
In ~/conf/jboss-service.xml I've successfully locked down the JNDI naming service by port and by IP address thus:
---snip--- <mbean code="org.jboss.naming.NamingService" name="jboss:service=Naming"> <!-- The listening port for the bootstrap JNP service. Set this to -1 to run the NamingService without the JNP invoker listening port. --> <attribute name="BindAddress">192.168.12.226</attribute> <attribute name="Port">1099</attribute> <attribute name="RmiPort">2099</attribute> </mbean> <mbean code="org.jboss.naming.JNDIView" name="jboss:service=JNDIView"/> --snip--
But I also wanted to lock down the RmiPort to a fixed port and IP address and in the above snippet, BindAddress appears to apply only to the JNDI Port, the RmiPort still ends up being a wildcard bind to all interfaces on the server thus:
---snip--- [EMAIL PROTECTED] conf]$ netstat -tan Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:32769 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:34213 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:34214 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:34215 0.0.0.0:* LISTEN tcp 0 0 192.168.12.226:1099 0.0.0.0:* LISTEN tcp 0 0 192.168.12.226:1100 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 192.168.12.226:4466 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:2099 0.0.0.0:* LISTEN tcp 0 0 192.168.12.226:8083 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 192.168.12.226:4444 0.0.0.0:* LISTEN tcp 0 48 192.168.12.102:22 192.168.1.57:45395 ESTABLISHED [EMAIL PROTECTED] conf]$ ---snip---
So the obvious questions are:
a) Can I do this at all? b) Is there something I've overlooked in the config?
All suggestions gratefully recieved
Phil Packer [EMAIL PROTECTED]
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
