Forum Discussion
Block URLs from scraping website behind F5s
Hi,
I have no experience at all with the F5s so looking for some help. I would like to block a couple of URLs from scraping a website behind the F5s.
2URLS I would like to block are
https://example.ie/Website/AMSREG/AMSRegWeb.nsf/(getAppsNear)?OpenPage https://example.ie/Website/AMSREG/AMSRegWeb.nsf/(getApps4DT)?OpenAgent
Would someone be able to assist on this? I found this for IP addresses - would it be similar for URLSs If I create the iRULE would I then have to "attach" it to the website that it is scraping?
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals xx.xx.xx.xx/xx] } {
reject
}
}
Thanks
- Samir_Jha_52506
Noctilucent
Explain little more.. Whether you wanted to block URL or URI?
- Gary_375401
Nimbostratus
I am not 100% sure what the difference between the two are, I'm more infrastructure than web
if I wanted to block these exact characters how would I go about it
https://example.ie/Website/AMSREG/AMSRegWeb.nsf/(getAppsNear)?OpenPage https://example.ie/Website/AMSREG/AMSRegWeb.nsf/(getApps4DT)?OpenAgent
thanks
- Samir_Jha_52506
Noctilucent
Difference is there with query string.. So, do you want to drop connection, when these two strings come in browser right?
(getAppsNear)?OpenPage
(getApps4DT)?OpenAgent
Let us know, we can write iRule for you..
- Gary_375401
Nimbostratus
yes please
much appreciated
- Samir_Jha_52506
Noctilucent
You can write irule some thing like this..
-
Create Datagroup Object(String)
class HostURI { (getAppsNear)?OpenPage (getApps4DT)?OpenAgent }
`
-
Add below irule.
` when HTTP_REQUEST { if {([class match [getfield [HTTP::host] "/" 5] eq HostURI]) } { drop } } Assign to VIP. Let us know if any question.
-
- Gary_375401
Nimbostratus
thanks for this, I'll give it a shot and report back.
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