Example #2 – authentication with vouchers

Vouchers are useful in a number of scenarios where you need to provide users with temporary access to your network, but also want to have some form of authentication. With vouchers, you can limit their access (vouchers can be set up with a time limit, and there are a number of other ways you can control a user's access); you can also track their usage by keeping track of which voucher codes are given to users.

Setting up voucher authentication is only slightly different from setting up a captive portal with no authentication:

  1. As in the previous example, if you want to keep captive portal traffic completely separate from the rest of your network, you will have to add an interface.
  2. You must enable the DHCP server on the captive portal interface.
  3. Navigate to Services | Captive Portal, click on the Add button to add a new captive portal, enter a Zone name and Zone description, and click on the Save and Continue button.
  4. When the page reloads, check the Enable Captive Portal checkbox. Make sure the captive portal interface is selected in the Interfaces list box.
  5. Scroll down to the Authentication section and select Local User Manager/Vouchers.
  6. Scroll down to HTML Page Contents, and upload pages for Portal page contents, Auth error page contents, and Logout page contents. The auth error page and logout page need not be any different from the pages that would be used if you selected No Authentication. The portal page, however, must contain a field for inputting the voucher code. You might consider adding username and password fields as well, so you can use the same page for authentication via the local user manager. At a minimum, the following fields must exist in the portal login page for voucher authentication to work (note that the only field that has to be added to our no authentication portal page is the voucher input field):
    • <form method="post" action="$PORTAL_ACTION$">
    • <input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
    • <input name="zone" type="hidden" value="$PORTAL_ZONE$">
    • <input name = “auth_voucher” type=”text”>
    • An input tag with the type set to submit
  7. Scroll to the bottom of the page and click on the Save button.
  1. We have configured the captive portal to work with vouchers, but we still need to generate the voucher codes. To do this, on the main Captive Portal page, click on the Edit button for the captive portal you just created and, when the page loads, click on the Voucher tab.
  2. On the Voucher tab, click on the Add button.
  3. Enter the parameters for the voucher roll. Press the Save button when you are done.
    • In the Roll # edit box, enter an integer from 0 to 65,535 for the roll number.
    • In the Minutes per ticket edit box, enter the time in minutes that a user is allowed access.
    • The Count is the number of vouchers (from 1 to 1,023) that will be generated.
    • You may also enter a brief, non-parsed Comment in the final edit box.
  4. All that remains is to export the voucher roll. In the Voucher Rolls section of the Voucher tab, there is a column called Actions; under that column, there will be an Export icon (a sheet of paper with an X on it). Click on this icon to export the voucher file as a comma-separated values (CSV) file you can open with a spreadsheet application, such as LibreOffice Calc.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.130.13