From 19fdeec134026a58316421199107be7739d15cde Mon Sep 17 00:00:00 2001
From: kkolinko
Note: 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
+ x:x:x:x:x:x:x:x. That is, the IP address for localhost
+ will be 0:0:0:0:0:0:0:1 instead of the more widely used
+ ::1. Consult your access logs for the actual value.
See also: Remote Host Filter.
To allow access only for the clients connecting from localhost:
++ <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> ++
See also: Remote Address Filter.
Note: 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
+ x:x:x:x:x:x:x:x. That is, the IP address for localhost
+ will be 0:0:0:0:0:0:0:1 instead of the more widely used
+ ::1. Consult your access logs for the actual value.
See also: Remote Host Filter, + Remote IP Valve.
To allow access only for the clients connecting from localhost:
++ <Valve className="org.apache.catalina.valves.RemoteAddrValve" + allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/> ++
See also: Remote Address Filter.
In addition to the password restrictions the Manager web application
could be restricted by the remote IP address or host by adding a
-RemoteAddrValve or RemoteHostValve. Here is
+RemoteAddrValve or RemoteHostValve.
+See valves documentation
+for details. Here is
an example of restricting access to the localhost by IP address:
<Context privileged="true"> diff --git a/webapps/host-manager/META-INF/context.xml b/webapps/host-manager/META-INF/context.xml index 1019dc4c7..3390e967c 100644 --- a/webapps/host-manager/META-INF/context.xml +++ b/webapps/host-manager/META-INF/context.xml @@ -22,6 +22,6 @@ --> \ No newline at end of file diff --git a/webapps/manager/META-INF/context.xml b/webapps/manager/META-INF/context.xml index 99276a257..21d9bac93 100644 --- a/webapps/manager/META-INF/context.xml +++ b/webapps/manager/META-INF/context.xml @@ -22,6 +22,6 @@ --> -- 2.11.0