1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 This file is generated from xml source: DO NOT EDIT
8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10 <title>mod_remoteip - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
19 <div id="page-header">
20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
25 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Module mod_remoteip</h1>
29 <p><span>Available Languages: </span><a href="../en/mod/mod_remoteip.html" title="English"> en </a> |
30 <a href="../fr/mod/mod_remoteip.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
32 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Replaces the original client IP address for the connection
33 with the useragent IP address list presented by a proxies or a load balancer
34 via the request headers.
36 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
37 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>remoteip_module</td></tr>
38 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_remoteip.c</td></tr></table>
41 <p>This module is used to treat the useragent which initiated the
42 request as the originating useragent as identified by httpd for the
43 purposes of authorization and logging, even where that useragent is
44 behind a load balancer, front end server, or proxy server.</p>
46 <p>The module overrides the client IP address for the connection
47 with the useragent IP address reported in the request header configured
48 with the <code class="directive"><a href="#remoteipheader">RemoteIPHeader</a></code> directive.</p>
50 <p>Additionally, this module implements the server side of
52 <a href="http://blog.haproxy.com/haproxy/proxy-protocol/">PROXY Protocol</a> when
53 using the <code class="directive"><a href="#remoteipproxyprotocol">RemoteIPProxyProtocol</a></code>
56 <p>Once replaced as instructed, this overridden useragent IP address is
57 then used for the <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code>
58 <code class="directive"><a href="../mod/mod_authz_core.html#require">Require ip</a></code>
59 feature, is reported by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>, and is recorded by
60 <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> <code>%a</code> and <code class="module"><a href="../mod/core.html">core</a></code>
61 <code>%a</code> format strings. The underlying client IP of the connection
62 is available in the <code>%{c}a</code> format string.</p>
64 <div class="warning">It is critical to only enable this behavior from
65 intermediate hosts (proxies, etc) which are trusted by this server, since
66 it is trivial for the remote useragent to impersonate another
69 <div id="quickview"><h3>Topics</h3>
71 <li><img alt="" src="../images/down.gif" /> <a href="#processing">Remote IP Processing</a></li>
72 </ul><h3 class="directives">Directives</h3>
74 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipheader">RemoteIPHeader</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipinternalproxylist">RemoteIPInternalProxyList</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipproxiesheader">RemoteIPProxiesHeader</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipproxyprotocol">RemoteIPProxyProtocol</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#remoteipproxyprotocolexceptions">RemoteIPProxyProtocolExceptions</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#remoteiptrustedproxylist">RemoteIPTrustedProxyList</a></li>
83 <h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_remoteip">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_remoteip">Report a bug</a></li></ul><h3>See also</h3>
85 <li><code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code></li>
86 <li><code class="module"><a href="../mod/mod_status.html">mod_status</a></code></li>
87 <li><code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code></li>
88 <li><a href="http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt">Proxy Protocol Spec</a></li>
89 <li><a href="#comments_section">Comments</a></li></ul></div>
90 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
92 <h2><a name="processing" id="processing">Remote IP Processing</a></h2>
94 <p>Apache by default identifies the useragent with the connection's
95 client_ip value, and the connection remote_host and remote_logname are
96 derived from this value. These fields play a role in authentication,
97 authorization and logging and other purposes by other loadable
100 <p>mod_remoteip overrides the client IP of the connection with the
101 advertised useragent IP as provided by a proxy or load balancer, for
102 the duration of the request. A load balancer might establish a long
103 lived keepalive connection with the server, and each request will
104 have the correct useragent IP, even though the underlying client IP
105 address of the load balancer remains unchanged.</p>
107 <p>When multiple, comma delimited useragent IP addresses are listed in the
108 header value, they are processed in Right-to-Left order. Processing
109 halts when a given useragent IP address is not trusted to present the
110 preceding IP address. The header field is updated to this remaining
111 list of unconfirmed IP addresses, or if all IP addresses were trusted,
112 this header is removed from the request altogether.</p>
114 <p>In overriding the client IP, the module stores the list of intermediate
115 hosts in a remoteip-proxy-ip-list note, which <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>
116 can record using the <code>%{remoteip-proxy-ip-list}n</code> format token.
117 If the administrator needs to store this as an additional header, this
118 same value can also be recording as a header using the directive
119 <code class="directive"><a href="#remoteipproxiesheader">RemoteIPProxiesHeader</a></code>.</p>
121 <div class="note"><h3>IPv4-over-IPv6 Mapped Addresses</h3>
122 As with httpd in general, any IPv4-over-IPv6 mapped addresses are recorded
123 in their IPv4 representation.</div>
125 <div class="note"><h3>Internal (Private) Addresses</h3>
126 All internal addresses 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8
127 blocks (and IPv6 addresses outside of the public 2000::/3 block) are only
128 evaluated by mod_remoteip when <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code>
129 internal (intranet) proxies are registered.</div>
132 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
133 <div class="directive-section"><h2><a name="RemoteIPHeader" id="RemoteIPHeader">RemoteIPHeader</a> <a name="remoteipheader" id="remoteipheader">Directive</a></h2>
134 <table class="directive">
135 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declare the header field which should be parsed for useragent IP addresses</td></tr>
136 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPHeader <var>header-field</var></code></td></tr>
137 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
138 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
139 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
141 <p>The <code class="directive"><a href="#remoteipheader">RemoteIPHeader</a></code> directive triggers
142 <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> to treat the value of the specified
143 <var>header-field</var> header as the useragent IP address, or list
144 of intermediate useragent IP addresses, subject to further configuration
145 of the <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code> and
146 <code class="directive"><a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></code> directives.</p>
148 <div class="warning"> Unless these other directives are used, <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code>
149 will trust all hosts presenting a non internal address in the
150 <code class="directive"><a href="#remoteipheader">RemoteIPHeader</a></code> header value.
153 <div class="example"><h3>Internal (Load Balancer) Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Client-IP</pre>
156 <div class="example"><h3>Proxy Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Forwarded-For</pre>
160 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
161 <div class="directive-section"><h2><a name="RemoteIPInternalProxy" id="RemoteIPInternalProxy">RemoteIPInternalProxy</a> <a name="remoteipinternalproxy" id="remoteipinternalproxy">Directive</a></h2>
162 <table class="directive">
163 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declare client intranet IP addresses trusted to present the RemoteIPHeader value</td></tr>
164 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPInternalProxy <var>proxy-ip</var>|<var>proxy-ip/subnet</var>|<var>hostname</var> ...</code></td></tr>
165 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
166 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
167 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
169 <p>The <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code> directive adds one
170 or more addresses (or address blocks) to trust as presenting a valid
171 RemoteIPHeader value of the useragent IP. Unlike the
172 <code class="directive"><a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></code> directive, any IP address
173 presented in this header, including private intranet addresses, are
174 trusted when passed from these proxies.</p>
176 <div class="example"><h3>Internal (Load Balancer) Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Client-IP
177 RemoteIPInternalProxy 10.0.2.0/24
178 RemoteIPInternalProxy gateway.localdomain</pre>
182 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
183 <div class="directive-section"><h2><a name="RemoteIPInternalProxyList" id="RemoteIPInternalProxyList">RemoteIPInternalProxyList</a> <a name="remoteipinternalproxylist" id="remoteipinternalproxylist">Directive</a></h2>
184 <table class="directive">
185 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declare client intranet IP addresses trusted to present the RemoteIPHeader value</td></tr>
186 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPInternalProxyList <var>filename</var></code></td></tr>
187 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
188 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
189 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
191 <p>The <code class="directive"><a href="#remoteipinternalproxylist">RemoteIPInternalProxyList</a></code> directive specifies
192 a file parsed at startup, and builds a list of addresses (or address blocks)
193 to trust as presenting a valid RemoteIPHeader value of the useragent IP.</p>
195 <p>The '<code>#</code>' hash character designates a comment line, otherwise
196 each whitespace or newline separated entry is processed identically to
197 the <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code> directive.</p>
199 <div class="example"><h3>Internal (Load Balancer) Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Client-IP
200 RemoteIPInternalProxyList conf/trusted-proxies.lst</pre>
203 <div class="example"><h3>conf/trusted-proxies.lst contents</h3><pre># Our internally trusted proxies;
204 10.0.2.0/24 #Everyone in the testing group
205 gateway.localdomain #The front end balancer</pre></div>
208 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
209 <div class="directive-section"><h2><a name="RemoteIPProxiesHeader" id="RemoteIPProxiesHeader">RemoteIPProxiesHeader</a> <a name="remoteipproxiesheader" id="remoteipproxiesheader">Directive</a></h2>
210 <table class="directive">
211 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declare the header field which will record all intermediate IP addresses</td></tr>
212 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPProxiesHeader <var>HeaderFieldName</var></code></td></tr>
213 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
214 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
215 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
217 <p>The <code class="directive"><a href="#remoteipproxiesheader">RemoteIPProxiesHeader</a></code> directive specifies
218 a header into which <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> will collect a list of
219 all of the intermediate client IP addresses trusted to resolve the useragent
220 IP of the request. Note that intermediate
221 <code class="directive"><a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></code> addresses are recorded in
222 this header, while any intermediate
223 <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code> addresses are discarded.</p>
225 <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Forwarded-For
226 RemoteIPProxiesHeader X-Forwarded-By</pre>
230 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
231 <div class="directive-section"><h2><a name="RemoteIPProxyProtocol" id="RemoteIPProxyProtocol">RemoteIPProxyProtocol</a> <a name="remoteipproxyprotocol" id="remoteipproxyprotocol">Directive</a></h2>
232 <table class="directive">
233 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable or disable PROXY protocol handling</td></tr>
234 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPProxyProtocol On|Off</code></td></tr>
235 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
236 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
237 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
238 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>RemoteIPProxyProtocol is only available in httpd 2.4.26 and newer</td></tr>
240 <p>The <code class="directive">RemoteIPProxyProtocol</code> directive enables or
241 disables the reading and handling of the PROXY protocol connection header.
242 If enabled with the <code>On</code> flag, the upstream client <em>must</em>
243 send the header every time it opens a connection or the connection will
244 be aborted unless it is in the list of disabled hosts provided by <code class="directive"><a href="#remoteipproxyprotocolexceptions">RemoteIPProxyProtocolExceptions</a></code>
247 <p>While this directive may be specified in any virtual host, it is
248 important to understand that because the PROXY protocol is connection
249 based and protocol agnostic, the enabling and disabling is actually based
250 on ip-address and port. This means that if you have multiple name-based
251 virtual hosts for the same host and port, and you enable it any one of
252 them, then it is enabled for all them (with that host and port). It also
253 means that if you attempt to enable the PROXY protocol in one and disable
254 in the other, that won't work; in such a case the last one wins and a
255 notice will be logged indicating which setting was being overridden.</p>
257 <pre class="prettyprint lang-config">Listen 80
258 <VirtualHost *:80>
259 ServerName www.example.com
260 RemoteIPProxyProtocol On
262 #Requests to this virtual host must have a PROXY protocol
263 # header provided. If it is missing, the connection will
268 <VirtualHost *:8080>
269 ServerName www.example.com
270 RemoteIPProxyProtocol On
271 RemoteIPProxyProtocolExceptions 127.0.0.1 10.0.0.0/8
273 #Requests to this virtual host must have a PROXY protocol
274 # header provided. If it is missing, the connection will
275 # be aborted except when coming from localhost or the
276 # 10.x.x.x RFC1918 range
277 </VirtualHost></pre>
281 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
282 <div class="directive-section"><h2><a name="RemoteIPProxyProtocolExceptions" id="RemoteIPProxyProtocolExceptions">RemoteIPProxyProtocolExceptions</a> <a name="remoteipproxyprotocolexceptions" id="remoteipproxyprotocolexceptions">Directive</a></h2>
283 <table class="directive">
284 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Disable processing of PROXY header for certain hosts or networks</td></tr>
285 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPProxyProtocolExceptions host|range [host|range] [host|range]</code></td></tr>
286 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
287 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
288 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
289 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>RemoteIPProxyProtocolExceptions is only available in httpd 2.4.26 and newer</td></tr>
291 <p>The <code class="directive">RemoteIPProxyProtocol</code> directive enables or
292 disables the reading and handling of the PROXY protocol connection header.
293 Sometimes it is desirable to require clients to provide the PROXY header, but
294 permit other clients to connect without it. This directive allows a server
295 administrator to configure a single host or CIDR range of hosts that may do
299 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
300 <div class="directive-section"><h2><a name="RemoteIPTrustedProxy" id="RemoteIPTrustedProxy">RemoteIPTrustedProxy</a> <a name="remoteiptrustedproxy" id="remoteiptrustedproxy">Directive</a></h2>
301 <table class="directive">
302 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict client IP addresses trusted to present the RemoteIPHeader value</td></tr>
303 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPTrustedProxy <var>proxy-ip</var>|<var>proxy-ip/subnet</var>|<var>hostname</var> ...</code></td></tr>
304 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
305 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
306 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
308 <p>The <code class="directive"><a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></code>
309 directive restricts which peer IP addresses (or address blocks) will be
310 trusted to present a valid RemoteIPHeader value of the useragent IP.</p>
312 <p> Unlike the <code class="directive"><a href="#remoteipinternalproxy">RemoteIPInternalProxy</a></code> directive, any intranet
313 or private IP address reported by such proxies, including the 10/8, 172.16/12,
314 192.168/16, 169.254/16 and 127/8 blocks (or outside of the IPv6 public
315 2000::/3 block) are not trusted as the useragent IP, and are left in the
316 <code class="directive"><a href="#remoteipheader">RemoteIPHeader</a></code> header's value.</p>
318 <div class="warning">By default, <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> will trust
319 all hosts presenting a non internal address in the
320 <code class="directive"><a href="#remoteipheader">RemoteIPHeader</a></code> header value.
323 <div class="example"><h3>Trusted (Load Balancer) Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Forwarded-For
324 RemoteIPTrustedProxy 10.0.2.16/28
325 RemoteIPTrustedProxy proxy.example.com</pre>
329 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
330 <div class="directive-section"><h2><a name="RemoteIPTrustedProxyList" id="RemoteIPTrustedProxyList">RemoteIPTrustedProxyList</a> <a name="remoteiptrustedproxylist" id="remoteiptrustedproxylist">Directive</a></h2>
331 <table class="directive">
332 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict client IP addresses trusted to present the RemoteIPHeader value</td></tr>
333 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoteIPTrustedProxyList <var>filename</var></code></td></tr>
334 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
335 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
336 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_remoteip</td></tr>
338 <p>The <code class="directive"><a href="#remoteiptrustedproxylist">RemoteIPTrustedProxyList</a></code> directive specifies
339 a file parsed at startup, and builds a list of addresses (or address blocks)
340 to trust as presenting a valid RemoteIPHeader value of the useragent IP.</p>
342 <p>The '<code>#</code>' hash character designates a comment line, otherwise
343 each whitespace or newline separated entry is processed identically to
344 the <code class="directive"><a href="#remoteiptrustedproxy">RemoteIPTrustedProxy</a></code> directive.</p>
346 <div class="example"><h3>Trusted (Load Balancer) Example</h3><pre class="prettyprint lang-config">RemoteIPHeader X-Forwarded-For
347 RemoteIPTrustedProxyList conf/trusted-proxies.lst</pre>
350 <div class="example"><h3>conf/trusted-proxies.lst contents</h3><p><code>
351 # Identified external proxies;<br />
352 192.0.2.16/28 #wap phone group of proxies<br />
353 proxy.isp.example.com #some well known ISP
358 <div class="bottomlang">
359 <p><span>Available Languages: </span><a href="../en/mod/mod_remoteip.html" title="English"> en </a> |
360 <a href="../fr/mod/mod_remoteip.html" hreflang="fr" rel="alternate" title="Français"> fr </a></p>
361 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
362 <script type="text/javascript"><!--//--><![CDATA[//><!--
363 var comments_shortname = 'httpd';
364 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html';
366 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
367 d.write('<div id="comments_thread"><\/div>');
368 var s = d.createElement('script');
369 s.type = 'text/javascript';
371 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
372 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
375 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
377 })(window, document);
378 //--><!]]></script></div><div id="footer">
379 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
380 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
381 if (typeof(prettyPrint) !== 'undefined') {