cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15198
Views
20
Helpful
48
Replies

Linking one guest portal to another guest portal

gthermae
Cisco Employee
Cisco Employee

Hi,

We just spent some time to build a link from a hotspot portal to a guestportal. Just thought I would share the code we inserted in the opt content 2 on the hotspot page. The trick is to take the sessionId from the current url on the hotspot page and add it to the link. Also want to give creds to Christophe Landrain who did most of this.

$(window).ready(function() {

var hostname = window.location.hostname;

var WebSessionId = window.location.href.substr(window.location.href.search("\\?")).split("=")[2];

jQuery('.cisco-ise-body').append(' <center><a href="https://'+hostname+':8449/portal/gateway?sessionId='+WebSessionId+'&portal=a23657f0-d7e2-11e6-a31c-0050568a29f5&action=cwa" style="color: rgb(0,255,0)"><font color="212121">Go to Guest Portal</font></a></center>');

});

//Gunnar

48 Replies 48

Today I received a working script from Cisco Engineer which needs to be configured under optional content 1 of the hotspot link portal(see attached picture) and script attached. It is tested and working well.

Hi @reachmearun.s ,

Thanks for sharing the code. The https link info of guest 1 and guest 2 were the links of respective portal links that already created in guest portal ,and attached to one of the primary portal of portal as a part of sub links in optional content. Is that correct? Any changes that is required in code please suggest me as per different requirements where some field of code to be changed or it is common code that works in all cases, Kindly clarify ,that would be helpful.

Cheers,

Santhosh 

Hi Santhosh,
I really can’t say. This was so long ago and I have not played with it since. Sorry

Can someone confirm, that the redirect after clicking the button is not working on iOS Devices?

Are you using the Apple mini browser captive network assistant? It may have problems switching not sure.

If you are can you enable captive portal bypass on the controller to see if that maybe causing it?

Hello together, 

where can i get the WebSessionID?

I don't know how to find this information. 

 

Kind Regards

Jacob

It’s dynamically generated, script is setup to use that. Did you try the script as is?

Hi Jason, 

it works now fine. It was my fault. 

But we have still trouble with iPhone 8 devices to redirect the guest portal link. 

We get a Bad Request 400 error message. 

Do you have some idea? 

 

Kind Regards

Jacob 

Does the normal flow without script work fine?

Per the thread are you using the Apple captive network assistant? If so you might need to enable captive portal bypass on your controller

Hi Jason, 

thanks for your reply. Now, we activated CNA Bypass on the controller. 

But we just have to reload the controller and waiting for a timeframe internally. 

After that i will post the result. 

 

Kind Regards

Jacob

Thanks what is the use case and flow you’re trying ? I might have another option If this doesn’t work

https://community.cisco.com/t5/security-documents/ise-guest-amp-web-authentication/ta-p/3657224#toc-hId--1098265749

Hi Jason, 

let me explain my settings and my problem with this. 

 

In the past CNA was disabled on the Wireless Lan Controller. I have a guest-portal self registration form. 

In that form i configured the linking script that point to another guest-portal self registration form. 

When i click the linking script with a iPhone i got a Bad Request 400 error. 

Now with CNA enabled i got no Bad Request 400 error - but the IPhone user have to manually open an unknown web page and then they will be redirected to the guest-portal self registration. 

If they clicked a bookmarked page on iPhone nothing happens. (no redirect)

 

Jason - do you have any idea of this behaviour? 

 

Kind Regards

Jacob. 

 

Yes with captive bypass enabled you will need to manually open an http page. I am not sure if the bookmarked pages are http? Or perhaps not triggering DNS request? I don’t think anything to be configured around

The guide I linked to explains this. Https redirect not recommended.

Also the Apple captive network assistant mini browser doesn’t like the scripts and links so you have to manually use the safari browser

Would recommend telling users to go to perhaps http://enroll.cisco.com or something that will trigger the redirection manually.

Another option you could try is to have a self-registration portal with a hotspot button instead? This would perhaps work with mini browser auto pop up

http://cs.co/ise-guest
Check out get quick access option

okay - i understand. 

In my case it is possible to use ACL denies for  appleiphonecell.com and captive.apple.com?

 

Workaround:
In the ACL on the WLC used for captive portal redirection and exemption of special traffic for the Guest Portal, add exemptions for the IP resources that resolve from "www.appleiphonecell.com" and "captive.apple.com" FQDNs.

 

https://community.cisco.com/t5/policy-and-access/ise-cwa-redirection-problem-for-apple-devices/td-p/2604955

 

For a short reply i will be thankfully. 


Kind Regards

Jacob

Why? It’s the same thing. Recommendation is to use captive portal bypass