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” } } }

You’re basing your logic on a header that may or may not exist (

true-client-IP

).

Would

[IP::client_addr]

work in your case?