TOS and confirmation checkbox only
-
This is possible.
Define in the user Manager a "User" and a "password" : do exactly what is done here: https://www.youtube.com/watch?v=O9D2fM883Fc
But: You have to make your own login page (use the default one as a model). Hide in this form your user and its password.
Just show some text and a "Ok" button.More has been said, for example, here : https://forum.pfsense.org/index.php?topic=68938.0 (the subject is rather known ;))
-
Got it working.
Thanks to all.
-
lt1360hp,
Could you please provide a sample code ? Still struggling with this….
Kind regards
thafener
-
Not sure of the forum correct way to insert code, but here goes:
<title>Lucky Star Pfsense captive portal page Rev A</title> <form method="post" action="\$PORTAL_ACTION\$"> <center> | <center> | <center> <center> | <center>  **<big>Welcome to Lucky Star's Wifi Access Portal</big>** Stay Connected while Enjoying Your Beverage at Lucky Star's Complimentary Wi-Fi. Lucky Star Offers free unlimited Wi-fi access with no access codes requirements. Terms of Service and Acceptable Use BY CLICKING ON "AGREE" ON THIS SIGN-UP PAGE, YOU REPRESENT THAT YOU HAVE READ, UNDERSTAND AND AGREE TO THESE TERMS OF SERVICE. Access to the Service Wi-Fi Service at Lucky Star's is a complimentary Service for patrons and is completely at the discretion of Lucky Star Management. Service is provided for customers who are actively enjoying their food or beverage purchase. You, as a user of the Service, are responsible for monitoring connectivity and saving all data and communication regularly. By your use of the Service, you acknowledge (i) that you have made a purchase; (ii) that the Service may not be uninterrupted or error-free; (iii) that viruses or other harmful applications may travel through the Service; (iv) that Lucky Star does not guarantee the security of the Service and that unauthorized third parties may access your computer or files or otherwise monitor your connection; (v) that the Service is provided “as is” and on an “as available” basis, without warranties of any kind, whatsoever; and (vi) that you assume all risk associated with your activities conducted online through the Service and assume all liability and damages incurred by yourself, Lucky Star, or a third party that arise or result from your activities conducted online through the Service, whether known or unknown at the time of use. Access to the Service may be denied, blocked, suspended, or terminated by Lucky Star at any time for any reason including, but not limited to, violation of these Terms of Service, actions that may lead to liability for Lucky Star, disruption of access to other patrons or networks, and violation of applicable local, state, and, or federal laws or regulations. Use of the Service shall not be construed as creating a relationship of any kind between Lucky Star and any user of the Service. These Terms of Service shall be governed, interpreted and construed according to the laws of the state of Ohio. Acceptable Use of the Service Activities conducted online through the Service shall not violate any applicable law or regulation or the rights of Lucky Star, or any third party. Lucky Star 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: Spamming and Invasion of Privacy Intellectual Property Right Violations Obscene or Indecent Speech or Materials Defamatory or Abusive Language Forging of Headers Hacking, Scans, or Other Subversive Information Gathering Activity Distribution of Internet Viruses, Trojan Horses, or Other Destructive Activities Export Control Violations Harassing, Abusive, Criminal or Fraudulent activities Facilitating a Violation of this Agreement of Use Resale of the Service | | | | | | | </center> | | | | | </center> </center> | </center> | </center> </form>
Please note that the username and password are generic in this. Change the user name to whatever you have for captive portal in the user manager. Change the password to match the password for this user.
There is an image referenced early in the code "captiveportal-wp16a6f1fc_06.png". This can be any basic image.
It is actually the header image from here: luckystarbrewery.com which is still actually a work in progress, but pretty close.
the only thing that is still a bit wonky is that unless I specifically forward the client to a web page, after authenticating it redirects back to this authentication page…it is in a loop even though the description says:
"If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried to access after they've authenticated.
I think where the issue is that some devices, particularly mobile devices like iPhones will automagically "Auto-Join" this network running essentially a mini browser session. Since they were not really directed to another specific site, they may just reload the authentication page. I am just working around this a bit by directing them to either a search engine or most likely the establishments web page.
If anyone has a suggestion how to work around this strangeness, I would like to try. Basically I need to send a command to open a true web browser session on the device. Everything is a compromise as that assumes that the client wanted to browse the web and not just check email, Facebook App, etc. Maybe just close the mini-browser would be best.
This is a pretty basic design, but I think it will get the job done for me for phase one. Lots of legalese but in a way that was the point. I have it running on my home system and it works pretty well. I will roll it out to the business tomorrow.
Dave
-
Hi !
Just a wild guess ;)
Insert this in your code: -
Thank you very much lt1360hp, that hepled me a lot
-
Dunno who posted this, just reposting since I cannot find the post… Feel free to claim your credits. 3-in-1 click-through, username+password and vouchers:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <title>Wireless Login</title>  [ToS](/) [Normal](/) [Voucher](/) [Accept-Only](/) Totally Legal ToS | By using this network, you agree to give me your firstborn, $50 per login attempt, and at least two prized cattle. Additionally for each 7 or 200 Mb of data (chosen at random each minute) transferred, a modest fee will be charged to your credit card to fund my Monster Zero Ultra habbit. | <form id="f2" style="display: none;" method="post" action="$PORTAL_ACTION$"> Username: | | Password: | | | </form> <form id="f3" style="display: none;" method="post" action="$PORTAL_ACTION$"> Voucher: | | | </form> <form id="f4" style="display: none;" method="post" action="$PORTAL_ACTION$"> Long winded ToS | | | </form>
-
By using this network, you agree to give me your firstborn, $50 per login attempt, and at least two prized cattle.
Additionally for each 7 or 200 Mb of data (chosen at random each minute) transferred, a modest fee will be charged to your credit card to fund my Monster Zero Ultra habbit.I've seen that one before ;)
Good TOS ! -
Dunno who posted this, just reposting since I cannot find the post… Feel free to claim your credits. 3-in-1 click-through, username+password and vouchers:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <title>Wireless Login</title>  [ToS](/) [Normal](/) [Voucher](/) [Accept-Only](/) Totally Legal ToS | By using this network, you agree to give me your firstborn, $50 per login attempt, and at least two prized cattle. Additionally for each 7 or 200 Mb of data (chosen at random each minute) transferred, a modest fee will be charged to your credit card to fund my Monster Zero Ultra habbit. | <form id="f2" style="display: none;" method="post" action="$PORTAL_ACTION$"> Username: | | Password: | | | </form> <form id="f3" style="display: none;" method="post" action="$PORTAL_ACTION$"> Voucher: | | | </form> <form id="f4" style="display: none;" method="post" action="$PORTAL_ACTION$"> Long winded ToS | | | </form>
That'd be me :)
If you're only going to be using the TOS+Accept button, I can remove all the extra tabs and javascript for switching if you'd like so it's just the one. -
Dunno who posted this, just reposting since I cannot find the post… Feel free to claim your credits.
That'd be me :)
Thanks. 8) ;D
Search engine tags: captive portal multiple authentication methods page template all-in-one
-
You don't have to use a username and password. Just set the portal to "No authentication" and have the login button on the portal page.
You will have to modify index.php for the agree to terms checkbox logic. It might be easier (and not require a custom index.php) to just have them agree to the terms by pressing the login button.
You might also be able to do it using javascript in the custom portal page html (such as making the login button inoperative until the checkbox is checked.) That would also allow you to leave the index.php stock.
-
Just keep in mind that CNA might not support 'javascript'.