Security

Reply
Frequent Contributor II
Posts: 110
Registered: ‎12-07-2007

Use AP-group to determine re-direct page

Since 'apgroup' is a variable available for CPPM pages, can it be used to help determine where the user will be redirected?

 

Our ap groups have 3 capital letters at the beginning of the name to denote the location they serve.  If I could somehow use those three letters (they are the first 3 characters of 'apgroup') then I could do a redirect to a page with those same three characters as part of the page URL.

 

I'm not a coder but here's my fubar'd attempt to show what I'm thinking:

 

regex  (^[A-Z][A-Z][A-Z])   (this should assign it to a variable... perhaps $1)

 

</h2><meta http-equiv="refresh" content="3;URL={http://oursite.com/$1.php}">
<p>
Redirecting you to {http://oursite.com/$1.php}, please wait...
</p>

 

Is it possible to derive a new variable based on one of the variables available to the CPPM then use it for a page redirect?

MVP
Posts: 561
Registered: ‎11-28-2011

Re: Use AP-group to determine re-direct page

[ Edited ]

This isn't exactly what you asked for (sorry), but I achieved what I think you're talking about in a slightly different way.

 

I did this in the old days (Amigopod). I achieved it with controller ap-groups and VAPs instead as I knew exactly what the result would be. Might be handy for you if you can't find a more slick way? I know this works. The below is on the basis of 3 areas (A, B and C) and should be self explanatory?

 

If you read it bottom up, it might make more sense. The order top-down, is the way you'd paste the script into the controller CLI.

 

aaa authentication captive-portal "A"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
login-page "https://clearpass-vip.xyz.com/Landing-A.php"
!
aaa authentication captive-portal "B"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
login-page "https://clearpass-vip.xyz.com/Landing-B.php"
!
aaa authentication captive-portal "C"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
login-page "https://clearpass-vip.xyz.com/Landing-C.php"
!

user-role "guest-logon-in-A"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
captive-portal "A"
!
user-role "guest-logon-in-B"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
captive-portal "B"
!
user-role "guest-logon-in-c"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
captive-portal "C"

!

aaa profile "guest-aaa-for-area-A"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
initial-role "guest-logon-in-A"
!
aaa profile "guest-aaa-for-area-B"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
initial-role "guest-logon-in-B"
!
aaa profile "guest-aaa-for-area-C"
<<<PUT WHATEVER ELSE YOU NEED IN>>>
initial-role "guest-logon-in-C"
!

wlan virtual-ap "guest-vap-for-area-A"
aaa-profile "guest-aaa-for-area-A"
!
wlan virtual-ap "guest-vap-for-area-B"
aaa-profile "guest-aaa-for-area-B"
!
wlan virtual-ap "guest-vap-for-area-C"
aaa-profile "guest-aaa-for-area-C"
!

ap-group "area-A"
virtual-ap "guest-vap-for-area-A"
!
ap-group "area-B"
virtual-ap "guest-vap-for-area-B"
!
ap-group "area-C"
virtual-ap "guest-vap-for-area-C"
!

Kudos appreciated, but I'm not hunting! (ACMX 104)
Search Airheads
Showing results for 
Search instead for 
Did you mean: