Very often, you will want to make sure that the QueueMetrics application is accessible only from a given subnet. Even if QueueMetrics has its own security mechanism built-in, denying access to all clients that have no right to access QM will surely improve security.
In order to do so, you just edit the file: /usr/local/queuemetrics/tomcat/conf/Catalina/localhost/queuemetrics.xml
so that it looks like the following one.
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1"/>
You could use the following format for the address instead of 127.0.0.1:
- allow="18.104.22.168, 22.214.171.124, 126.96.36.199" to specify multiple IP addresses, or
- allow="128.117.140.*" to specify a full class.
If all goes well, when you restart QueueMetrics and try to access it from a forbidden IP address, you get the message "Access to the specified resource has been forbidden."
Please note that the queuemetrics.xml
file is rebuilt upon automatic update, so you will have to edit it after running "yum update".