Forum Discussion

AngryCat_52750's avatar
AngryCat_52750
Icon for Nimbostratus rankNimbostratus
Nov 22, 2013

iRule - ACL - source ip and port

i am trying to setup an iRule to allow a specific group of IPs and now i need to add access to only a specific port.. what is the command for the port?? the current iRule for ports is below -

 this event is triggered when a client - BIG-IP TCP connection is established
when CLIENT_ACCEPTED {

    Check if the client IP is not part of the datagroup hosts/networks
   if { not ([matchclass [IP::client_addr] equals allowed-servers]) }{
       Log dropped requests
      log local0. "Denied Access-servers: [IP::client_addr]"

       drop the request
      discard
   }
}

1 Reply

  • You can also use matchclass for ports as well: something like this:

     Check to see if the destination port is allowed
    if { [class match [TCP::local_port] equals Name_of_Data_group] }{