# Can I refer to an ACL within an aFlex?

**URL:** <https://community.a10networks.com/t/can-i-refer-to-an-acl-within-an-aflex/324>\
**Category:** aFleX\
**Tags:** aflex\
**Created:** [August 26, 2015, 10:46am UTC](https://community.a10networks.com/t/can-i-refer-to-an-acl-within-an-aflex/324 "2015-08-26T10:46:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ip-netze\_wdr.de](https://avatars.discourse-cdn.com/v4/letter/i/ecccb3/32.png) [@ip-netze\_wdr.de](https://community.a10networks.com/u/ip-netze_wdr.de)\
**Post date:** [August 26, 2015, 10:46am UTC](https://community.a10networks.com/t/can-i-refer-to-an-acl-within-an-aflex/324/1 "2015-08-26T10:46:14Z")

</div>

Hi there, I have two pools that should explicitely be used depending on the clients source IP-adresses, and this already seems to works with the following aFlex example:

```auto
when CLIENT\_ACCEPTED \{
if \{ [IP::addr [IP::client\_addr] equals 10.10.10.0/24] \} \{ 

```

pool POOL1  
} else {  
pool POOL2

```auto
\}
\}

```

The problem is, that we have multiple networks, that should use POOL1 but not POOL2.  
I think, I could fix this with multiple else-statements, but the idea is, to refere the if-statement to an ACL.  
Does someone know if, and if so, how this is possible?  
Or are there any better ideas to fix the service request?

Many thanks in advance  
Hakan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/bb9f186d33804d3044a0374e589f49fdf3be1328.png) [@system](https://community.a10networks.com/u/system)\
**Post date:** [August 26, 2015, 1:39pm UTC](https://community.a10networks.com/t/can-i-refer-to-an-acl-within-an-aflex/324/2 "2015-08-26T13:39:21Z")

</div>

Hi Hakan  
you can use a class-list for each list of networks you require use pool1 or pool2

```auto
when CLIENT\_ACCEPTED\{
if \{ ( [CLASS::match [IP::client\_addr] CLserver1] ) \} \{

```

pool Group\_server1

```auto
\}
if \{ ( [CLASS::match [IP::client\_addr] CLserver2] ) \} \{

```

pool Group\_server2

```auto
\}
\}

```

CLserver1 and CLserver2 are two classlist created

---

<div class="post-metadata">

**Author:** ![ip-netze\_wdr.de](https://avatars.discourse-cdn.com/v4/letter/i/ecccb3/32.png) [@ip-netze\_wdr.de](https://community.a10networks.com/u/ip-netze_wdr.de)\
**Post date:** [September 1, 2015, 2:20pm UTC](https://community.a10networks.com/t/can-i-refer-to-an-acl-within-an-aflex/324/3 "2015-09-01T14:20:53Z")

</div>

Hi jyovani,

sounds well, I will try it with the class list.  
Thanks!
