OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • [SOLVED] Squid (web proxy) reporting
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Squid (web proxy) reporting  (Read 982 times)

rasitha

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
[SOLVED] Squid (web proxy) reporting
« on: June 17, 2024, 07:59:28 pm »
Is there any reporting tool for squid webproxy? (Like in pfsense's light squid package)
« Last Edit: June 21, 2024, 07:30:22 am by rasitha »
Logged

rasitha

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: [SOLVED] Squid (web proxy) reporting
« Reply #1 on: June 21, 2024, 07:53:43 am »
i figured it .... instructions bellow

pkg install sarg

edit sarg.conf file at this location
/usr/local/etc/sarg/sarg.conf

un-comment following lines for ur needs

access_log /var/log/squid/access.log (path to ur squid accress.log)
output_dir /var/www/html/squid-reports
date_format e (Date format in reports: e (European=dd/mm/yy), u (American=mm/dd/yy), w (Weekly=yy.ww))
overwrite_report (yes/no)

save the file

to generate the report run sarg -x on the command line

to view the report u need to install nginx on opnsense
go to services>nginx>configuration

in http(s) tab> location> add
add a description
URL Pattern = /test
Match Type = caseinsensitivemach
File System Root = /var/www/html/squid-reports
Index File = index.html

save

in http(s)tab>http server ( make sure to click advanced mode)

HTTP Listen Address = 8888 (port number-the port i use )
Default Server = tick
Server Name = fqdn of ur opnsense server or the ip
File System Root = /var/www/html/squid-reports
Locations = the name u add in the above step

save

Generel tab

Enable nginx = tick

how to access
 http://ur opnsense ip or fqdn:8888(the port u give)

 
to run on a specific time ( i run on every day at 23.59)

edit
nano /etc/crontab

add this line to the borrom
59 23 * * * root sarg -x
« Last Edit: June 21, 2024, 07:57:57 am by rasitha »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • [SOLVED] Squid (web proxy) reporting
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2