![]() SetEnvIf X-Forwarded-For "^164\.107\.3\.4" bad_osu_ipĭeny from env=bad_osu_ip # Example using mod_rewrite to block bad IPs instead SetEnvIf X-Forwarded-For "^5\.6\.7\." ip_badĪllow from all Deny from env=ip_bad # Allow from OSU networks only _except_ for a few specific IPs SetEnvIf X-Forwarded-For "^ 3\.12\.52\.221$" ip_okĪllow from env=ip_ok # Block only bad IP ranges and let everyone else through These directives can go in either the top-level Apache config files or individual. Once that environment value is set, we can restrict access to the site based on it rather than the client’s IP directly. We can use this header along with some SetEnvIf directives to set the value of an environment variable based on the IP address. The ELB does provide this data, however, by means of a special header called X-Forwarded-For. This unfortunately means that the standard mechanism for restricting access to a site via source IP does not work. The AWS Elastic Loadbalancer prevents the underlying Apache-based web servers from seeing the true IP address of the users in the traditional way. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |