How to restrict access to Nexus Repository 2 by IP Address

Visit for documentation on Nexus Repository version 2.

Nexus Repository 2 uses the Jetty container, and Jetty provides a handler that can be used to restrict access by IP addresses and subnets.

Attached is a sample jetty config file that allows you to configure the IP Access Handler using Nexus Repository 2.8+.

To configure it:

  • Download and store the file at NEXUS_HOME/conf/jetty-ipaccess.xml, with the same permissions as the other jetty files.
  • Edit NEXUS_HOME/conf/jetty-ipaccess.xml, add white listed and blacklisted addresses using the syntax as documented in the javadoc. By default, all access is allowed.
  • Edit NEXUS_HOME/bin/jsw/conf/wrapper.conf, and reference the new jetty file as an app parameter ie (3 by default, however the next available number must be used).
  • Restart Nexus Repository.
Have more questions? Submit a request


Article is closed for comments.