LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-17-2011, 08:02 PM   #16
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0

How would I add dating sites like Plentyoffish.com and eharmony to squidGuard? I notice those still are not blocked.
 
Old 02-18-2011, 10:02 AM   #17
tsg
Member
 
Registered: Mar 2008
Posts: 155

Rep: Reputation: 30
squidGuard -u updates the db files from the text files. If you look in your blacklists directories, you will have files name domains and domains.db, urls and urls.db. domains and urls are text files that you can edit and squidGuard -u creates the .db files that squidGuard uses.

To allow certain IP addresses to pass through, create a whitelist directory with domains and urls files like the blacklists directories and populate them with the addresses you want to let through. Put a destination in the config file:
Code:
dest whitelist {
    domainlist    whitelist/domains
    urls          whitelist/urls
}
and then modify the acl:
Code:
default {
    pass whitelist !porn all
    redirect http://www.globaltc.ca/images/AD.jpg
}
Adding other sites to be blocked is simply a matter of putting them in the domains file.

run squidGuard -u and restart squid.

Last edited by tsg; 02-18-2011 at 10:05 AM.
 
Old 02-18-2011, 11:53 AM   #18
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Adding other sites to be blocked is simply a matter of putting them in the domains file
Not sure how to do this?

Got the IP figured out, thank you
 
Old 02-18-2011, 03:03 PM   #19
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
I Guess what I'm trying to figure out is this.

I'd like to add Plentyoffish to the blocked sites, but then when I looked in the URL's under dating it was already in there. So To add dating in have to put this in as well.


destination dating {
domainlist dating/domains
urllist dating/urls
log stopped.log
}


Then at the bottom where I have


default {
pass !porn all
redirect http://www.globaltc.ca/AccessDenied.htm

I would have to add !dating as well correct?

then do squidGuard -u

and restart squid
 
Old 02-18-2011, 03:20 PM   #20
tsg
Member
 
Registered: Mar 2008
Posts: 155

Rep: Reputation: 30
It's "dest dating", but yes, that is the way to do it.
 
Old 02-18-2011, 04:24 PM   #21
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tsg View Post
It's "dest dating", but yes, that is the way to do it.

I have destination porn rather than dest porn and that works though... ?

Should I still put dating as dest instead of destination
 
Old 02-18-2011, 04:28 PM   #22
tsg
Member
 
Registered: Mar 2008
Posts: 155

Rep: Reputation: 30
Sorry, my bad. "destination" apparently works, too. You can leave them both as "destination".
 
Old 02-18-2011, 04:30 PM   #23
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Ok thanks, Good to know that they both work.

Once again though, because of downtime. I'll have test this after hours. Thanks again, I'll let you know how that goes
 
Old 02-18-2011, 07:43 PM   #24
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Worked!

Thanks again!
 
Old 02-18-2011, 07:45 PM   #25
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
One question...

Eharmony.com is blocked

How do I add eharmony.ca to the dating blocked domains? Can I just edit the domain in the Blacklist and add eharmony.com to it? then restart squid?
 
Old 02-20-2011, 06:25 PM   #26
gr8scot
Member
 
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73

Rep: Reputation: 16
Almost.

Quote:
Originally Posted by rlestage View Post
One question...

Eharmony.com is blocked

How do I add eharmony.ca to the dating blocked domains? Can I just edit the domain in the Blacklist and add eharmony.com to it? then restart squid?
You just left out one step though, that tsg gave you earlier:
Quote:
If you look in your blacklists directories, you will have files name domains and domains.db, urls and urls.db. domains and urls are text files that you can edit and squidGuard -u creates the .db files that squidGuard uses.
I vaguely recall that it's actually possible to run Squid Guard from just the text files. Or maybe that was in a previous version, and anyway, I think you'd have to start it with a different option, and then it doesn't run as fast. So forget I even said that, and just take the extra second to do squidGuard -u, and use the .db files after you add whatever to the text files. I don't remember all the details because after a couple of months of reading help on different forums like this one, and reading the Squid Guard documentation, I got Squid and the Guard both running stable, updating with updated blacklist files that I download weekly, automatically via crontab & Steve Ollie's nifty script.

If this is more than you need or want I'm sorry, I'm not trying to overwhelm you. The point is just that it's a solid program that can be extended at least as far as you'll ever need if not much more, and after a little time getting used to it and how it interacts with Linux, I think you'll find both pretty usable and helpful. Hang in there.
 
Old 02-21-2011, 11:26 AM   #27
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gr8scot View Post
You just left out one step though, that tsg gave you earlier:

I vaguely recall that it's actually possible to run Squid Guard from just the text files. Or maybe that was in a previous version, and anyway, I think you'd have to start it with a different option, and then it doesn't run as fast. So forget I even said that, and just take the extra second to do squidGuard -u, and use the .db files after you add whatever to the text files. I don't remember all the details because after a couple of months of reading help on different forums like this one, and reading the Squid Guard documentation, I got Squid and the Guard both running stable, updating with updated blacklist files that I download weekly, automatically via crontab & Steve Ollie's nifty script.

If this is more than you need or want I'm sorry, I'm not trying to overwhelm you. The point is just that it's a solid program that can be extended at least as far as you'll ever need if not much more, and after a little time getting used to it and how it interacts with Linux, I think you'll find both pretty usable and helpful. Hang in there.
This is where I'm a bit confused, because when I look in the Blacklists dir. I only see a Domains and a URLS. No duplicates (one being a txt file and the other a .db)

If I right click on those and edit them, it gives me a big list of all the blocked domains and URLS. That's where I figured I should just add eharmony.ca into that list, then run squidguard -u and restart squid again.
 
Old 02-21-2011, 11:41 AM   #28
gr8scot
Member
 
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73

Rep: Reputation: 16
Oops, try -c instead of -u, and include the path to squidGuard.conf -C all

Sorry rlestage, I was blindly c&p-ing somebody else's instructions without checking against my own squid installation. I just checked the script I use to update my blacklists and re-create .db files, and the command
Code:
squidguard -u
... is not in this script at all. I do
Code:
squidGuard -c /etc/squid/squidGuard.conf -C all
But since you said your squidGuard.conf is in a different folder, you should of course use the path to your own .conf file, not the path to mine :-)
Code:
squidGuard -c /usr/local/squidGuard/squidGuard.conf -C all
Note that the first "-c" is lower-case and the second "-C" is capital. Neither is a typo. Case matters.
 
