Forum Discussion
Piotr_Lewandows
Altostratus
Apr 18, 2016AFM rule and AD groups
Hi,
I am trying to replicate Microsoft FTMG firewall functionality (found in other products working as forward proxy as well) to use AD group membership to allow or deny traffic.
In FTMG wh...
Stanislas_Piro2
Cumulonimbus
Apr 18, 2016Hi,
I had a similar need for a customer, but with explicit authentication. the user role is stored in a table.
The user must authenticate to APM on a dedicated VS with the following irule:
when ACCESS_ACL_ALLOWED {
log local0. "requete de [IP::client_addr]"
switch [HTTP::path] {
"/status" {
set value [table lookup -subtable IPAdmins [IP::client_addr]]
set lifetime [table lifetime -subtable IPAdmins -remaining [IP::client_addr]]
if {$lifetime < 1} {ACCESS::respond 302 noserver Location "/disconnect"}
ACCESS::respond 200 content "
Authenticated
You are authenticated successfuly :
session time remaining : [clock format $lifetime -format {%H:%M:%S}]
Your client IP : [IP::client_addr]
Your autorization role : $value
" noserver
}
"/disconnect" {
table delete -subtable IPAdmins [IP::client_addr]
ACCESS::respond 302 noserver Location "/vdesk/hangup.php3"
}
default {
table set -subtable IPAdmins [IP::client_addr] [ACCESS::session data get session.localdb.groups] 7200 43200
ACCESS::respond 302 noserver Location "/status"
}
}
}
Then, when trying to access protected resources, the AFM rule allow traffic with following irule (one per user role)
when CLIENT_ACCEPTED {
switch [table lookup -subtable IPAdmins [IP::client_addr]] {
"Admins" {}
"Deploy" {drop}
"Exploit" {drop}
"Infra" {drop}
default {drop}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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