Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
02-17-2011, 08:02 PM
|
#16
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
How would I add dating sites like Plentyoffish.com and eharmony to squidGuard? I notice those still are not blocked.
|
|
|
02-18-2011, 10:02 AM
|
#17
|
Member
Registered: Mar 2008
Posts: 155
Rep:
|
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.
|
|
|
02-18-2011, 11:53 AM
|
#18
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
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
|
|
|
02-18-2011, 03:03 PM
|
#19
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
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
|
|
|
02-18-2011, 03:20 PM
|
#20
|
Member
Registered: Mar 2008
Posts: 155
Rep:
|
It's "dest dating", but yes, that is the way to do it.
|
|
|
02-18-2011, 04:24 PM
|
#21
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
Quote:
Originally Posted by tsg
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
|
|
|
02-18-2011, 04:28 PM
|
#22
|
Member
Registered: Mar 2008
Posts: 155
Rep:
|
Sorry, my bad. "destination" apparently works, too. You can leave them both as "destination".
|
|
|
02-18-2011, 04:30 PM
|
#23
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
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
|
|
|
02-18-2011, 07:43 PM
|
#24
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
Worked!
Thanks again!
|
|
|
02-18-2011, 07:45 PM
|
#25
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
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?
|
|
|
02-20-2011, 06:25 PM
|
#26
|
Member
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73
Rep:
|
Almost.
Quote:
Originally Posted by rlestage
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.
|
|
|
02-21-2011, 11:26 AM
|
#27
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
Quote:
Originally Posted by gr8scot
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.
|
|
|
02-21-2011, 11:41 AM
|
#28
|
Member
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73
Rep:
|
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
... 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.
|
|
|
02-21-2011, 08:01 PM
|
#29
|
LQ Newbie
Registered: Jan 2011
Posts: 25
Original Poster
Rep:
|
Wonderful thank you, this all worked.
Smooth sailing ahead
|
|
|
02-22-2011, 01:22 PM
|
#30
|
Member
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73
Rep:
|
That was silly of me!
Quote:
Originally Posted by rlestage
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.
|
|
|
All times are GMT -5. The time now is 02:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|