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/nexus.properties
, and add the new jetty file into the nexus.args:nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml,${jetty.etc}/jetty-ipfilter.xml
- restart Nexus
0 Comments