pfSense Support Subscription

Author Topic: Captive Portal Login Problem  (Read 3056 times)

0 Members and 1 Guest are viewing this topic.

Offline mamaeggplant

  • Newbie
  • *
  • Posts: 5
    • View Profile
Captive Portal Login Problem
« on: June 19, 2012, 07:42:13 pm »
I just uploaded a custom captive portal page and now users cannot login. After they type username/password, the page simply refreshes with no internet access. I cannot type a url either (e.g. www.google.com). Here is the content of my portal page:

------------start----------------

<script type="text/javascript">
function apply()
{
  document.frmLogin.accept.disabled=true;
  if(document.frmLogin.chkTerms.checked==true)
  {
    document.frmLogin.accept.disabled=false;
  }
  if(document.frmLogin.chkTerms.checked==false)
  {
    document.frmLogin.accept.enabled=false;
  }
}
</script>

<!-- saved from url=(0108)http://192.168.1.1:8000/index.php?redirurl=http%3A%2F%2Fwww.google.com%2Fsearch%3Frlz%3D1C1ASUT_enUS482US482 -->

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body>

<form name="frmLogin" method="post" action="http://192.168.1.1:8000/">

<input name="redirurl" type="hidden" value="http://www.google.com/search?rlz=1C1ASUT_enUS482US482">

<center>

<table cellpadding="6" cellspacing="0" width="550" height="380" style="border:1px solid #000000">

<tbody><tr height="10" bgcolor="#990000">

<td style="border-bottom:1px solid #000000">

<font color="white">



**** Wireless Access



</font>

</td>

</tr>

<tr>

<td>

<div id="mainlevel">

<center>

<table width="100%" border="0" cellpadding="5" cellspacing="0">

<tbody><tr>

<td>

<center>

<div id="mainarea">

<center>

<table width="100%" border="0" cellpadding="5" cellspacing="5">

<tbody><tr>

<td>

<div id="maindivarea">

<center>

<div id="statusbox">

<font color="red" face="arial" size="+1">





</font>

</div>




<div id="loginbox">

<table>

<tbody><tr><td colspan="2"><center><font size="+1">***** Wireless Internet Access Login</font></center></td></tr>

<tr><td>&nbsp;</td></tr>

<tr><td colspan="2">Acceptable Use of the Service:</td></tr>

<tr><td colspan="2"><center>

<div style="border:1px solid #000000;height:120px;width:450px;font:10px/12px Georgia, Garamond, Serif;overflow-y:scroll;"align=left>

Activities conducted online through the Service shall not violate any applicable law or regulation or the rights of Downtown Lofts, or any third party. Downtown Lofts will fully cooperate with law enforcement upon receipt of notice that use of the Service is in violation of applicable law. If you are unsure whether your use of the Service and activities conducted online may violate these Terms of Service you are advised to cease the activity immediately. Examples of prohibited activities include, but are not limited to:


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Spamming and Invasion of Privacy


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Intellectual Property Right Violations


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Hacking, Scans, or other subversive Information Gathering Activity


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Distribution of Internet Viruses, Trojan Horses, or Other Destructive Activities


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Facilitating a Violation of this Agreement of Use


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp- Resale of the Service


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

</div></center>

</td></tr>

<tr><td colspan="2" align=left><input type="checkbox" name="chkTerms" onClick="apply()">I agree to the acceptable uses of the service</td></tr>

<tr><td colspan="1" align="right">Username:</td><td><input name="auth_user" type="text" style="border: 1px line;"></td></tr>

<tr><td colspan="1" align="right">Password:</td><td><input name="auth_pass" type="password" style="border: 1px line;"></td></tr>

<tr><td>&nbsp;</td></tr>

<tr>

<td colspan="2">

<center><input name="accept" type="submit" value="Continue" disabled></center>

</td>

</tr>

<tr>

<td colspan="2">

<center>Reset Your Password </center>

</td>

</tr>

</tbody></table>

</div>

</center>

</div>

</td>

</tr>

</tbody></table>

</center>

</div>

</center>

</td>

</tr>

</tbody></table>

</center>

</div>

</td>

</tr>

</tbody></table>

</center>

</form>



</body></html>

----------------------------------end--------------------
I would appreciate any input.
Thanks
 

Offline cmb

  • Administrator
  • Hero Member
  • *****
  • Posts: 6287
    • LinkedIn
    • Twitter
    • View Profile
    • Chris Buechler
Re: Captive Portal Login Problem
« Reply #1 on: June 19, 2012, 07:47:59 pm »
Code: [Select]
<input name="accept" type="submit" value="Continue" disabled>
your Continue button is disabled.

Offline mamaeggplant

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Captive Portal Login Problem
« Reply #2 on: June 19, 2012, 07:55:20 pm »
No, that is set to be disabled until they accept the agreement. The page works on my VM, but not when I upload to the firewall.

Offline cmb

  • Administrator
  • Hero Member
  • *****
  • Posts: 6287
    • LinkedIn
    • Twitter
    • View Profile
    • Chris Buechler
Re: Captive Portal Login Problem
« Reply #3 on: June 19, 2012, 08:01:15 pm »
Oh. Start with a very basic HTML page with simply the form as shown on the Services>Captive Portal page. Then move on to adding things bit by bit, keeping all the javascript out at first but having your page design as a whole. See where things stop working. There isn't anything captive portal-specific about it, it's just a matter of having a functional page that properly submits the form.

Offline mamaeggplant

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Captive Portal Login Problem
« Reply #4 on: June 19, 2012, 08:44:00 pm »
The captive portal runs on the OPT1 interface 192.168.2.0/24 and the firewall prevents most traffic between the 192.168.1.0 and 192.168.2.0 subnets.

Is it possible that this page needs 192.168.1.1 replaced with 192.168.2.1?

Offline mamaeggplant

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Captive Portal Login Problem
« Reply #5 on: June 19, 2012, 08:55:40 pm »
Yes, I believe that is the problem. Somehow, the wrong IP address got in there and the firewall was blocking the authentication request.

Offline cmb

  • Administrator
  • Hero Member
  • *****
  • Posts: 6287
    • LinkedIn
    • Twitter
    • View Profile
    • Chris Buechler
Re: Captive Portal Login Problem
« Reply #6 on: June 19, 2012, 09:00:00 pm »
You need to put the variable rather than the IP in there so it fills in the appropriate URL to use.

Offline maikc12335

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Captive Portal Login Problem
« Reply #7 on: June 23, 2012, 01:16:34 am »
friends I am new to the forum I have a problem with the authentication of my site I tell you exit the portal nowhere and I followed the tutorials and guides nothing helps this is my mail romeo12335@hotmail.com

Offline Gertjan

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Captive Portal Login Problem
« Reply #8 on: June 28, 2012, 09:02:06 am »
friends I am new to the forum I have a problem with the authentication of my site I tell you exit the portal nowhere and I followed the tutorials and guides nothing helps this is my mail blabla.

That an easy one.
The answer starts here : http://forum.pfsense.org/index.php/topic,50246.msg269884.html#msg269884 - last message.