Forum Discussion
Pedro_Minas
Nimbostratus
Jul 06, 2010Reverse Proxy Problems
Hello
I'm trying to create a reverse proxy in my F5 BIG-IP. I'm having problems with the redirection to another port.
What i'm doing is this...
the user connects to a VS (in port 80)... then with an IRule i change the uri and assign a pool depending on the http_request uri... but the real servers are listening in a different port (in my case 50000)... my problem is redirecting not only to a different pool but to another port...
do i have to create another vs listening in port 50000.
Thanks in advance...
- Chris_Miller
Altostratus
As long as your pool members are configured to listen on port 50,000 and you have "Port Translation" enabled on your VIP, you shouldn't have a problem. - Pedro_Minas
Nimbostratus
this is m irule... - hoolio
Cirrostratus
Hi Minas, - Michael_Yates
Nimbostratus
Try this:when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/xpro.xx.tt" } { HTTP::uri xpro.xx.tt/teste/tt/rr pool teste-reverse_proxy-pool1 } }
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "/xpro.xx.tt" } { HTTP::redirect http://[getfield [HTTP::host] ":" 1]/xpro.xx.tt/teste/tt/rr } }
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "/xpro.xx.tt" } { HTTP::redirect http://[getfield [HTTP::host] ":" 1]/xpro.xx.tt/teste/tt/rr } if { [string tolower [HTTP::uri]] starts_with "/xpro.xx.tt/teste/tt/rr" } { pool teste-reverse_proxy-pool1 } }
- Pedro_Minas
Nimbostratus
I've already tested out your solutions... - Michael_Yates
Nimbostratus
Change the "equals" in your iRule to "starts_with" - Pedro_Minas
Nimbostratus
hello again... - Pedro_Minas
Nimbostratus
In the last post there was a problem... in redirected the http requests in loop... - hoolio
Cirrostratus
NS_ERROR_NET_RESET indicates the client received a TCP reset from the server direction. LTM will send a TCP reset if there is a runtime error in an iRule. Do you see any errors in /var/log/ltm? - Michael_Yates
Nimbostratus
There is another minor tweak that you need to do:
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