Install and Configure SARG for Dansguardian on CentOS

Install Apache

  • yum install httpd – install Apache if not already installed

Add ports to firewall

  • You may need to add a firewall rule to allow port 80
  • vi /etc/sysconfig/iptables – add the following lines, if they don’t already exist
  • -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

Install SARG

  • add an additional Allow from line for each computer you want to be able to see the reports, or comment out the Deny from all, and Allow from lines to give access to all.

Configure DansGuardian and SARG to work with each other

  • vi /etc/dansguardian/dansguardian.conf
  • change the setting logfileformat to equal 3 – sets DansGuardian to log in squid log file format
  • :wq – save the changes to the file and quit
  • vi /etc/sarg/sarg.conf
  • change the setting access_log to point to your dansguardian logs. Under default settings, it should be /var/log/dansguardian/access.log
  • change any other settings you want to change
  • :wq – save the changes to the file and quit
  • Check the sarg scripts in the cron folders. You will need to make some changes to point to the DansGuardian log files
  • vi /etc/cron.daily/sarg – really no changes here
  • vi /etc/cron.weekly/sarg – change the log file paths to the path of your DansGuardian log files
  • vi /etc/cron.monthly/sarg – change the log file paths to the path of your DansGuardian log files
  • /usr/bin/sarg – run sarg to create a ONE-SHOT report

Start Apache

  • /etc/init.d/httpd start – Start Apache

Test Configuration

  • browse to your DansGuardian machine using your favorite internet browser. You will have to add /sarg to the end of the url. (ex. http://192.168.0.1/sarg Check to make sure the ONE-SHOT report was generated.
  • wait for the cron jobs to run and generate the rest of the reports
Done

32 Replies to “Install and Configure SARG for Dansguardian on CentOS”

  1. I was recommended this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty. You’re wonderful! Thanks!

  2. I was recommended this website by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my trouble. You are amazing! Thanks!

  3. An impressive share, I just given this onto a colleague who was doing a little evaluation on this. And he the truth is purchased me breakfast because I found it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love studying extra on this topic. If potential, as you turn into experience, would you mind updating your blog with more particulars? It is extremely useful for me. Large thumb up for this blog publish!

  4. Thanks for all of the hard work on this web page. My mom enjoys going through research and it is easy to understand why. Many of us notice all about the dynamic means you present very helpful steps through your blog and in addition recommend participation from other people about this issue then my daughter is truly understanding a great deal. Take pleasure in the rest of the new year. You are always performing a fabulous job.

  5. Hi, Neat post. There’s a problem with your website in internet explorer, would test this… IE still is the market leader and a good portion of people will miss your great writing due to this problem.

  6. With every little thing which appears to be building throughout this particular subject matter, your viewpoints happen to be somewhat radical. Having said that, I appologize, because I can not give credence to your entire strategy, all be it refreshing none the less. It would seem to everybody that your opinions are actually not completely justified and in fact you are your self not really thoroughly confident of the point. In any case I did appreciate reading through it.

  7. I’ve been exploring for a little bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this info So i am happy to convey that I’ve a very good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to do not forget this site and give it a glance regularly.

  8. Pingback: microlending

Leave a Reply