LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2014, 06:55 AM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Rep: Reputation: 1
dansguardian not blocking sites on ubuntu


I have ubuntu 12.04 LTS

I have installed dansguardian on it using
Code:
# apt-get install dansguardian
It creates several files in the directory /etc/dansguardian

I have commented following line in the file /etc/dansguardian/dansguardian.conf
Code:
#UNCONFIGURED - Please remove this line after configuration
I have entered a sitename in the file /etc/dansguardian/bannedsitelist,After that I have restarted dansguardian.

But the site is not blcoked on my ubuntu, I can still access it.

What am I doing wrong, please suggest.

Thanks
 
Old 05-02-2014, 10:22 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Can you post the entire contents of your /etc/dansguardian/dansguardian.conf file.
jdk
 
Old 05-02-2014, 10:34 AM   #3
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
Thanks for your help. Here is my dansguardian config file.
Code:
# cat /etc/dansguardian/dansguardian.conf | grep -v -E '(^#|^$)'
reportinglevel = 3
languagedir = '/etc/dansguardian/languages'
language = 'ukenglish'
loglevel = 1
logexceptionhits = 2
logfileformat = 1
syslog = on
loglocation = '/var/log/dansguardian/access.log'
filterip = 127.0.0.1
filterport = 8080
proxyip = 127.0.0.1
proxyport = 3128
accessdeniedaddress = 'http;//127.0.0.1/cgi-bin/dansguardian.pl'
nonstandarddelimiter = on
usecustombannedimage = on
custombannedimagefile = '/usr/share/dansguardian/transparent1x1.gif'
filtergroups = 1
filtergroupslist = '/etc/dansguardian/lists/filtergroupslist'
bannediplist = '/etc/dansguardian/lists/bannediplist'
exceptioniplist = '/etc/dansguardian/lists/exceptioniplist'
showweightedfound = on
weightedphrasemode = 2
urlcachenumber = 1000
urlcacheage = 900
scancleancache = on
phrasefiltermode = 2
preservecase = 0
hexdecodecontent = off
forcequicksearch = off
reverseaddresslookups = off
reverseclientiplookups = off
logclienthostnames = off
createlistcachefiles = on
maxuploadsize = -1
maxcontentfiltersize = 256
maxcontentramcachescansize = 2000
maxcontentfilecachescansize = 20000
filecachedir = '/tmp'
deletedownloadedtempfiles = on
initialtrickledelay = 20
trickledelay = 10
downloadmanager = '/etc/dansguardian/downloadmanagers/fancy.conf'
downloadmanager = '/etc/dansguardian/downloadmanagers/default.conf'
contentscannertimeout = 60
contentscanexceptions = off
recheckreplacedurls = off
forwardedfor = off
usexforwardedfor = off
logconnectionhandlingerrors = on
logchildprocesshandling = off
maxchildren = 120
minchildren = 8
minsparechildren = 4
preforkchildren = 6
maxsparechildren = 32
maxagechildren = 500
maxips = 0
ipcfilename = '/tmp/.dguardianipc'
urlipcfilename = '/tmp/.dguardianurlipc'
ipipcfilename = '/tmp/.dguardianipipc'
nodaemon = off
nologger = off
logadblocks = off
loguseragent = off
softrestart = off
mailer = '/usr/sbin/sendmail -t'
 
Old 05-02-2014, 11:30 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
1. Have you looked at the log file for any errors?
2. Have you checked that the /etc/dansguardian/lists/bannediplist file has been set up correctly?
jdk
 
Old 05-03-2014, 01:54 AM   #5
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
Thanks again for your response.

/var/log/dansguardian/access.log is empty
/etc/dansguardian/lists/bannediplist is full of comments. There is no single line in the file which is uncommented.
 
Old 05-03-2014, 02:10 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by unclesamcrazy View Post
There is no single line in the file which is uncommented.
I suspect that this is your problem. If you have nothing in your bannediplist then there's no reason to expect anything to be banned, correct?

But this means I don't understand your earlier comment:
Quote:
I have entered a sitename in the file /etc/dansguardian/bannedsitelist,After that I have restarted dansguardian.
There is no reference to a bannedsitelist file in your configuration. I'd suggest you put the ip number of the site you want to ban in the bannediplist file and see if that does the job.
jdk
 
Old 05-03-2014, 02:22 AM   #7
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
I thought we should made an entry in file bannedsitelist to block the site that's why I added my site name there.

But I can access internet with no proxy too, I think it should not be like that if I am using dansguardian I have to use proxy settings.
isn't it correct?

How to force user to go on proxy and no proxy should not allow to access internet ?
 
Old 05-03-2014, 03:27 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by unclesamcrazy View Post
I thought we should made an entry in file bannedsitelist to block the site that's why I added my site name there.
But dansguardian uses the file bannediplist to do this (according to your configuration file). Why don't you use that file?
Quote:
But I can access internet with no proxy too, I think it should not be like that if I am using dansguardian I have to use proxy settings.
isn't it correct?

How to force user to go on proxy and no proxy should not allow to access internet ?
I'm afraid you've lost me. I don't see any connection between your dansguardian problem and what you write here.
Sorry,
jdk
 
Old 05-03-2014, 08:36 AM   #9
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
I have tried your solution and still I am facing same problem. I want to block http://get-site-ip.com.
It's site ip is 188.95.227.20
I have put this ip in bannediplist and restart dansguardian. But I can still open the site.

I have asked this question "How to force user to go on proxy and no proxy should not allow to access internet ?"
because I doubt that I am facing the problem because of this. I can still access internet using NO proxy, Is this the reason dansguardian is not working for me?

Thanks again.
 
Old 05-03-2014, 08:53 AM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
I would repeat the questions I asked in post #4. If the answers are the same then there is something clearly wrong in the configuration.
jdk
 
Old 05-03-2014, 09:50 AM   #11
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
Sorry I am irritating you.

There is still no content in the file in access.log

This is the content of file bannediplist
Quote:
# IP addresses of client machines to
# disallow web access to.
# Hostnames are also allowed here, provided you
# enable the reverseclientlookups option.
# This is not the IP of web servers
# you want to filter.
127.0.0.1
192.168.0.10
where 192.168.0.10 is my LAN IP.

Thanks again.
 
Old 05-03-2014, 11:23 AM   #12
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Those aren't the ip addresses you want to filter; those are the machines you want the ban to apply to. Maybe someone else knows this program better than I do. It makes no sense to me.
Sorry,
jdk
 
Old 05-04-2014, 01:00 AM   #13
MayJune0112
LQ Newbie
 
Registered: May 2014
Posts: 8

Rep: Reputation: Disabled
I use open DNS . Not foolproof nor that it really matter either but he has his tablet and everything these days plus he can pop in a live cd unless I lock my bios which I don't want to do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Squid+DansGuardian not working properly. squid blocking sites that should be linuxlover.chaitanya Linux - Server 13 11-10-2014 11:34 AM
dansguardian blocking .edu websites sohailkmu Linux - Server 5 05-02-2014 06:41 AM
Dansguardian - Allow sites containing Essex. TechnoBod Linux - Server 1 07-16-2010 03:34 PM
squid 2.6 not blocking sites even i entered ACL to block sites mohantorvalds Linux - Server 1 01-08-2009 05:17 AM
Sites Restricted using DansGuardian shipon_97 Linux - Security 5 04-27-2006 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration