Forum Discussion
Fred_01
Nimbostratus
Mar 15, 2017filter acces with ip public on the url
Hello
I have a lot of Virtual Server configured on my F5 and I want to block acces on the website if the url contains the IP public.
as I have a lot of VS, I don't want a specific Irule on ...
Amine_Kadimi
MVP
Mar 15, 2017An alternative to regex, if all your hostnames share a common string (eg com):
when HTTP_REQUEST {
if { not [string tolower [HTTP::host]] contains "com" } {
clientside {
HTTP::respond 403 -version "1.1" content "Request RejectedYou are not authorized to access this page" noserver Connection Close
}
}
I didn't test but you got the idea.
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