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

    Log website visited per users

    Scheduled Pinned Locked Moved pfSense Packages
    12 Posts 9 Posters 43.9k 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.
    • A
      apaillard
      last edited by

      Hello all,

      I looking for a solution of captive portal dedicated to hotel.
      To fit legislation i need to keep trace of url visited per customers.

      I setup pfsense, with squi and lightsquid, sound nice but i couldn't find a way to log visited url by users.
      Actually it just show IP (i tried all option of lightsquid.

      Is there any way to goal ?

      Anthony Paillard

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Squid should log everything in /var/squid/log/access.log

        Even if there is no GUI component to view the access log, it is there.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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

          Hello,

          I checked, anyway it just log ip adress.
          I use local users at this moment (plan to use radius)

          Thanks

          Anthony Paillard

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

            @jimp:

            Squid should log everything in /var/squid/log/access.log

            Even if there is no GUI component to view the access log, it is there.

            how can i log to this file

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

              Same here! I need to do the same!

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

                @abd2002390:

                how can i log to this file

                That is the default log destination for squid. You can view contents realtime using the command:

                tail -f /var/squid/log/access.log

                HTH

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

                  same error here though, there were no logs on /var/squid/log/access.log .

                  LigthSquid diagnostic.
                  Error : report folder '/var/lightsquid/report' not contain any valid data! Please run lightparser.pl (and check 'report' folder content)
                  Please check config file !
                  Variable value
                  $tplpatph /usr/local/www/lightsquid/tpl
                  $templatename base
                  $langpatph /usr/local/share/lightsquid/lang
                  $langname eng
                  $reportpath /var/lightsquid/report
                  Access to '/var/lightsquid/report' folder yes

                  I need to log all visited websites per user.
                  can anybody lend their help?

                  1 Reply Last reply Reply Quote 0
                  • Cry HavokC
                    Cry Havok
                    last edited by

                    Visit the Squid configuration tab and ensure you've enabled logging.

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

                      Hello, sorry for my bad English. ???
                      I too seeks to record the sites visited by each user with the captive portal and squid.
                      Have you a solution?

                      Thank you.

                      1 Reply Last reply Reply Quote 0
                      • Cry HavokC
                        Cry Havok
                        last edited by

                        @Cry:

                        Visit the Squid configuration tab and ensure you've enabled logging.

                        You may also want to look at the lightsquid package.

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

                          Hi there, sorry for my delayed reply, I already figured out what my problem was.

                          To PetitOursonDeLu, You can try this link ( http://diskatel.narod.ru/sgquick.htm )
                          mate and do everything as posted. Hope this helps.

                          I solve mine using the guide posted on this link.

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

                            I think apaillard wants more than squid access.log. He wants go get a log file with Login name of the captive portal, hour of connexion, mac adress + Ip and all visited URLS… right now, this is not possible easily from Pfsense.

                            You have to enable a classic syslog to log all systems events (DHCP, Captive portal, MACs etc...) to a remote system AND you have to store & rotate the Access.log from squid. The best way to rotate it is by using the GUI in pfsense, there is a checkbox to rotate, and a value to enter (365 for a year). Then, Pfsense will rotate your logs in the Pfsense's filesystem. What you have to do next, is transfering this file, access.log (in fact access.0.log, because access.log is always in use) to your remote server, either by using FTP or SCP ; script this in a file, then use CRON (it's available in Pfsense's package, as well as a GUI for CRON) to run your FTP/SCP script every day or every week, depending on how you rotate.

                            By the way, you have to enable a special command in squid to get proper timestamp in your access.log, but by doing this, lightsquid wont work anymore.

                            Then, on one serveur you have system logs on syslog + squid logs on a ftp folder ; you now just have to look for a match between your 2 files, for a precise day ; then you will see what IP has been given at what time, and by looking in the access.log file, you will see what sites this ip has visited....

                            I don't see how you can do better than that! (but if someone do, let's explain dude!)

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