Forum Discussion

GaryK_31628's avatar
GaryK_31628
Icon for Nimbostratus rankNimbostratus
May 27, 2008

Intelligent SNAT for UDP

Hello,

 

 

I have found this forum to be very useful in the past and has given me some good ideas to try out, but Im now looking for some specific solution to me problem now!

 

 

I am currently designing an RTSP traffic flow to integrate an internal streaming server to 2 external streaming servers. I am using a standard internal VIP (10.0.8.66:554) with an associated iRule that will redirect the traffic based on a specific parameter in the URL. This iRule is working fine and the requests are directed correctly.

 

 

But I need help with the returning UDP payload. I created another VIP (10.0.8.66:0) with a UDP profile to accept the incoming UDP. I have then associated the following intelligent SNAT to the VIP so the source address of the external streaming server matches that of the internal target VIP (10.0.8.66).

 

 

when CLIENT_ACCEPTED {

 

if {[IP::addr [IP::remote_addr] equals "159.107.178.66"]} {

 

snat 10.0.8.66

 

node 159.107.178.66

 

}

 

elseif {[IP::addr [IP::remote_addr] equals "159.107.178.208"]} {

 

snat 10.0.8.66

 

node 159.107.178.208

 

}

 

else {

 

drop

 

}

 

}

 

 

I am a bit of a novice at iRules and Im not even sure if what I am trying to do can be done, but any help would be greatly appreciated!

 

 

Thanks

 

 

garyk
  • I should also mention that I have an NAT created for the internal streaming server to allow the UDP to reach its destination.

     

     

    But my overall aim to to modify the source address of the UDP payload so it matches the the target internal VIP (10.0.8.66)