krelm_52303
Nov 18, 2009Nimbostratus
Simple IP & Port Forwarding irule
I'm moving some dumb port-forwarding function from a proxy server to the LTM, and want to write an irule to facilitate this. No authentication or anything fancy - just direct translation of dest IP : Port, based on the IP : Port the request was received on. So...
Port Forward IP range - 10.10.10.0/24 (all client connections go direct to this IP range).
Destination 10.10.10.1:8080 - forward to 192.168.1.1:8080
Destination 10.10.10.2:9001 - forward to 192.168.2.1:80
Destination 10.10.10.3:1111 - forward to 172.16.1.10:1234
etc.
Also, the LB needs to use a particular SNAT when sending out, but presume I just add this to the VIP config, not in an irule?
Do I need to add each forwarded IP : Port as an individual pool, or can I just forward the connection somehow directly via the irule? No need for health monitoring of the destinations, so I'd rather not mess up the webgui with 50+ pools when I don;t care about balancing or stats etc.
I have approx 50 port forwarding rules on the proxy, and would love to simplify this and future additions like it by using a data class group somehow.
Any pointers appreciated (version 9.2)