How to Restrict Access to Nexus Repo 3 by IP Address

Nexus 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 Repo 3.x.

To configure it:

  • Download and store the file at NEXUS_HOME/etc/jetty/jetty-ipfilter.xml, with the same permissions as the other jetty files
  • Edit NEXUS_HOME/etc/jetty/jetty-ipfilter.xml, add white listed addresses using the syntax as documented in the javadoc.
  • Edit $WORKDIR/etc/, and add the new jetty file into the nexus.args: 
  • restart Nexus
Have more questions? Submit a request


Article is closed for comments.