Раздел 10. Apache modules Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 RU EN Пункт 185. Apache Module mod_remoteip
SummaryThis module is used to treat the useragent which initiated the request as the originating useragent as identified by httpd for the purposes of authorization and logging, even where that useragent is behind a load balancer, front end server, or proxy server. The module overrides the client IP address for the connection
with the useragent IP address reported in the request header configured
with the Once replaced as instructed, this overridden useragent IP address is
then used for the Remote IP ProcessingApache by default identifies the useragent with the connection's client_ip value, and the connection remote_host and remote_logname are derived from this value. These fields play a role in authentication, authorization and logging and other purposes by other loadable modules. mod_remoteip overrides the client IP of the connection with the advertised useragent IP as provided by a proxy or load balancer, for the duration of the request. A load balancer might establish a long lived keepalive connection with the server, and each request will have the correct useragent IP, even though the underlying client IP address of the load balancer remains unchanged. When multiple, comma delimited useragent IP addresses are listed in the header value, they are processed in Right-to-Left order. Processing halts when a given useragent IP address is not trusted to present the preceding IP address. The header field is updated to this remaining list of unconfirmed IP addresses, or if all IP addresses were trusted, this header is removed from the request altogether. In overriding the client IP, the module stores the list of intermediate
hosts in a remoteip-proxy-ip-list note, which IPv4-over-IPv6 Mapped AddressesAs with httpd in general, any IPv4-over-IPv6 mapped addresses are recorded in their IPv4 representation.Internal (Private) AddressesAll internal addresses 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 blocks (and IPv6 addresses outside of the public 2000::/3 block) are only evaluated by mod_remoteip when RemoteIPInternalProxy
internal (intranet) proxies are registered.
RemoteIPHeader Directive
The Internal (Load Balancer) ExampleRemoteIPHeader X-Client-IP Proxy ExampleRemoteIPHeader X-Forwarded-For RemoteIPInternalProxy Directive
The Internal (Load Balancer) ExampleRemoteIPHeader X-Client-IP RemoteIPInternalProxy 10.0.2.0/24 RemoteIPInternalProxy gateway.localdomain RemoteIPInternalProxyList Directive
The The ' Internal (Load Balancer) ExampleRemoteIPHeader X-Client-IP RemoteIPInternalProxyList conf/trusted-proxies.lst conf/trusted-proxies.lst contents# Our internally trusted proxies; 10.0.2.0/24 #Everyone in the testing group gateway.localdomain #The front end balancer RemoteIPProxiesHeader Directive
The ExampleRemoteIPHeader X-Forwarded-For RemoteIPProxiesHeader X-Forwarded-By RemoteIPTrustedProxy Directive
The Trusted (Load Balancer) ExampleRemoteIPHeader X-Forwarded-For RemoteIPTrustedProxy 10.0.2.16/28 RemoteIPTrustedProxy proxy.example.com RemoteIPTrustedProxyList Directive
The The ' Trusted (Load Balancer) ExampleRemoteIPHeader X-Forwarded-For RemoteIPTrustedProxyList conf/trusted-proxies.lst conf/trusted-proxies.lst contents Пункты: 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 163 164 165 166 167 168 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 204 205 206 207 208 209 210 211 212 213 |