Forum Discussion
Balasubramaniy2
Nimbostratus
Aug 22, 2018Need to control particular source while accessing particular URL when URL forwarding enabled for multiple applications on the Same Virtual server
Hi,
The requirement is to do URL forwarding for multiple applications based on the URL. but, wants to block particular source accessing particular URL on the same virtual server not all URL. ...
youssef1
Cumulonimbus
Aug 22, 2018Hi,
First of create first of all, you have to create as many datagroup as you have from hostname to filtered. Example:
DG1: dg-blocked-app1.test.com
Type:Address
Address : 10.10.10.100
Value: mycustomer
DG2: dg-blocked-app2.test.com
Type:Address
Address : empty
Value:
DG3: dg-blocked-app3.test.com
Type:Address
Address : empty
Value:
Then use this simple Irule (it is important to respect case in DG creaction: tolower because as you can noticed below, you DG in the irule is create dynamcly depending the hostname that you enter)
when HTTP_REQUEST {
set envhost [string tolower [HTTP::host]]
if { [class match [IP::client_addr] equals dg-blocked-$envhost]} {
reject
}
}
Next you can manage how will be blocked by setting these IP in concerned DG.
Hope it help you, let me now.
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
