cancel
Showing results for 
Search instead for 
Did you mean: 

iRules redirection not working

Satriaji
Altocumulus
Altocumulus

Hi Everyone,

 

I have 2 VS in serverfarm and DMZ. The pool member SVF is used by IP VS DMZ.

 

SVF (port custom 45112)

 

0691T00000F5tGdQAJ.jpg 

 

DMZ (port 443, using SSL)

 

0691T00000F5tGiQAJ.jpg 

 

iRules_redirect_autodebet :

 

when HTTP_REQUEST {

 if { [HTTP::path] equals "/" } {

  HTTP::redirect "/adb-soa/"

  #log local0. "redirect"

 } 

}

 

When I access http://192.168.12.220:45112 its just redirect to http://192.168.12.220:45112/adb-soa. But the pages itsn't working.

 

 

0691T00000F5tGxQAJ.jpg 

 

Why the irules is not working ?? because backend server https ?

I just want to, if every hit VS http://192.168.12.220:45112 will be rewrite or redirect to http://192.168.12.220:/45112/adb-soa directly, so its not must be triggered by uri "/".

 

Anyone know to solve this ?

6 REPLIES 6

Hi, with the given details, I can see your iRule is working fine.

Now could you please confirm configurations like http profile, SNAT settings and Server SSL configurations on the vServer? Also make sure that given path should also work when accessing using backend server IP & port.

Hii Mayur,

 

Here the configuration:

0691T00000F5tQTQAZ.jpgVS SVF : SNAT_to_192.168.12.220, http profile: http

 

0691T00000F5tR7QAJ.jpgVS DMZ : SNAT automap, client SSL Asterisk

As your backend pool on VS-192.168.12.220 is secured (443), you need to have Server Side SSL profile to be configured. Also I would ask you to check if you are able to access required page using DMZ VS IP to see if that part works. If it is working fine, then we can focus on SVF VS (192.168.12.220).

I have been assign the server-ssl-insecure (ssl profile server) at vs 12.220. and I use this irules :

 

when HTTP_REQUEST {

  HTTP::redirect "http://192.168.12.220/adb-soa"

}

 

because no need uri "/" to triggered when hit the VS .

 

but the pages browser still display "the site can't be reach' but the redirection is works.

 

I tried to curl the VS and pool member :

 

0691T00000F5tqCQAR.jpeg0691T00000F5tq3QAB.jpeg 

The result same and have been redirect corectly right ? ..

 

Or perhaps we cannot access using web browser to access IP server ? so the web browser will display cant be reach page, but actually its working.

How to makesure its working.

 

 

oh im sorry, the irules must be using port 45112.

 

when HTTP_REQUEST {

  HTTP::redirect "http://192.168.12.220:45112/adb-soa"

}

 

so if i using this irules, the web browser pages display "the page is not working", but the irules redirect works when i hit http://192.168.12.220:45112. Its redirect to http://192.168.12.220:45112/adb-soa

 

0691T00000F5tv7QAB.jpg 

 

Hi  , Yes, correct ! I do not see any issues with the iRule here. Now I am trying to explain that you should check the application working status at each hope if its working fine. If backend application itself is not working then it will definitely won't work using F5 vServer also. So I would recommend you to check below steps to see the app working status. I am directly mentioning IP addresses here as per given details in your post.

 

1.      First check application status using actual application server on required port. In your case, it will be – http://10.45.26.37/adb-soa and see if it gives you required page. This testing needs to be done from any LAN system which can reach this server. If this is working then go to next step. Otherwise need to work on application side to see if application is configured properly.

 

2.     Now check application status using https://10.45.24.37/adb-soa to see if app is loading properly using DMZ VS.

 

3.     Third step would be testing application using SVF VS i.e. http://192.168.12.220:45112 or http://192.168.12.220:45112/adb-soa . Now on this vServer, you need to have Server Side SSL profile configured else it won’t work.

 

At any step, if testing results are not as expected then you need to check the issue at that step only before going further.

 

Hope it helps!