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

serebra_83282's avatar
serebra_83282
Icon for Nimbostratus rankNimbostratus
Jul 08, 2009

ProxyPass problem

Greetings,

 

 

I followed the instruction on http://devcentral.f5.com/wiki/default.aspx/iRules/ProxyPass to set up ProxyPass and got problem.

 

 

In browser, it said:

 

Connection Interrupted

 

The connection to the server was reset while the page was loading.

 

The network link was interrupted while negotiating a connection. Please try again.

 

 

In Big-IP log /var/log/ltm, it said:

 

Jul 8 16:46:24 tmm tmm[1577]: 01220001:3: TCL error: ProxyPass - beta while executing "virtual name"

 

 

Here are the configurations:

 

virtual beta {

 

pool betapool

 

destination 172.16.0.24:http

 

ip protocol tcp

 

rules ProxyPass

 

profiles

 

http

 

oneconnect

 

tcp

 

}

 

 

class ProxyPassbeta {

 

" www.site1.com/support www.site2.com/support"

 

}

 

 

BIG-IP 9.4.3 Build 1.4

 

 

Idea?

 

 

Thank you!

 

12 Replies

  • I even tested follow simple code (posted at http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=59883&view=topic) to proxy client request http://www.site1.com/nilo to http://www.site1.com/bcda, it did not work, got same error.

     

     

    when HTTP_REQUEST {

     

     

    Initialize a variable to track whether to rewrite the response headers/content

     

    set check_response 0

     

     

    Check if the path is correct

     

    if {[HTTP::uri] starts_with "/nilo"} {

     

    Track that we'll rewrite the response headers and possibly the payload for this app

     

    set check_response 1

     

    }

     

    }

     

    when HTTP_RESPONSE {

     

     

    Check if we're potentially rewriting the response headers/payload for this app

     

    if {$check_response}{

     

     

    Check if JSESSIONID cookie exists

     

    if {[HTTP::cookie exists JSESSIONID]}{

     

     

    Set the path on the cookie to /sdr/nilo so the client will send the cookie in requests for any path

     

    HTTP::cookie path JSESSIONID "/sdr/nilo"

     

    }

     

     

    Check if the response is text

     

    if {[HTTP::header value Content-Type] contains "text"} {

     

     

    Set the replacement text and enable the stream filter

     

    STREAM::expression {@/nilo/@/bcda/@}

     

    STREAM::enable

     

     

    } else {

     

    Response isn't text, so disable the stream filter

     

    STREAM::disable

     

    }

     

    }

     

    }

     

     

    By the way, www.site1.com/bcda/ is existed.

     

     

    Thank you,

     

     

    Victor
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi Victor,

     

     

    When you tested with the updated HTTP::header Host replace... command the logs show the rewrite worked:

     

     

    When using 'HTTP::header replace Host $host_serverside', here is the log:

     

    Jul 10 09:41:54 tmm tmm[1577]: Rule ProxyPass : beta, Host=www.site1.com, URI=/support/index.htm: Current Host header value: www.site2.com, URI: /support/index.htm

     

     

    When you used the original iRule, it didn't work:

     

     

    When using 'HTTP::header replace header_name: header_value' , here is the log:

     

    Jul 10 10:04:59 tmm tmm[1577]: Rule ProxyPass : beta, Host=www.site1.com, URI=/support/index.htm: Current Host header value: www.site1.com, URI: /support/index.htm

     

     

    Can you update the iRule to use 'HTTP::header replace Host $host_serverside' and test once more?

     

     

    Aaron