Forum Discussion
redirect public IP's and allow private IP's
Hello,
I am trying to temporarily block internet access to a certain site by redirecting public IP's to a maintenance page. I thought I had it figured out, but my webadmins say otherwise.
Thanks
when HTTP_REQUEST { if { [HTTP::header exists true-client-IP] } { if { not [IP::addr [HTTP::header true-client-IP] equals 172.16.0.0/12] && not [IP::addr [HTTP::header true-client-IP] equals 10.0.0.0/8] } { } { HTTP::redirect "maintenacne page URL" } } }
1 Reply
- Arie
Altostratus
You're basing your logic on a header that may or may not exist (
).true-client-IPWould
work in your case?[IP::client_addr]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com