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

    Captive portal ip2name component for lightsquid

    Scheduled Pinned Locked Moved pfSense Packages
    29 Posts 15 Posters 19.6k 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.
    • P
      PetitOursonDeLu
      last edited by

      Hello, thank you for your reply.
      I tried to install the p5-DateTime package with the command pkg_add or pkg_add -r but it does not work.
      There seems to be a lot of dependencies for this package. Can you use a "magical" command to manage these dependencies?
      I have never configured freeBSD is quite complicated for me. Can you give me the procedure?

      Thank you a lot

      Sorry for my bad English :o

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

        pass the full url to pkg_add fetching it from freebsd 7.0 repository or pfsense 1.2 repository

        1 Reply Last reply Reply Quote 0
        • M
          Meulator
          last edited by

          Can someone post a screenshot to see how it looks like?

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

            I tried to work it but not success like "PetitOursonDeLu".

            I install p5-DateTime with this command

            pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/p5-DateTime.tbz
            

            Suggestion  (```
            pkg_add -r p5-DateTime

            
            After that same error appears = Can't locate Date/Parse.pm .
            
            I search /usr/local/lib/perl5/site_perl folder listed 5.8.8 and 5.8.9\. in folder named 5.8.9 has "DateTime" folder. I moved this folder to 5.8.8\. But error continues.
            Then i add a "use DateTime;^M"  before "use Date::Parse;^M" in ip2name.portalauth.
            
            It looks fine but i get another error :
            

            /libexec/ld-elf.so.1: /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/Params/Validate/Validate.so: Undefined symbol "Perl_newXS_flags"

            
            It look like p5-DateTime packages doesn't installing right place.
            1 Reply Last reply Reply Quote 0
            • P
              PetitOursonDeLu
              last edited by

              Hello
              I would like to found out if anyone has found the solution to install p5-Datetime. And if anyone has it, can they please tell me.

              Thanks, bye

              1 Reply Last reply Reply Quote 0
              • P
                PetitOursonDeLu
                last edited by

                Hello,
                I update PFsense 1.2.2 to 1.2.3 and I install with success p5-dateTime with this command line: pkg_add -r p5-DateTime.
                But, I have evermore this message: Can't locate Date/Parse.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 . /usr/local/www/lightsquid/) at /usr/local/libexec/lightsquid/ip2name.portalauth line 2.
                BEGIN failed–compilation aborted at /usr/local/libexec/lightsquid/ip2name.portalauth line 2.
                Compilation failed in require at /usr/local/www/lightsquid/lightparser.pl line 39

                I slowly, but I still need your help.

                Thanks

                EDIT: the command line pkg_info return:
                bsdinstaller-2.0.2009.0108 BSD Installer mega-package
                db41-4.1.25_4      The Berkeley DB package, revision 4.1
                gd-2.0.35,1        A graphics library for fast creation of images
                grub-0.97_1        GRand Unified Bootloader
                jpeg-6b_4          IJG's jpeg compression utilities
                lightsquid-1.7.1_1  A light and fast web based squid proxy traffic analyser
                openldap-client-2.4.10 Open source LDAP client implementation
                openldap-client-2.4.11 Open source LDAP client implementation
                p5-Class-Factory-Util-1.7 Utility functions for (factory) classes
                p5-Class-Singleton-1.4 Perl module that describes a singular object class
                p5-DateTime-0.43.02 A date and time object
                p5-DateTime-Locale-0.40.01_2 Localization support for DateTime
                p5-DateTime-TimeZone-0.77.01 Time zone object base class and factory
                p5-GD-2.39          A perl5 interface to Gd Graphics Library version2
                p5-List-MoreUtils-0.22 Provide the stuff missing in List::Util
                p5-Params-Validate-0.89 Validate method/function parameters
                p5-Time-Local-1.18  Efficiently compute time from local and GMT time
                perl-5.8.8_1        Practical Extraction and Report Language
                squid-2.6.21        HTTP Caching Proxy
                squidGuard-1.3_1    A fast redirector for squid
                squid_radius_auth-1.10 RADIUS authenticator for squid proxy 2.5 and later

                1 Reply Last reply Reply Quote 0
                • P
                  PetitOursonDeLu
                  last edited by

                  UP  ???

                  1 Reply Last reply Reply Quote 0
                  • P
                    paulmr2
                    last edited by

                    If it is any help I managed to get this to work after a few days of trying, here’s how I done it:

                    1. Downloaded the TimeDate Perl module from http://search.cpan.org/~gbarr/TimeDate-1.16/

                    2. Copied the Date and Time folders from the download into /usr/local/lib/perl5/5.8.8

                    3. Followed the instructions on the thread

                    4. Corrected a typo in the ip2name.portalauth on the line

                    // Acquire the timestamp in unix format
                    

                    change to

                    # Acquire the timestamp in unix format
                    

                    This worked for me. I did try it on 1.2.3 but the portalauth.log file uses USER LOGIN instead of LOGIN and that was causing some problems with the script

                    HTH

                    1 Reply Last reply Reply Quote 0
                    • P
                      PetitOursonDeLu
                      last edited by

                      Yes! yes! yes! Thank you very much paulmr2, it's OK!

                      I love Pfsense :)

                      1 Reply Last reply Reply Quote 0
                      • F
                        Freak
                        last edited by

                        Hello,

                        At first of all thank you for this work!

                        I am new on pfSene!
                        I want to install this component on my system but for the moment I only have setup the captive portal on pfSense.

                        If I understand it right, before install the ip2name component I have to install and setup Squid in non-transparent mode (because transparent mode doesn't work with captive portal?) and than I have to install and setup the Lightsquid package?
                        Is it right?

                        Thank you! And sorry for my English I am french too.

                        1 Reply Last reply Reply Quote 0
                        • O
                          Offliner
                          last edited by

                          i used pf 1.2.3 squid(transparent mode) squid guard Captive Portal and Lightsquid and i want take a repor from the lightsquid ip2name captive portal login username but i cant make a report

                          how can i do it??

                          ps im sorry for my eng.

                          En güzel nota FA

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

                            Hi,

                            really, i didn't remember the right dependency to let this code to work: it needs Date::Parse library to works.

                            1 Reply Last reply Reply Quote 0
                            • P
                              PetitOursonDeLu
                              last edited by

                              Hi, sorry, I'm french but I have a solution for IP2name.
                              It's avaible here (it's my website): www.adrienbourget.com/wp-content/uploads/2010/05/ip2name.zip

                              By

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

                                Hello,

                                i found your solution of the portalauth for lightsquid… Thank you first for that, because the idee is very good!!!

                                But i have a problem, after rebooting pfsense all the traffic is related to the ip again... if i look in the report-folder of lightsquid the files with the usernames are already in...

                                i dont understand why lightsquid only shows the ip after rebooting and relates the traffic of the the user to the ip automatically...

                                Do you have a solution for that?

                                1 Reply Last reply Reply Quote 0
                                • P
                                  PetitOursonDeLu
                                  last edited by

                                  Hello,
                                  Sorry but I have no solution :(
                                  I'm no expert, just advanced user …
                                  Sorry, but if you find the solution, I would like to know.

                                  Thank you.
                                  Adrien

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

                                    @PetitOursonDeLu:

                                    Hello,
                                    Sorry but I have no solution :(
                                    I'm no expert, just advanced user …
                                    Sorry, but if you find the solution, I would like to know.

                                    Thank you.
                                    Adrien

                                    Ok, i will try… but i hoped you have a tip for me why this happens....

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      marcelofmatos
                                      last edited by

                                      Hi! Thanks for all in this topic! It's solved my problem :)

                                      I add a line to change text USER LOGIN or MACHINE LOGIN for LOGIN, to keep the format of the old log. I don't know much about perl and regular expressions, but it was enough to work for me

                                      The modified script is attached.
                                      Script tested on pfSense 1.2.3.

                                      Also I installed the package p5-TimeDate to resolve problem to use Date::Parse on script

                                      pkg_add -r p5-TimeDate
                                      

                                      ip2name.portalauth.txt

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        KingJulien
                                        last edited by

                                        Hi,

                                        is there any possiblity to change the script to log the vouchers instead the users?

                                        1 Reply Last reply Reply Quote 0
                                        • _
                                          _igor_
                                          last edited by

                                          Found that thread from 2009, but names in lightsquid still doesn't work today. Is there any plans to get this working? There are floating some hints around, but none of them works.

                                          1 Reply Last reply Reply Quote 0
                                          • N
                                            Nachtfalke
                                            last edited by

                                            Hi,

                                            for me it works with "IP" (resolves IP-addresses) and with "DNS" which resolves the FQDN like Host1.domain.
                                            Do not know, if this works with vouchers but I don't think so.

                                            I hope this is what your question is pointing to ?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.