Forum Discussion
eric_wu_55610
Nimbostratus
Aug 03, 2009URL deny
Hi all,
Anybody know how to deny URL in iRules ??
For example :
I want to deny "tw.yahoo.com" this url
how can I do write in iRule
Thank you ~
1 Reply
- hoolio
Cirrostratus
Hi,
What kind of virtual server do you want to use this for? Is it for a standard L7 "inbound" load balancing VS or an outbound proxy.
If you want to drop, send a TCP reset or send an HTTP response when a client makes a request to a specific host and or URI for an inbound request, you can use an iRule like this:when HTTP_REQUEST { Check requested host header value if {[string tolower [HTTP::host]] contains "tw.yahoo.com"}{ Drop the connection drop Reset the connection reject Send a 403 response HTTP::respond 403 Content {Not allowed} } }
If you want to check the URI, you can use HTTP::uri to get the value.
Aaron
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