Forum Discussion

KPS_149915's avatar
KPS_149915
Icon for Nimbostratus rankNimbostratus
Apr 13, 2017

Source Redirect irule nor working

Hi All

Am trying to achieve source based redirect but having issues. VIP is listening on port 514. Seems all traffic are sending in poolb_520_UDP, not sure why.

when CLIENT_ACCEPTED {

 if {  [IP::addr [IP::client_addr] equals 10.192.12.0/24]

 or [IP::addr [IP::client_addr] equals 10.193.12.0/24]

 switch [UDP::local_port] { 
   514 {
      pool poola_514_UDP
       } 
     }
  }
   else  {
 pool poolb_520_UDP
     }

}

  • some modification require in above irule. Try this & paste if any issue.

     when CLIENT_ACCEPTED {
            if {([IP::client_addr] equals 10.192.12.0/24) or ([IP::client_addr] equals 10.193.12.0/24)} {
            switch [UDP::local_port] {
                    514 { pool poola_514_UDP } 
                    default { pool poolb_520_UDP } 
            }
        }
    }
    
  • some modification require in above irule. Try this & paste if any issue.

     when CLIENT_ACCEPTED {
            if {([IP::client_addr] equals 10.192.12.0/24) or ([IP::client_addr] equals 10.193.12.0/24)} {
            switch [UDP::local_port] {
                    514 { pool poola_514_UDP } 
                    default { pool poolb_520_UDP } 
            }
        }
    }
    
    • KPS_149915's avatar
      KPS_149915
      Icon for Nimbostratus rankNimbostratus

      Thanks but still not working, i think the problem could be due to this is UDP port and swithcing UDP client ports seems not working in the irule. I even tried removing the swithch ports but not working.

       

  • the IP address condition was not working...

    when CLIENT_ACCEPTED {
            if { [IP::addr [IP::client_addr]/24 equals 10.192.12.0] or [IP::addr [IP::client_addr]/24 equals 10.193.12.0] } {
            switch [UDP::local_port] {
                    514 { pool poola_514_UDP } 
                    default { pool poolb_520_UDP } 
            }
        }
    }
    
  • I think this is due to UDP that switch dosen't work. Is there any other option available.

     

    What about can we try hitting on this VS and creating new VS for 520 and sending traffic to it using irule. I want to achieve this using irule but as we know UDP switch dosen't work.