Forum Discussion

hc_andy_35682's avatar
hc_andy_35682
Icon for Nimbostratus rankNimbostratus
Feb 09, 2010

iRule to mimic Cisco ACL for Forwarding VIP

Hi All,

 

 

Can somebody please help me write an iRule that will permit/deny the outside world from accessing the real servers behind the F5???

 

 

For example I have an inside_vlan_502 (forwarding VIP) configured that forwards all ip traffic for 210.15.210.0/24 from the outside_vlan. Is there something similar to Cisco's ACL that I can incorporate into an iRule to permit/deny certain IP's or TCP connections to the real servers.

 

 

Say for example I want the following:

 

 

1/ Allow 172.16.9.0/24 to access any real servers in 210.15.210.0/24

 

2/ Allow a single host 172.16.10.1 to access any real servers on port 80 only

 

3/ Deny everything else

 

 

In Cisco ACL, I would write it like so...

 

 

permit ip 172.16.9.0 0.0.0.255 210.15.210.0 0.0.0.255

 

permit tcp host 172.16.10.1 210.15.210.0 0.0.0.255 eq 80

 

deny ip any any

 

 

How might this be done with an iRule for a forwarding VIP?

 

 

Thanks.

 

 

Andy