pass traffic based on client source IPs

Hello,

i have a simple question. we want to pass traffic based on client source ip. i have below irule.

when CLIENT_ACCEPTED {

if { [IP::addr [client_addr] equals 192.168.217.0/24] } {

pool pool-1

} elseif { [IP::addr [client_addr] equals 192.179.217.0/24] } {

pool pool-1

} elseif { [IP::addr [client_addr] equals 192.179.10.0/24] } {

pool pool-1

} else {

pool pool-2

}

}

My question is:

1. if IP::addr [client_addr] equals 192.168.217.0/24 means client address belong to this /24 subnet, or must equal ? because we have a lot source ips in these three subnets, we do not want list all the /32 source ip on irule.

Thanks in advance.

xiaolin

Hi Xiaolin,

Yes it means that it falls within /24 subnet.

Bhattman

Hello,

I’m new with this product and I will like to find a symple irule to Allow source for a IP and port.

My question is, i need to only accept an Ip and port for one Virtual Server, but the question is, i need to make a irule or there are an easier solution, and if u know the script, u can save my time to help me

thnaks

Posted By iondro on 01/28/2010 2:29 AM

Hello,

I’m new with this product and I will like to find a symple irule to Allow source for a IP and port.

My question is, i need to only accept an Ip and port for one Virtual Server, but the question is, i need to make a irule or there are an easier solution, and if u know the script, u can save my time to help me

thnaks

So I if I am reading this correctly you want inspect the source address as it comes into a Virtual Server and then allow it or deny it based on the source address?

Thanks,

Bhattman