Forum Discussion
hc_andy_35682
Nimbostratus
Feb 09, 2010iRule 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
14 Replies
Sort By
- hc_andy_35682
Nimbostratus
Once again, great explanation Aaron. - hc_andy_35682
Nimbostratus
Sorry Aaron, not sure if you're still about... - hc_andy_35682
Nimbostratus
This seems to work, but is it the most efficient way to write it... - hoolio
Cirrostratus
If you want to maintain two datagroups with allowed client IP addresses/networks, then that line you've posted is fine. Another option is to combine the two datagroups into one and remove the 'or [matchclass ...'.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects