Forum Discussion
Need help in adding Datagroup to existing Irule
- Jan 29, 2020
Hi,
Any chances to same client IP address appears on different route domains on this iRule? Because I think IP data group won't consider route domains on validation, but I'm not 100% sure. This way, I think working on data group type ip route domain number wold be noise optional.
ltm data-group internal dg_my_ip_list { records { 10.10.10.1%70/32 { } } type ip } when HTTP_REQUEST { if { [class match [IP::client_addr] equals dg_my_ip_list] } { if { [string tolower [HTTP::path]] equals "/cklauncher/" } { drop } elseif { [HTTP::path] equals "/" } { # redirect the request log local0. "issuing redirect request to [HTTP::host][HTTP::uri] from [IP::client_addr]" HTTP::redirect https://[getfield [HTTP::host] ":" 1]/ckpartner/ } } }
I hope it helps.
Best regards.
Hi,
Any chances to same client IP address appears on different route domains on this iRule? Because I think IP data group won't consider route domains on validation, but I'm not 100% sure. This way, I think working on data group type ip route domain number wold be noise optional.
ltm data-group internal dg_my_ip_list {
records {
10.10.10.1%70/32 { }
}
type ip
}
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals dg_my_ip_list] } {
if { [string tolower [HTTP::path]] equals "/cklauncher/" } {
drop
} elseif { [HTTP::path] equals "/" } {
# redirect the request
log local0. "issuing redirect request to [HTTP::host][HTTP::uri] from [IP::client_addr]"
HTTP::redirect https://[getfield [HTTP::host] ":" 1]/ckpartner/
}
}
}
I hope it helps.
Best regards.
- Blue_whaleApr 10, 2020Cirrocumulus
Hi Cjunior,
I need help here .
With Datagroup I want to block access to both the uri's /cklauncher/ and /ckpartener/ and anything else should be accessible .
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