Forum Discussion
veredgfbll
Mar 10, 2024Cirrus
xff and geolocation
If I want to create a dos l7 profile that needs to check the xff header as the source address (I will add an http+xff profile), and I want to exclude a country from the dosL7 policy using an LTM poli...
veredgfbll
Cirrus
Thank you very much. I will test this irule. I can already say that the LTM policy does not recognize geolocation from xff IPs, so this may be our only option.
Thanks
veredgfbll
Mar 19, 2024Cirrus
I made some changes as I didn't find any command the was geo::ipcountry.
when HTTP_REQUEST {
set xff_header [HTTP::header "X-Forwarded-For"]
if { $xff_header ne "" } {
# Extract the client IP address from the XFF header
set client_ip [lindex [split $xff_header ","] 0]
# Check if the request is *not* coming from the excluded country
if {!([whereis $client_ip country] equals "country_code") } {
# enable dos profile
DOSL7::enable dos
#return
} else {
DOSL7::disable
}
}
}
I need to test it....
Will update.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects