Forum Discussion

Nolan_Jensen's avatar
Nolan_Jensen
Icon for Cirrostratus rankCirrostratus
Jun 16, 2022

Close connection after redirect to external site

Summary: We are using a virtual server with an irule to redirect requests to what would have been our on prem sharepoint, out to our sharepoint online pages.  Thisis really a stop gap until org change mangment can do the customer out reach, but don't want to wait for that to happen to solve my below issue.  

irule looks like this:
Internal DNS has a few entries that point at this VIP and when those old links are used this is what happens

 

when HTTP_REQUEST {
     if { [string tolower [HTTP::host]] equals "test.company.test.org" } {
        HTTP::redirect " https://qa.sharepoint.com/sites/companyqa[HTTP::uri]"
        
    }
    else {
        HTTP::redirect "https://companyqa.sharepoint.com"
        
    }
}

 

Problem:
I have noticed that clients are staying connected to this VIP which is causing connections to grow higher then I would like.  
I see many of these type of connecitons 
192.168.1.100:51319 VIP:80 any6.any any6.any tcp 10 (tmm: 3) none none

Question:
How can I close these connections to this VIP after the redirect has happened?  

Thank you for your help.

2 Replies

    • Nolan_Jensen's avatar
      Nolan_Jensen
      Icon for Cirrostratus rankCirrostratus

      Thank you for the response.  

      I added that to my rule like this but still I can see connections?  Did I do it wrong or might it be something else. 

      when HTTP_REQUEST {
           if { [string tolower [HTTP::host]] equals "test.company.test.org" } {
              HTTP::redirect " https://qa.sharepoint.com/sites/companyqa[HTTP::uri]"
              TCP::close
          }
          else {
              HTTP::redirect "https://companyqa.sharepoint.com"
              TCP::close
          }
      }