Forum Discussion
irule ACL for internet or internal access
Could you have a look at my iRule below. Something is not working and I have blinders on at this point. The goal is to block external access to everything except the /open/* directory and block internal access to everything except the /media/* and /open/* directories.
This is for bcvideo.brunswick.com (in order to test internally the host file needs to be modified to point to 172.23.4.101)
when HTTP_REQUEST {
Outside Allowed
if {!([matchclass [IP::client_addr] equals private_net]) and ([class match [HTTP::path] starts_with bcvideo_acl]) } { return }
Inside Allowed
if {([matchclass [IP::client_addr] equals private_net]) and ([class match [HTTP::path] starts_with bcvideo_inside_only_acl]) } { return }
Everything Else Denied
HTTP::respond 200 content "PERMISSION2 DENIED TO URL PATH: [HTTP::uri] FROM: [IP::client_addr] " }
Data string groups bcvideo_acl - /open/* bcvideo_inside_only_acl - /media /media/* /open/*
1 Reply
- jokragly
Nimbostratus
Wildcards (*) don’t work in data groups.
You’re already saying “Starts_With”
The * would be interpreted, quite literally, which is not the URL.
I removed the * and tested successfully.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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