Forum Discussion
Whitelisting access to URLs based on specific IPs
Hello Enes,
Thank you for your replay.
The iRule which you provided takes care of first part of requirement i.e access to specific URI path allowed from four public IPs & all private IPs.
Please inform do I need to add commadns in iRule to adderss remaning requirment; all other URI paths should be accessable by all public & private IPs.
Regards
Hi,
The iRule drops requests except certain IP addresses for the certain url. If there is no match with the if statement, requests will be forwarded to the default pool. iRule does not require any extra code.
It might be better to use path instead of uri.
when HTTP_REQUEST {
if { [string tolower [HTTP::path -normalized] equals "/good/evening/happy/life" && not ([class match [IP::client_addr] equals /Common/datagroupname])} {
drop
return
}
}
For the following URL:
http://www.example.com:8080/main/index.jsp?user=test&login=check
The URI is:
/main/index.jsp?user=test&login=check
The path is:
/main/index.jsp
The query is:
user=test&login=check
- Daniel_WolfNov 25, 2023MVP
Upvote for explaining URI vs path vs query. The information is out there... but nobody seems to care or to google.
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