Forum Discussion
drop incoming http requests to URI if external IP
Hi David, if you are using a version prior to 11.4, you can use HTTP CLASSES, where you can deny everything except the HOST AND URI. In version 11.4 and after, CPM 5Central Policy Matching) can be used for this.
But if you want to stay with an iRule approach, your iRule looks okay, except that you need to use a compliant call for the DATAGROUP you are using (if not, you will demote CMP). instead of $::Pool... you need to use the DATAGROUP Name directly : PoolOfAllowedAddresses
I would also recommend using the "string tolower" command, to avoid some lowercase/uppercase issues.
What do you want to do if multiple requests are carried by the same connection ? in the else, i think that "HTTP::respond" command would have been better.
If the HTML page you are allowing is composed of multiple objects (images, ...), then you will have to allow them also.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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