Forum Discussion
mister_65355
Nimbostratus
Jun 19, 2007limited Web
Hi All,
I will like limited the accesses Web only for http://@IP_serveur/test/ (for example only for /test/ and /test2/)
What I can make?
Thanks
- mister_65355
Nimbostratus
i think a solution is: - mister_65355
Nimbostratus
yes, There is only HTTP opened to the SERVEUR (all traffic are blocked by the firewall). also, I like filtred the traffic who can't firewall blocked but the BIG-IP can do it (filtred in level application). - JRahm
Admin
Adding an else condition with discard if you don't want to notify the client or reject if you do should take care of the requirement to only allow requests to the /test/ and /test2/ paths. - mister_65355
Nimbostratus
l'd like optimased my iRule: - Your iRule is probably as optimized as you are going to get it. There are several ways you can write a iRule like this. One of them is with if/elseif's like you have it. If you want to optimize the way it is, then you'll need to look at patterns as to which URI's occur most often and move them up higher in the set of elseif's. But if you don't have that information, this is likely the best you can get.
when HTTP_REQUEST { if { [HTTP::host] == "app.example.com"}{ pool Pool1 } else { switch -glob [HTTP::uri] { "*/test/*" - "*/info/*" - "*/test1/*" - "*/test2/*" { pool Pool1 } default { reject } } } }
- JRahm
Admin
Maybe it's obvious to everyone, but I'd just like to point out that all app.example.com requests would be sent to pool1, as would all other hosts that contain those strings in the URI. It just seemed odd to me that there wouldn't be an alternative to reject for all other hosts. - mister_65355
Nimbostratus
The interest of this irule is to reject all the useless requests to Pool1.
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