Forum Discussion

JD_Tomzak's avatar
JD_Tomzak
Icon for Cirrus rankCirrus
Nov 14, 2024

VIP needed for many UDP ports

Greetings,   I have been asked to create an F5 solution for UDP. There a dozen or so ports, so I was going to make a pool for each (same servers are in all of them, but listening on different ports...
  • Aswin_mk's avatar
    Nov 14, 2024

    Hi JD_Tomzak 

     

    Can u try this with below irule, you can allow all port (configure 0 udp). create a irule and map. dont add any pools in resource. some ports i added as example. you can try it with your ports.(I am not tried this in lab)

     

    when CLIENT_ACCEPTED {
        # Get the destination port of the incoming UDP packet
        set udp_port [UDP::local_port]

        # Select pool based on the destination port of the UDP packet
        switch $udp_port {
            53 {
                pool pool_dns
            }
            123 {
                pool pool_ntp
            }
            514 {
                pool pool_syslog
            }
            1812 {
                pool pool_radius
            }
          
        }
    }