Jump to content
Welcome to our new Citrix community!

Convert F5 Irule Redirect (Domain to IP) to Citrix Policy


yusuf rifqi

Recommended Posts

Hi , I'm having issue converting this f5 irule to a Citrix Netscaler policy (Rewrite/Responder) :

 

 

when HTTP_REQUEST {

if { [HTTP::uri] eq "abc.com:7777" } {

      HTTP::redirect "https://10.1.1.1:7777"

    }

HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]

}

 

 

Anyone can Help? Thanks.

Link to comment
Share on other sites

add responder action redir_action redirect "\"https://10.1.1.1:7777""
add responder policy citrix_redir_policy "http.REQ.HOSTNAME.EQ(\"abc.com\") && client.TCP.DSTPORT.EQ(7777)" redir_action

 

 

Alternatively:
Create one HTTP Virtual Server with IP:10.1.1.1 with port 7777 without any service or servicegroup binding, under Protection -> Redirect URL -> enter the new URL you want users to be redirected to i.e. https://10.1.1.1:7777.

Then, create a new HTTPS Virtual Server with Same IP: 10.1.1.1 with port 7777 with required service  or servicegroup

 

Ex:

add lb vserver abc.com_http HTTP 10.1.1.1 7777 -persistenceType SOURCEIP -timeout 60 -lbMethod ROUNDROBIN -redirectURL "https://10.1.1.1:7777" -cltTimeout 180

add lb vserver abc.com_ssl SSL 10.1.1.1 7777 -persistenceType SOURCEIP -timeout 60 -lbMethod ROUNDROBIN -redirectURL "https://10.1.1.1:7777" -cltTimeout 180

 

 

Link to comment
Share on other sites

On 6/23/2020 at 1:49 PM, Arun Maharana1709160951 said:

add responder action redir_action redirect "\"https://10.1.1.1:7777""
add responder policy citrix_redir_policy "http.REQ.HOSTNAME.EQ(\"abc.com\") && client.TCP.DSTPORT.EQ(7777)" redir_action

 

 

Alternatively:
Create one HTTP Virtual Server with IP:10.1.1.1 with port 7777 without any service or servicegroup binding, under Protection -> Redirect URL -> enter the new URL you want users to be redirected to i.e. https://10.1.1.1:7777.

Then, create a new HTTPS Virtual Server with Same IP: 10.1.1.1 with port 7777 with required service  or servicegroup

 

Ex:

add lb vserver abc.com_http HTTP 10.1.1.1 7777 -persistenceType SOURCEIP -timeout 60 -lbMethod ROUNDROBIN -redirectURL "https://10.1.1.1:7777" -cltTimeout 180

add lb vserver abc.com_ssl SSL 10.1.1.1 7777 -persistenceType SOURCEIP -timeout 60 -lbMethod ROUNDROBIN -redirectURL "https://10.1.1.1:7777" -cltTimeout 180

 

 

Hi, thank you for your answer, I will try it.

 

Thanks a lot!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...