how to limit specified client visit virtual server use irules

Hi

Create virtual server “vs_hfs_80” , only allow “192.168.1.3” and “172.16.1.4” visit the virtual server . How to use irules realize the idea ?

Thanks !

Hi Xia,

Here is one way to do it:

when CLIENT_ACCEPTED { 
  switch [IP::client_addr] { 
    10.1.1.1 { pool <poolname> } 
    10.1.1.2 { pool <poolname> } 
 
    default { 
        drop 
        log local0. "[IP::client_addr] doesn't match allowed. --> Dropping Packet"
    }
  }
}