Navigation

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

    CP Status does not show usernames

    Captive Portal
    4
    36
    13126
    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.
    • A
      alexus last edited by

      CP status page does not seams to show userames in the list of loged in users (only IP and MAC are shown)
      Is there any reason for that ot its just not portered page? (mono used to show this for long time alredy)

      Also Radius accounting has bug: pfSends 2 identical accounting packets which shows as 2 users are loded in and loged out …. as result if radius server cheks for simitaneusl login then the user will be bloked ... also the traffic usage is twise as higher in log, comparing to real situation

      1 Reply Last reply Reply Quote 0
      • A
        alexus last edited by

        Ok the username thingie I fixed (brought back) for my image, but it need to be a bit more work because some one used level 4 as temp variable grrrrr

        as to the redundant accounting and no traffic usage info, I can fix thise too i think if some one would ask me for it

        1 Reply Last reply Reply Quote 0
        • H
          hoba last edited by

          Have a look at http://wiki.pfsense.com/wikka.php?wakka=SubmittingPatches if you want to send in patches. Regarding the accounting issue can you verify that it's not happening in m0n0 first? If the bug is there as well please send your fixes there as too. Thanks.

          1 Reply Last reply Reply Quote 0
          • A
            alexus last edited by

            tope mono is clean, I moving to pf because of 2 functions: fail over and load baalncing…. everything else in mono is perfect including radius (actually I would say mono now is way stronger in terms of CP, i have no idea what pahhening here but CP is really barely leaving) also CVS is out of date (hmmm how?) the version on CVS for CP is 1.2 where in 1.0.1 relasee the CP is marked as 1.7 whats up?

            EDIT: as to that rule for submiting packages, i dint understand the forts part of the doc with diff - something...  could u explain what that do and how it works? Well im running from Win so i dont use much fetch

            1 Reply Last reply Reply Quote 0
            • S
              sullrich last edited by

              @alexus:

              tope mono is clean, I moving to pf because of 2 functions: fail over and load baalncing…. everything else in mono is perfect including radius (actually I would say mono now is way stronger in terms of CP, i have no idea what pahhening here but CP is really barely leaving) also CVS is out of date (hmmm how?) the version on CVS for CP is 1.2 where in 1.0.1 relasee the CP is marked as 1.7 whats up?

              EDIT: as to that rule for submiting packages, i dint understand the forts part of the doc with diff - something...  could u explain what that do and how it works? Well im running from Win so i dont use much fetch

              Please show an example of how the versions are different?  Our version ID's will be different from m0n0.

              1 Reply Last reply Reply Quote 0
              • A
                alexus last edited by

                im exactly talking about your versions….
                let me get to other PC and copy the begining of the files

                EDIT:
                Ok here is the one from 101 release:

                /* $Id: status_captiveportal.php,v 1.7.2.4 2006/04/03 21:05:12 sullrich Exp $ /
                /

                status_captiveportal.php
                part of m0n0wall (http://m0n0.ch/wall)

                here is begining of the file from CVS:

                /* $Id: status_captiveportal.php,v 1.21 2006/12/08 21:49:18 dsh Exp $ /
                /

                    status_captiveportal.php
                    part of m0n0wall (http://m0n0.ch/wall)
                   
                    Copyright (C) 2003-2004 Manuel Kasper mk@neon1.net.
                    All rights reserved./mk@neon1.net

                As I can see the CVS file does suppurt username display, but the version shown is old.

                1 Reply Last reply Reply Quote 0
                • S
                  sullrich last edited by

                  Make sure you are looking at the correct branch!  By default CVS HEAD has a different CVS version that what is in RELENG_1.

                  1 Reply Last reply Reply Quote 0
                  • A
                    alexus last edited by

                    hmm, so where would i look for the latest no bug version? and release version?

                    1 Reply Last reply Reply Quote 0
                    • S
                      sullrich last edited by

                      RELENG_1 is the 1.0 release branch..  Which is what we are using for 1.0.*

                      1 Reply Last reply Reply Quote 0
                      • A
                        alexus last edited by

                        ok where do i find it

                        • who edited CP page? it doesnt look like original Jonthan's code…
                          I see it uses regular DB file + bandwith control is now what mono has its something diferent
                        1 Reply Last reply Reply Quote 0
                        • S
                          sullrich last edited by

                          @alexus:

                          ok where do i find it

                          • who edited CP page? it doesnt look like original Jonthan's code…
                            I see it uses regular DB file + bandwith control is now what mono has its something diferent

                          CVSWEB has everything you just asked for.

                          http://pfsense.com/cgi-bin/cvsweb.cgi/

                          Linked from pfsense.com

                          1 Reply Last reply Reply Quote 0
                          • A
                            alexus last edited by

                            well ok any way
                            I just run the CP in debug mode for accounting and it does confirm that accounting pakets are being send twise haveing identical data…  the problem is that i looked at th e cript many times alredy and cant find duplicte calls ... maybe the author of modification can take a look? since afterall i dont know full alghorithm and im alredy fustrated

                            1 Reply Last reply Reply Quote 0
                            • S
                              sullrich last edited by

                              @alexus:

                              well ok any way
                              I just run the CP in debug mode for accounting and it does confirm that accounting pakets are being send twise haveing identical data…  the problem is that i looked at th e cript many times alredy and cant find duplicte calls ... maybe the author of modification can take a look? since afterall i dont know full alghorithm and im alredy fustrated

                              I've already looked at it and have no idea why its happening.  If I knew, I would have fixed it.

                              1 Reply Last reply Reply Quote 0
                              • A
                                alexus last edited by

                                lol

                                1 Reply Last reply Reply Quote 0
                                • A
                                  alexus last edited by

                                  ok im gonna do dirty debuging on my release image, but then some one will have to give me original 1.0.1 CP files,, because i know .. after my debuging even if i find the proble the files will be coruped by hundreds of comments and debug switches

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sullrich last edited by

                                    @alexus:

                                    ok im gonna do dirty debuging on my release image, but then some one will have to give me original 1.0.1 CP files,, because i know .. after my debuging even if i find the proble the files will be coruped by hundreds of comments and debug switches

                                    Back up the files prior with tar.

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      alexus last edited by

                                      its kinda too late alredy, I forgot on what parts i alredy enabled the debug mode :-(

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        sullrich last edited by

                                        Well download the most recent snapshot and save it.  It is 1.0.1 up until today.

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          alexus last edited by

                                          like i have any idea where the snupshots are?

                                          http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense/usr/local/captiveportal/index.php?rev=1.37

                                          is that a curent file?

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            sullrich last edited by

                                            @alexus:

                                            like i have any idea where the snupshots are?

                                            http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense/usr/local/captiveportal/index.php?rev=1.37

                                            is that a curent file?

                                            http://snapshots.pfsense.com/FreeBSD6/RELENG_1/

                                            1 Reply Last reply Reply Quote 0
                                            • A
                                              alexus last edited by

                                              but those are disk images….
                                              im doing development straight from WRAP so got not much ability for mounting and remounting... i just will need the clean file to put back in when I find the bug (  actually if i find it :-(

                                              1 Reply Last reply Reply Quote 0
                                              • S
                                                sullrich last edited by

                                                You comment so quickly before checking something out.

                                                These are upgrade files which are simply a tar backup!

                                                1 Reply Last reply Reply Quote 0
                                                • A
                                                  alexus last edited by

                                                  yes i talk non stop :-P
                                                  thats why I have 1 PC jut for forums and AIM etc :-P

                                                  well the .img. confused me then

                                                  1 Reply Last reply Reply Quote 0
                                                  • S
                                                    sullrich last edited by

                                                    Slow down, buddy.  You also need to enable a spell checker.

                                                    http://snapshots.pfsense.com/FreeBSD6/RELENG_1/updates/pfSense-Full-Update-1.0.1-SNAPSHOT-12-28-2006.tgz

                                                    1 Reply Last reply Reply Quote 0
                                                    • A
                                                      alexus last edited by

                                                      ok thanks for the file link ;-)

                                                      spell cheker slows me down yes, but i dont like it

                                                      1 Reply Last reply Reply Quote 0
                                                      • S
                                                        sullrich last edited by

                                                        @alexus:

                                                        ok thanks for the file link ;-)

                                                        spell cheker slows me down yes, but i dont like it

                                                        Half the time your unintelligible due to the amount of spelling typos.

                                                        One minute more of your time will save a minute off everyone that reads this thread!

                                                        1 Reply Last reply Reply Quote 0
                                                        • A
                                                          alexus last edited by

                                                          ok i will write in Russian :-P
                                                          Now I’m having trouble with the drain in my house so have to stop at this point,
                                                          but so far i found that CP is not debugable :-( so maybe some one has any ideas how to debug it?

                                                          and also while reviewing the CP files i found tha accounting itself could be more specific.

                                                          Anyway as of now the only thing i know is that accounting script  is called twice, this could be doe either by direct call (highly unlikely) or via user access authorization function that brings up the accounting. The user access authorization function is called 3 times 1) for MAC pass through and 2 other times a would assume a) for new access b) returning user

                                                          That’s it,,,, i dono what to do next

                                                          1 Reply Last reply Reply Quote 0
                                                          • A
                                                            alexus last edited by

                                                            Ok, i got bored not knowing what users are loged in on CP (Not talking about Radius Acc)
                                                            So I did the fix so that we still can  see the loged in username!!!

                                                            See code below.

                                                            Also there is a probem with not writing traffic usege by users to the db file. That should be fixed somewhere but I dono where yet, and there is another problem with redundant radius accounting packets.

                                                            
                                                            /* $Id: status_captiveportal.php,v 1.7.2.4 2006/04/03 21:05:12 sullrich Exp $ */
                                                            /*
                                                            	status_captiveportal.php
                                                            	part of m0n0wall (http://m0n0.ch/wall)
                                                            
                                                            	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
                                                            	All rights reserved.
                                                            
                                                            	Redistribution and use in source and binary forms, with or without
                                                            	modification, are permitted provided that the following conditions are met:
                                                            
                                                            	1\. Redistributions of source code must retain the above copyright notice,
                                                            	   this list of conditions and the following disclaimer.
                                                            
                                                            	2\. Redistributions in binary form must reproduce the above copyright
                                                            	   notice, this list of conditions and the following disclaimer in the
                                                            	   documentation and/or other materials provided with the distribution.
                                                            
                                                            	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
                                                            	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
                                                            	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
                                                            	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
                                                            	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                                                            	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                                                            	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                                                            	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                                                            	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                                                            	POSSIBILITY OF SUCH DAMAGE.
                                                            */
                                                            
                                                            require("guiconfig.inc");
                                                            
                                                            $concurrent = `cat /var/db/captiveportal.db | wc -l`;
                                                            
                                                            $pgtitle = "Status: Captive portal ({$concurrent})";
                                                            
                                                            include("head.inc");
                                                            
                                                            ?>
                                                            
                                                            if ($_GET['act'] == "del") {
                                                            	captiveportal_disconnect_client($_GET['id']);
                                                            }
                                                            
                                                            flush();
                                                            
                                                            function clientcmp($a, $b) {
                                                            	global $order;
                                                            	return strcmp($a[$order], $b[$order]);
                                                            }
                                                            
                                                            $cpdb = array();
                                                            captiveportal_lock();
                                                            $fp = @fopen("{$g['vardb_path']}/captiveportal.db","r");
                                                            
                                                            if ($fp) {
                                                            	while (!feof($fp)) {
                                                            		$line = trim(fgets($fp));
                                                            		if ($line) {
                                                            			$cpent = explode(",", $line);
                                                            			//Alexus: lets cout last element of new array cpnetp[] and use it for last activity
                                                            			if ($_GET['showact'])
                                                                                                  //Alexus: Created additional array entry as a buffer to free 4
                                                            			$cpent[11]=captiveportal_get_last_activity($cpent[1]);
                                                            			$cpdb[] = $cpent;
                                                                                                  }
                                                            		}
                                                            	}
                                                            
                                                            	fclose($fp);
                                                            
                                                            	if ($_GET['order']) {
                                                            		if ($_GET['order'] == "ip")
                                                            			$order = 2;
                                                            		else if ($_GET['order'] == "mac")
                                                            			$order = 3;
                                                            		else if ($_GET['order'] == "lastact")
                                                            			$order = 4;
                                                            		else
                                                            			$order = 0;
                                                            		usort($cpdb, "clientcmp");
                                                            	}
                                                            }
                                                            captiveportal_unlock();
                                                            ?>
                                                            
                                                            | Username | [IP address](?order=ip&showact=<?=$_GET['showact'];?>) | [MAC address](?order=mac&showact=<?=$_GET['showact'];?>) |	 [Session start](?order=start&showact=<?=$_GET['showact'];?>) | [Last activity](?order=lastact&showact=<?=$_GET['showact'];?>) |	 [Session start](?order=start&showact=<?=$_GET['showact'];?>) |	  |
                                                            |  |  |   |  |	  |		 
                                                            	[![](./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif)](?order=<?=$_GET['order'];?>&showact=<?=$_GET['showact'];?>&act=del&id=<?=$cpent[1];?>) |</mk@neon1.net> 
                                                            

                                                            PS: I think something wrong w/ closing if (copy and paste error) … the forum not allowing me to attach php file

                                                            1 Reply Last reply Reply Quote 0
                                                            • S
                                                              sullrich last edited by

                                                              Please provide a unified diff.

                                                              http://wiki.pfsense.com/wikka.php?wakka=SubmittingPatches

                                                              1 Reply Last reply Reply Quote 0
                                                              • A
                                                                alexus last edited by

                                                                did I eve say I'm lazy?

                                                                1 Reply Last reply Reply Quote 0
                                                                • S
                                                                  sullrich last edited by

                                                                  Fine, then your code will sit in this forum to no attention.

                                                                  Seriously, if you are this lazy please dont bother submitting anything in the future.

                                                                  Thanks.

                                                                  1 Reply Last reply Reply Quote 0
                                                                  • A
                                                                    alexus last edited by

                                                                    ok
                                                                    if u wanna me to do that thing I wanna know what exactly going to happen?

                                                                    fetch -o /usr/bin/diff http://www.pfsense.com/~sullrich/extra/diff∞                  <<what this="" line="" does?<br="">fetch -o /usr/bin/patch http://www.pfsense.com/~sullrich/extra/patch∞          << what this line does?
                                                                    chmod a+rx /usr/bin/*                                                                          < <what this="" line="" does?<br="">Are there any files wtiten to the system?
                                                                    Does this thing sends the diference of all modifications on the system or just specific file? How do I specify the file?</what></what>

                                                                    1 Reply Last reply Reply Quote 0
                                                                    • S
                                                                      sullrich last edited by

                                                                      No offense, but I am growing tired of all your questions to only hear how lazy you are.  If you are serious about helping us then figure it out.

                                                                      1 Reply Last reply Reply Quote 0
                                                                      • A
                                                                        alexus last edited by

                                                                        grrr

                                                                        1 Reply Last reply Reply Quote 0
                                                                        • D
                                                                          DanielSHaischt last edited by

                                                                          RTFM  ;D

                                                                          http://www.freebsd.org/cgi/man.cgi?query=fetch&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html

                                                                          1 Reply Last reply Reply Quote 0
                                                                          • S
                                                                            sullrich last edited by

                                                                            @DanielSHaischt:

                                                                            RTFM  ;D

                                                                            http://www.freebsd.org/cgi/man.cgi?query=fetch&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html

                                                                            He is "too lazy" to read a manual.  He wants everyone to spoon feed him so he doesn't have to "lift a finger"

                                                                            :rolls eyes:

                                                                            1 Reply Last reply Reply Quote 0
                                                                            • First post
                                                                              Last post

                                                                            Products

                                                                            • Platform Overview
                                                                            • TNSR
                                                                            • pfSense
                                                                            • Appliances

                                                                            Services

                                                                            • Training
                                                                            • Professional Services

                                                                            Support

                                                                            • Subscription Plans
                                                                            • Contact Support
                                                                            • Product Lifecycle
                                                                            • Documentation

                                                                            News

                                                                            • Media Coverage
                                                                            • Press
                                                                            • Events

                                                                            Resources

                                                                            • Blog
                                                                            • FAQ
                                                                            • Find a Partner
                                                                            • Resource Library
                                                                            • Security Information

                                                                            Company

                                                                            • About Us
                                                                            • Careers
                                                                            • Partners
                                                                            • Contact Us
                                                                            • Legal
                                                                            Our Mission

                                                                            We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                                                                            Subscribe to our Newsletter

                                                                            Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                                                                            © 2021 Rubicon Communications, LLC | Privacy Policy