[ https://issues.apache.org/jira/browse/FELIX-3811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660548#comment-14660548 ]
Ferry Huberts commented on FELIX-3811: -------------------------------------- Java can't really bind to an interface, only to an address-port pair. In the presence of duplicates (which can really happen) this will fail, in the sense that you will not know to which interface the socket will be bound. I have run into this multiple times. If there is a true solution I'd be happy to hear it :-) > http service should allow the interfaces bound to be configured > --------------------------------------------------------------- > > Key: FELIX-3811 > URL: https://issues.apache.org/jira/browse/FELIX-3811 > Project: Felix > Issue Type: Wish > Components: Lightweight HTTP Service > Reporter: Ed Schaller > Assignee: Ken Gilmer > Priority: Minor > Labels: patch > Attachments: httplite.bind.patch > > > As I primarily use the lightweight http service to debug using the webconsole > it would be nice to only bind it to the local interface to limit access to > the webconsole. This could be done by providing a configuration paramater to > specify the host address to bind to and could also be useful for those > running lightweight http on multihomed hosts. > I have created a patch against 0.1.5-SNAPSHOT that includes such > functionality. It uses org.apache.felix.http.host as the configuration key > but this could be changed. The semantics of what should be done when the host > specified cannot be resolved (eg: InetAddress.getByName() fails) may also be > worth changing. Presently it just binds to all interfaces if it is unable to > resolve/parse the address. Failing closed would be better in my opinion but > might not be the most intuitive. -- This message was sent by Atlassian JIRA (v6.3.4#6332)