Icemanii_116694
Jan 02, 2014Nimbostratus
Block Opera Mini users using true client IP
I'm trying to restrict users from certain countries using Opera Mini browser from accessing my server. I'm using the following irule to replace the IP::client_addr field with the XFF IP:
when HTTP_REQUEST { if { [string tolower [HTTP::header "User-Agent"]] contains "mini opera" } { if {[HTTP::header exists "X-Forwarded-For"]} { HTTP::header remove [IP::client_addr] HTTP::header insert [IP::client_addr] X-Forwarded-For } } }
The syntax and all is working but I get the XFF IP as the client_addr. Any help is highly appreciated.