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. Hello, I was just searching the internet and located this website. I had to read the entire post usually it’s difficult to keep my attention that long but you definitely did it thank you for the information!

  2. I want to say this blog is kinda awesome. I always like to hear something new about this because I have the similar blog in my Country on this subject so this help´s me a lot. I did a search on the issue and found a good number of blogs but nothing like this.Thanks for writing so much in your blog.. Greets, Arsen

  3. I’ve been browsing on-line more than three hours as of late, but I by no means found any interesting article like yours. It’s lovely worth sufficient for me. In my view, if all web owners and bloggers made good content as you probably did, the web might be much more useful than ever before.

  4. Hey There. I found your blog using msn. This is a really well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I will certainly return.

  5. I want to express some thanks to the writer just for bailing me out of this condition. Because of researching throughout the search engines and finding opinions which were not productive, I believed my life was gone. Being alive without the presence of answers to the difficulties you’ve sorted out by means of your write-up is a crucial case, and the ones that could have in a wrong way damaged my entire career if I had not noticed your blog post. The talents and kindness in handling every part was tremendous. I don’t know what I would have done if I had not come across such a point like this. I can also now look ahead to my future. Thanks very much for your reliable and results-oriented guide. I won’t be reluctant to refer your blog post to anybody who would like care about this subject.

  6. I definitely wanted to type a word to be able to thank you for those fabulous instructions you are giving out here. My long internet research has now been paid with brilliant facts and techniques to exchange with my visitors. I ‘d suppose that many of us website visitors are undoubtedly fortunate to exist in a fantastic site with so many wonderful people with interesting solutions. I feel rather happy to have encountered the webpages and look forward to so many more thrilling minutes reading here. Thanks a lot once again for a lot of things.

  7. Not to be within the perceive most of the time, I tend to dont like posts about this subject increasingly more but since you write it in style conjointly your own approach, we have a tendency to gotta say really is truly one of those nice post to remember.

  8. I used to be very happy to seek out this internet-site.I needed to thanks for your time for this excellent read!! I positively having fun with each little little bit of it and I have you bookmarked to take a look at new stuff you blog post.

  9. Nice read, I just passed this onto a colleague who was doing some research on that. And he actually bought me lunch since I found it for him smile Therefore let me rephrase that: Thanks for lunch!

  10. Greetings! I know this is somewhat off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having problems finding one? Thanks a lot!

Leave a Reply