From 80e60d7cd1e8f735d7655fd7f8d53fdafe2aca79 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 7 Dec 2007 19:42:36 +0000 Subject: [PATCH] Sometimes when the user enters the hostname of the HTTPs captive portal server it resolves the IP address to $LANIP. Allow access to $LANIP in addition to the $CPIP so that we can speedup captive portal by 10000* in these cases. --- etc/inc/captiveportal.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 6b0f9a1cc9..bd011910ac 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -356,16 +356,26 @@ add 1204 set 1 pass icmp from any to $cpip in icmptype 0 add 1300 set 1 pass udp from any to $cpip 53 in add 1301 set 1 pass udp from $cpip 53 to any out +# allow access to our DNS forwarder if it incorrectly resolves the hostname to $lanip +add 1300 set 1 pass udp from any to $lanip 53 in +add 1301 set 1 pass udp from $lanip 53 to any out + # allow access to our web server add 1302 set 1 pass tcp from any to $cpip 8000 in add 1303 set 1 pass tcp from $cpip 8000 to any out +# allow access to lan web server incase the dns name resolves incorrectly to $lanip +add 1302 set 1 pass tcp from any to $lanip 8000 in +add 1303 set 1 pass tcp from $lanip 8000 to any out + EOD; if (isset($config['captiveportal']['httpslogin'])) { $cprules .= <<