Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the jetty that is shipped with Apache Solr to run Solr. I would like to configure jetty such that it only accepts connections from certain IP addresses. I know I can bind jetty to to only accept connections from the localhost:

<Set name="host"><SystemProperty name="" default="" /></Set>

But how I do set it so that it can accept connections from certain non-localhost IP addresses as well?

share|improve this question
@Danielt. I don't think that methods works any more, with the new release of jetty – Saqib Ali Feb 5 '13 at 17:26
up vote 4 down vote accepted

You can use the IPAccessHandler that is in jetty 7, 8 and 9

you would wire this up in the handler chain so that it is executed before anything else in the handler chains

[edit] also look at the jetty-ipaccess.xml file under $jetty.home/etc

share|improve this answer

You could let iptables or xinetd redirect traffic from port 8080 or 80 to the port you let jetty listen on. Both can restrict to certain IP addresses for this.

Examples can be found here

share|improve this answer
can you please give me some examples? I am new to iptables/xinetd. Thanks. – Saqib Ali Feb 5 '13 at 17:27
Have a look at this – fuero Feb 5 '13 at 17:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.