Hello Andy,

My best guest would be to handle this part as if it was a proxy passthrought.
Since Apple use *way to much* URLs to make the detection, the user-agent 
approach is the best.

I’d add a condition in the dispatcher to match it.

/usr/local/pf/lib/pf/web/dispatcher.pm line 59

Current:
if ( ( ($r->hostname.$r->uri) =~ 
/$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_DOMAINS/o && 
$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_DOMAINS ne '') || ($r->hostname =~ 
/$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_REMEDIATION_DOMAINS/o && 
$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_REMEDIATION_DOMAINS ne '') ) {

New:
if ( ( $r->headers_in->{‘User-Agent’} =~ /CaptiveNetworkSupport/ ) or ( 
($r->hostname.$r->uri) =~ /$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_DOMAINS/o && 
$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_DOMAINS ne '') || ($r->hostname =~ 
/$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_REMEDIATION_DOMAINS/o && 
$PROXYPASSTHROUGH::ALLOWED_PASSTHROUGH_REMEDIATION_DOMAINS ne '') ) {

Let me know if that works!

Cheers!
dw.

-- 
Derek Wuelfrath
[email protected] :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110)
Inverse inc. (www.inverse.ca) :: Leaders behind SOGo (www.sogo.nu) and 
PacketFence (www.packetfence.org)

On May 13, 2015 at 12:45:57, Andy A ([email protected]) wrote:

I have found a solution regarding this issue.

Now, I need to ask how should I implement the solution.

In order to disable the Captive Portal popup on iOS I need to check the 
UserAgent of the incoming request (which is how Apple detects internet) for 
CaptivePortalNetworkSupport and rewrite the url to a success page with HTTP 200 
. The only problem is I don't know where would be the best place to put it and 
what url should I rewrite to. I think I need to add the following rule into one 
of the /usr/local/pf/conf/httpd.conf.d configuration files. I just don't know 
which one should I add it to and what should be the path to the success page 
(PATH_TO_SUCESS_PAGE )? Would placing the success page in 
/usr/local/pf/html/captive-portal/templates/ directory work? 

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^CaptiveNetworkSupport(.*)$ [NC]
RewriteRule ^(.*)$ /PATH_TO_SUCESS_PAGE [L,R=200]

Thanks.

From: [email protected]
To: [email protected]
Date: Wed, 13 May 2015 15:29:38 +0000
Subject: [PacketFence-users] iOS captive portal issue

I am having a strange issue with PF and iOS captive portal. Basically, on iOS, 
the auto detection pops up a captive portal popup (which is not a fully 
functional browser : no cookies, javascript disabled etc)

The PF registration process isn't working properly in this auto popup window. 
The user can get to the registration page and when the click 'Register By 
email'. Their details get added to the database and their network is enabled 
BUT, the user is not redirected to the 'release.html' page (with the timebar). 
The page just hangs after they have clicked the button.

The above works on IOS in a Safari browser though. Has anyone else had this 
issue? If so how did they solve it?


I am using PF 5.0.1 on CentOS 6.6 in inline mode.

Thanks.


------------------------------------------------------------------------------ 
One dashboard for servers and applications across Physical-Virtual-Cloud Widest 
out-of-the-box monitoring support with 50+ applications Performance metrics, 
stats and reports that give you Actionable Insights Deep dive visibility with 
transaction tracing using APM Insight. 
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________ PacketFence-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------  
One dashboard for servers and applications across Physical-Virtual-Cloud  
Widest out-of-the-box monitoring support with 50+ applications  
Performance metrics, stats and reports that give you Actionable Insights  
Deep dive visibility with transaction tracing using APM Insight.  
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
  
PacketFence-users mailing list  
[email protected]  
https://lists.sourceforge.net/lists/listinfo/packetfence-users  
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to