Forum Discussion
Bob_H__117248
Nimbostratus
Jun 06, 2013Reverse proxy redirection
I've tried using a Stream profile and iRule to redirect incoming external traffic to an internal server based upon the URI with no success.But the fact is I have no experience with using the stream profile and my iRule skills are weak.
I want traffic coming in as https://www.test.com:4080/ABCxxx/ to go to http://10.10.10.10 internally. Seems simple enough. Can anyone provide some direction?
10 Replies
- nitass
Employee
just wondering why you need stream profile.
sol9800: Using an iRule to load balance HTTP requests to multiple pools
http://support.f5.com/kb/en-us/solutions/public/9000/800/sol9800.html - Bob_H__117248
Nimbostratus
I was looking at stream profile only because another network engineer I work with said that's what I should use.
Thank you for the article! I'll give that a try. - Bob_H__117248
Nimbostratus
I tried this using the information in that SOL, but it's still not working.
I don't think I explained this very well above. I'm migrating off of Microsoft ISA to the F5.
What I need to have happen is external(Internet) requests coming in as https://www.test.com/ABC123/test/test.htm need to be directed to an internal server but redirected to a different directory on that server as such. http://10.10.10.1/XYZ987/
Right now the incoming connection is trying to go to http://10.10.10.1/ABC123.test/test.htm and that directory doesn't exist. - Kevin_Stewart
Employee
Have you looked at using ProxyPass? It may be a little overkill for a single set of URIs, but it should do the trick nonetheless. - Bob_H__117248
Nimbostratus
That does look like a lot for a single URI. But if that's my only option.... - Kevin_Stewart
Employee
It's not your only option, but would require the least amount of coding/testing on your part, given the maturity of the ProxyPass iRule. - Bob_H__117248
Nimbostratus
So for someone who is just getting started in the iRule world, this is more than what I'm comfortable doing.
So, where can I get help with something like configuring ProxyPass for my specific needs?
Is that something I should submit a ticket to F5 for or is that more professional services? - hoolio
Cirrostratus
Hi Bob,
F5 Support probably won't help you configure and test ProxyPass as that's beyond the scope of break-fix support (though you could try asking). I'd guess this would be better to do as an iRules on Demand PS engagement:
http://www.f5.com/support/professional-services/consulting/offerings/irules-on-demand/
Aaron - Kevin_Stewart
Employee
Depending on the complexity of some applications, the ProxyPass iRule can be a necessary evil. It does the job of rewriting the incoming AND outgoing payloads, including URIs and Host headers. Thankfully the iRule is fairly well documented so it's not that difficult to set up.
1. Create the iRule - copy it from the website and modify the two values in the RULE_INIT event to enable (temporary) logging.
2. Create a data group called "ProxyPass". So for example, if the virtual server is called "my_vs", the data group would be called "ProxyPassmy_vs".
3. Create a series of entries that translate clientside requests to server side requests.
ex.
"/clientdir" := "/serverdir"
"www.host.com/clientdir" := "internal.company.com/serverdir"
"www.host.com/" := "internal.company.com/serverdir/"
"/abc123/" := "/xyz987/"
** for you application you probably just need to work with URIs.
It may take a little work to get this part just right depending on your application, but the logging will guide you.
Like I said, ProxyPass is designed to deal with complex applications. In the event, however, that your website doesn't require all of this, a simpler iRule to just catch the incoming URI and change it would look something like this:when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/abc123/test/test.htm" } { HTTP::uri "/xzy987/" } } - Bob_H__117248
Nimbostratus
Thank you very much!
This gives me something to try and a fallback with iRules on-demand should I need the extra assistance.
I'll let you know how it goes.
Thanks again!
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