Log website visited per users



  • 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


  • Rebel Alliance Developer Netgate

    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.



  • Hello,

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

    Thanks

    Anthony Paillard



  • @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



  • Same here! I need to do the same!



  • @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



  • 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?



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



  • 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.



  • @Cry:

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

    You may also want to look at the lightsquid package.



  • 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.



  • 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!)


Locked