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 have Jenkins sitting behind Nginx, with Nginx taking care of authentication, but Jenkins is still listening on port 8080 externally, so by accessing the box on port 8080 people can bypass Nginx.

How can I tell it to stop listening for remote connections and just accept connections locally?

It looks like it might be something to do with this ajp13ListenAddress param, but I can't figure out how to set that in the init.d script installed with Jenkins.

Thanks loads for any help!


(Looks like there's no Jenkins tag yet and I can't create it as I don't have rep)

share|improve this question
Just added jenkins tag. – davey Feb 10 '11 at 17:21
This is why I tend to deploy Hudson/Jenkins inside Tomcat.. – Tom O'Connor Feb 10 '11 at 17:48
Commenting, because I can't directly answer your question. Have you considered mitigating by using iptables and/or tcpwrappers? – pboin Feb 10 '11 at 17:59
up vote 15 down vote accepted


If you installed Jenkins from the Debian package, you can modify /etc/default/jenkins and add the following line somewhere:


and then add --httpListenAddress=$HTTP_HOST to the JENKINS_ARGS so that it reads something like:

JENKINS_ARGS="--webroot=/var/run/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --httpListenAddress=$HTTP_HOST"


If you installed Jenkins from the Ubuntu Oneiric (11.10) package, edit /etc/init/jenkins.conf and add --httpListenAddress= to the JENKINS_ARGS line, so that it reads like:

JENKINS_ARGS="--webroot=$JENKINS_RUN/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --httpListenAddress="

RedHat/CentOS/Amazon Linux

If you installed Jenkins using YUM repository, modify /etc/sysconfig/jenkins and edit JENKINS_LISTEN_ADDRESS to JENKINS_LISTEN_ADDRESS=

share|improve this answer

Restart unbuntu

/etc/init.d/jenkins restart

Restart unbuntu

/etc/init.d/jenkins start

Restart unbuntu

/etc/init.d/jenkins stop

share|improve this answer

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.