package. Please consult the Java documentation for details of the
expressions supported.</p>
+ <p><strong>Note:</strong> There is a caveat when using this filter with
+ IPv6 addresses. Format of the IP address that this valve is processing
+ depends on the API that was used to obtain it. If the address was obtained
+ from Java socket using Inet6Address class, its format will be
+ <code>x:x:x:x:x:x:x:x</code>. That is, the IP address for localhost
+ will be <code>0:0:0:0:0:0:0:1</code> instead of the more widely used
+ <code>::1</code>. Consult your access logs for the actual value.</p>
+
+ <p>See also: <a href="#Remote_Host_Filter">Remote Host Filter</a>.</p>
</subsection>
<subsection name="Filter Class Name">
</subsection>
+ <subsection name="Example">
+ <p>To allow access only for the clients connecting from localhost:</p>
+<pre>
+ <filter>
+ <filter-name>Remote Address Filter</filter-name>
+ <filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
+ <init-param>
+ <param-name>allow</param-name>
+ <param-value>127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>Remote Address Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</pre>
+ </subsection>
+
</section>
package. Please consult the Java documentation for details of the
expressions supported.</p>
+ <p>See also: <a href="#Remote_Address_Filter">Remote Address Filter</a>.</p>
</subsection>
<subsection name="Filter Class Name">
package. Please consult the Java documentation for details of the
expressions supported.</p>
+ <p><strong>Note:</strong> There is a caveat when using this valve with
+ IPv6 addresses. Format of the IP address that this valve is processing
+ depends on the API that was used to obtain it. If the address was obtained
+ from Java socket using Inet6Address class, its format will be
+ <code>x:x:x:x:x:x:x:x</code>. That is, the IP address for localhost
+ will be <code>0:0:0:0:0:0:0:1</code> instead of the more widely used
+ <code>::1</code>. Consult your access logs for the actual value.</p>
+
+ <p>See also: <a href="#Remote_Host_Filter">Remote Host Filter</a>,
+ <a href="#Remote_IP_Valve">Remote IP Valve</a>.</p>
</subsection>
<subsection name="Attributes">
</subsection>
+ <subsection name="Example">
+ <p>To allow access only for the clients connecting from localhost:</p>
+<pre>
+ <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+ allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/>
+</pre>
+ </subsection>
+
</section>
package. Please consult the Java documentation for details of the
expressions supported.</p>
+ <p>See also: <a href="#Remote_Address_Filter">Remote Address Filter</a>.</p>
</subsection>
<subsection name="Attributes">
<p>In addition to the password restrictions the Manager web application
could be restricted by the remote IP address or host by adding a
-<code>RemoteAddrValve</code> or <code>RemoteHostValve</code>. Here is
+<code>RemoteAddrValve</code> or <code>RemoteHostValve</code>.
+See <a href="config/valve.html#Remote_Address_Filter">valves documentation</a>
+for details. Here is
an example of restricting access to the localhost by IP address:</p>
<pre>
<Context privileged="true">
-->
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
- allow="127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|::1" />
+ allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context>
\ No newline at end of file
-->
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
- allow="127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|::1" />
+ allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context>