Forum Discussion
sandiksk_35282
Altostratus
Mar 08, 2018allow traffic to VS based on the source IP fwded in the http get request
I need to come up with a design to allow traffic to VS based on the source IP sent in the http get request.
Based on the source IP i need to make a decision whether to allow it or drop it.
Please hel...
Milan_Simcik
Nimbostratus
Mar 09, 2018Hello sandiksk,
try this irule.
when HTTP_REQUEST {
Traffic is allowed. Client IP match found in datagroup_QA
if { [class match [[HTTP::header Client-IP]] eq "datagroup_QA" ] }{
pool your_web_application_pool
}
else {
Traffic is dropped. Client IP match not found in datagroup_QA
reject
}
}
Or you can answer with a HTTP response using HTTP::respond. For example 403 Forbidden. To do so, replace reject with 'HTTP::respond 403' without quotes. Be aware of faked HTTP headers.
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