Forum Discussion

Joshua_106551's avatar
Joshua_106551
Icon for Nimbostratus rankNimbostratus
Oct 04, 2011

Redirect for stream video

I am trying to redirect incoming traffic if it matches a specific subnet, It needs to be redirected to an IP of a physical server. How would one go about doing this without the use of an HTTP::Redirect?

 

  • Here is what i planned to use, however I found out later it was not http.

     

     

    when HTTP_REQUEST {

     

    if { ([IP::client_addr] equals "10.92.0.0/16") or ([IP::client_addr] equals "10.93.0.0/16") } {

     

    HTTP::redirect "10.92.224.155"

     

    }

     

    }
  • Hi Joshua,

     

     

    I am curious what protocol is it? do you still want to perform redirect if it is possible?

     

     

    Thanks,

     

    Nat
  • RTMP/E over port 1935, this is to route all traffic to the default pool with the exception of the 2 subnets in the irule.
  • just double check

     

    is something like below is enough? (pick node or pool based on src IP, this way traffic still go through BIG-IP)

     

     

    
    when CLIENT_ACCEPTED { 
        if { ([IP::client_addr] equals "10.92.0.0/16") or ([IP::client_addr] equals "10.93.0.0/16") } { 
            node "10.92.224.155"    
        } 
    }
    

     

     

    if you really want traffic to bypass BIG-IP, I believe it is still possible.

     

    you may need to play with connection response and do something like

     

    - change response code from NetConnection.Connect.Success to NetConnection.Connect.Rejected

     

    - change level to error

     

    - add ex Property (with code, redirect sub-property)

     

    refer to something like this link

     

    http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=00000251.html

     

     

    Anyway, I am not RTMP expert. I might be wrong. 🙂

     

     

    Nat
  • Thanks! I am going to test today, looking at it this is what i needed, I was close as i had changed mine to Client accepted, i was unsure however to get to the IP, which you use "node".
  • After testing all traffic is being sent to default pool, No traffic is being directed to my node. I did add the node PORT number. My client IP being tested is 10.97.185.27 which should be sent to the node IP, which does not happen. Thoughts? Here is my irule now.

     

     

    when CLIENT_ACCEPTED {

     

    if { ([IP::client_addr] equals "10.92.0.0/16") or ([IP::client_addr] equals "10.93.0.0/16") } {

     

    node "10.92.224.155:1935"

     

    }

     

    }
  • Hi Joshua,

     

     

    10.92.0.0/16 = Any IP Address between 10.92.0.1 thru 10.92.255.254 - total 65,534 IP Addresses

     

    10.93.0.0/16 = Any IP Address between 10.93.0.1 thru 10.93.255.254 - total 65,534 IP Addresses

     

     

    The target IP Address is not within either specified range.

     

     

    Try 10.97.0.0/16.