Forum Discussion
BigIP Http: forward
Hello all,
I am trying to use an Irule on the bigIP to forward traffic to a set URL.
I tested the below rule out.
when HTTP_REQUEST{
if {([matchclass [IP::client_addr] equals $::partner_proxy])} {
HTTP::redirect "http://www.example.com/newlocation.html"
}
}
else HTTP::redirect ""
}
But what I am getting is a HTTP redirect (the client gets the new URL sent back and the client calls the new URL) with this and not a http forward.
Any ideas where I can get a http forward where the bigIP maintains the state forwards the request to the new URL and then handles return traffic too.
Thanks, Vijay
5 Replies
- hoolio
Cirrostratus
Hi Vijay,
Can you try this?when HTTP_REQUEST { Check if client is in the partner_proxy IP datagroup if {([class match [IP::client_addr] equals partner_proxy])} { Rewrite URI to hardcoded value HTTP::uri "/newlocation.html" } else { Redirect client to blocking URL HTTP::redirect "http://www.accessdenied.com/newlocation.html" } }
Aaron - _33_113201
Nimbostratus
Hello Aaron thanks for the reply, but I do not want the URI part to change I want the whole domain to change.
i.e.
1. I make a connection to domain.com/newlocation.html
2. 1st case is met request gets forwarded to "http://www.example.com/newlocation.html"
3. 2nd case is met request gets forwarded to "http://www.accessdenied.com/newlocation.html"
4. client still sees domain.com in the browser and is connecting to the same virtual. - Kevin_Stewart
Employee
Is this for a forward proxy or reverse proxy? - _33_113201
Nimbostratus
forward proxy.
I also want the return traffic to pass thru the F5 back to the client. - Kevin_Stewart
Employee
Forward proxy is not a core functionality of the BIG-IP. It can, however, be achieved with iRules. Here are two links that you should look at to get you started:
iRule: HTTP Forward Proxy - v3.2
https://devcentral.f5.com/wiki/irul...-v3-2.ashx
iApp: Generic Forward Proxy with Websense Filtering iApp
https://devcentral.f5.com/wiki/iApp...-iApp.ashx
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