• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Pfsense 2.1 only one voucher database for all Multi instance Captive Portal

Scheduled Pinned Locked Moved Captive Portal
4 Posts 3 Posters 1.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    saleh
    last edited by Sep 26, 2013, 10:04 AM

    Hi,

    I have pfsense 2.1 install and enable "Captive Portal" in two interfaces, I need only one voucher database for the two interfaces. I mean the same voucher "EMb2stekUda3" work for Interface one and Interface two.

    Thanks

    Saleh

    1 Reply Last reply Reply Quote 0
    • E
      eri--
      last edited by Sep 27, 2013, 6:40 AM

      Just put the interfaces in the same CP instance.

      1 Reply Last reply Reply Quote 0
      • S
        saleh
        last edited by Sep 29, 2013, 7:17 AM

        Hi Ermal,

        Thanks for your reply. Is there any way to sync the voucher database between two instances.  Per Interface I have one AP connected to the Interface, via the multi CP instance, I need to know, how many users connected per AP.

        Best Regards,

        Saleh

        1 Reply Last reply Reply Quote 0
        • G
          Gertjan
          last edited by Oct 2, 2013, 10:27 PM

          "per AP" is "per Interface" is "per zone", right ?

          I used this code (in a Munin plugin) to count all users on all zones, I guess it will be easy to adapt it a little bit for your needs:

          #!/usr/local/bin/php -q
          	require_once("/etc/inc/util.inc");
          	require_once("/etc/inc/functions.inc");
          	require_once("/etc/inc/captiveportal.inc");
          
          	/* read in captive portal db */
          	/* determine number of logged in users */
          
          	$count_cpusers = 0;
          	/* Is portal activated ? */
          	if (is_array($config['captiveportal'])) {
          		/* For every zone, do */
          		foreach ($config['captiveportal'] as $cpkey => $cp) {
          			$cpzone = $cpkey;
          			/* zone selected -> count users and add */
          			$count_cpusers += count(captiveportal_read_db());
          			}
          		}
          	echo $count_cpusers;
          ?>
          

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received