cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Virtual Server FQDN is redirecting to pool member IP

iRule
Altostratus
Altostratus

Dear Community,

 

When VIP URL of an application is browsed it automatically re-directs to IP URL of pool member. This virtual server contains a pool with three members. I need this application to be used only through VIP without re-directing URL to pool member IP. Your suggestions are highly appreciated to fix this issue.

 

Kind Thanks

Ahmad

9 REPLIES 9

youssef1
Cumulonimbus
Cumulonimbus

Hello Ahamd,

 

you potentially have an absolute link problem. the use of relative link is recommended which allows redirecting the user to the host of this request. to correct this it's quite simple, you just have to create a "rewrite" profile and put the matches that go well.

 

Let me know if you need help for "rewrite profil" settings.

 

regards

​Dear Youssef,

I would be grateful if you provide guideline on "rewrite profile" to solve my issue.

 

For example my VIP URL is http://myVIP:8083/welcome. When the users browse the VIP URL it redirects to http://1.2.3.4:8083/welcome/login URL where 1.2.3.4 is IP of one of pool member. This virtual server contains three pool members.

 

Regards 

Ahmad

Hello Ahmad,

 

So create your rewrite profile.

  • On general information -> rewrite mode, configure:

URI Translation

 

on URI Ttranslation check the following settings (they are already checks by default).

  • Request settings: Rewrite Headers
  • Request settings: Insert X-Forwarded-For Header
  • Response Settings: Rewrite Headers
  • Response Settings: Rewrite Content

 

On URI rules configure your entry like that:

 

0691T000008tll6QAA.png

You have to add this rules for each backend server...

 

keep me in touch.

 

regards

Dear Youssef,

 

I created a rewrite profile and inside it I created a rule for one pool member. Inside same rewrite profile I cannot create 2nd rule for 2nd pool member as it gives me following error. Inside this rewrite I cannot add two more rules for remaining two pool members.

 

MCP Error01070734:3: Configuration error: /VLAN-xyz/123test: Client URIs must be unique. 'http://myVIP:8083/welcome' is already in use.

 

This error specifies same client URI cannot be used in more than one rule inside same rewrite profile.

 

Then I created three different rewrite profiles each containing same client URI and different server URI but in the virtual server I can only choose one rewrite profile to assign to virtual server.

 

Kind Thanks

Ahmad

Hello.

Sorry for the delay.

The error is normal. If you have to rewrite 3 backend servers, when you create your rules, you don't set both.

​So in the same rewrite profile create your 3 rules but set in rule type: response.

in this case you should create your 3 rules without errors/ problem.

Keep me in touch

Regards

Dear Youssef,

 

Thank you, I used Response type and created three rules inside same rewrite profile. Now VIP URL http://myVIP:8083/welcome is not redirecting to pool member IP address but it is stuck (loading) on VIP URL http://myVIP:8083/welcome/login without showing content of the page (showing blank page). I opened dev tools and saw 401 unauthorized http response codes being continuously generated; I suspect resulting in blank page in loading state.

 

Regards

Ahmad

Hell Ahmad,

 

if you have a 401 error, there is authentication on your servers. is it basic, ntlm or kerberos?

if it is kerberos it would be necessary to inject the hostname of the server during the request.

and that you have to do it via an irule. but tell me already what type of authentication is carried by your server.

 

regards

Dear Youssef,

Thank you for your valuable inputs. The issue of re-direction to pool member IPs was fixed by application team.

iRule
Altostratus
Altostratus

Dear Community,

Please share any thoughts on my issue as I have not got a fix yet.