Old 02-21-2011, 08:01 PM   #29
rlestage
LQ Newbie
 
Registered: Jan 2011
Posts: 25

Original Poster
Rep: Reputation: 0
Wonderful thank you, this all worked.

Smooth sailing ahead
 
Old 02-22-2011, 01:22 PM   #30
gr8scot
Member
 
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73

Rep: Reputation: 16
That was silly of me!

Quote:
Originally Posted by rlestage View Post
Wonderful thank you, this all worked.

Smooth sailing ahead
Glad to hear it!

Now, I need to clarify something I sort of misstated, or stated unclearly.
Quote:
Originally Posted by tsg
squidGuard -u updates the db files from the text files. If you look in your blacklists directories, you will have files name domains and domains.db, urls and urls.db. domains and urls are text files that you can edit and squidGuard -u creates the .db files that squidGuard uses.
Now that the .db files exist, the command squidGuard -u will indeed update them. You only have to use squidGuard -c to create the .db files when they don't exist. When updating new blacklists files, I find the easier way is to wipe out the old versions, and make brand new .db files from the brand new text files. But I should have noticed that -u is for update. Sorry for the brain fart.
 
  


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
X won't start - screen not configured properly dcroxton Ubuntu 15 08-08-2010 11:22 AM
is my swap configured properly? pellicle Linux - Newbie 5 08-05-2008 09:57 AM
NIC not configured properly mr-flibble Linux - Networking 4 03-28-2007 01:19 AM
no screens found but X configured properly??? Lbtg43 Linux - Newbie 3 10-11-2004 02:04 AM
ATI tv wonder ve not properly configured? jimMC Linux - Hardware 4 07-23-2004 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:05 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
Open Source Consulting | Domain Registration