For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

aschi's avatar
aschi
Icon for Nimbostratus rankNimbostratus
Jun 27, 2017

Rewrite Header in Response

Because of our ssl-vpn for home office user we have two urls to the same website wich contains jspa.

 

jira.company.com and ssl-vpn-jira.company.com

 

this page contains "tickets" and each of them has his own Link which is jira.company.com/... I thougt I can handle this by just using "when HTTP_RESPONSE" as I read in different pages to rewrite it to ssl-vpn-jira.company.com/... but it doesn't work.

 

HTTP::header replace Location [string map -nocase {$::internal_hostname $::external_hostname} [HTTP::header Location]]

 

It't not the content which i have to rewrite, so I guess no streaming Profile is necessary. could someone give me a Hint how to solve this Problem. Do I have to investigate on streaming Profile or someting else?

 

Best Regards, Roger

 

2 Replies

  • This is an example for URI masking. You can use this as a template for host header masking.

     

  • aschi's avatar
    aschi
    Icon for Nimbostratus rankNimbostratus

    client Request: https://ssl-vpn-jira.company.com/jira Request to Server should look like: https://jira.company.com/jira

     

    The login Page is accessible and also the login works and the URL pointing still to https://ssl-vpn-jira.company.com/jira. But as soon as I click on a link pointing to "jira.company.com/jira/.... the rewriting doesn't work anymore. iRule (for Test purpose I filter for my IP-Address):

     

    when HTTP_REQUEST { if { ( [IP::addr [IP::client_addr] equals 10.85.4.21%1] ) } { if { [HTTP::host] contains "ssl-vpn-jira.company.com" } { HTTP::header replace Location [string map -nocase {"ssl-vpn-jira.company.com" "jira.company.com"} [HTTP::header Location]] } } }

     

    when HTTP_RESPONSE { if { ( [IP::addr [IP::client_addr] equals 10.85.4.21%1] ) } { HTTP::header replace Location [string map -nocase {"jira.company.com" "ssl-vpn-jira.company.com"} [HTTP::header Location]]

     

    } }