Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Caching Server / Porn Filter Goto page Previous  1, 2, 3, 4  Next
View previous topic :: View next topic  
Author Message
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Tue Nov 09, 2010 7:43 am    Post subject: Reply with quote

and guess what? the /var/log/squid/cache folder is empty. ?????
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Tue Nov 09, 2010 7:45 am    Post subject: Reply with quote

Stopping squid ...
.. Done

Deleting old cache files ..
.. Done

Initializing the Squid cache with the command /usr/sbin/squid -f /etc/squid/squid.conf -z ..
2010/11/08 22:44:21| Creating Swap Directories
.. Done

but it still says it needs initalized. ??????
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Tue Nov 09, 2010 8:13 am    Post subject: Reply with quote

Edit /etc/squid/squid.conf
Code:
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/log/squid/cache 100 16 256

check for permissions it must be own by nobody:nogroup
Code:
ls -l /var/log/squid/cache/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 00/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 01/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 02/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 03/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 04/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 05/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 06/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 07/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 08/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 09/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0A/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0B/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0C/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0D/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0E/
drwxr-x--- 258 nobody nogroup 6192 2007-07-29 12:12 0F/
-rw-r-----   1 nobody nogroup   52 2010-03-23 17:51 swap.state
-rw-r-----   1 nobody nogroup    0 2010-03-23 17:51 swap.state.last-clean


Start/Stop squid with /etc/rc.d/rc.squid

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Tue Nov 09, 2010 9:31 pm    Post subject: Reply with quote

how do I make it owned by the nobody group? it's owned by admin now.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Tue Nov 09, 2010 9:32 pm    Post subject: Reply with quote

2010/11/09 12:32:13| WARNING cache_mem is larger than total disk cache space!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Wed Nov 10, 2010 6:34 am    Post subject: Reply with quote

Quote:
how do I make it owned by the nobody group? it's owned by admin now.


chown -R nobody:nogroup /var/log/squid/cache

Have you change your memory settings in squid.conf?
look for cache_mem option, although it's a warning not an error, you can ignore it.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Wed Nov 10, 2010 7:45 am    Post subject: Reply with quote

Initializing the Squid cache with the command /usr/sbin/squid -f /etc/squid/squid.conf -z ..
2010/11/09 22:43:23| WARNING cache_mem is larger than total disk cache space!
2010/11/09 22:43:23| Creating Swap Directories
2010/11/09 22:43:23| /var/log/squid/cache exists
FATAL: Failed to make swap directory /var/log/squid/cache/00: (13) Permission denied

ok so how do I change the permissions. This seems to be a reoccurring nightmare in this SMS build. Every time I try to make something work I don't have permissions and I have to change them some how. I had to change the permissions for the Dansguardian bianary so it would execute. I don't remember how I did it.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Wed Nov 10, 2010 7:48 am    Post subject: Reply with quote

What is the highest I can set squid to for memory threw the webmin?

Memory and Disk Usage Options
Memory usage limit Default FQDN cache size Default
Disk high-water mark Default % Disk low-water mark Default %
Maximum cached object size Default IP address cache size Default entries
IP cache high-water mark Default % IP cache low-water mark Default %
Disk replacement policy Memory replacement policy

That's what I got right now.


System hostname sms-server
Operating system Slackware Linux 13.1.0
Webmin version 1.520
Time on system Tue Nov 9 22:47:58 2010
Kernel and CPU Linux 2.6.33.5-smp on i686
Processor information AMD Athlon(tm) processor, 1 cores
System uptime 1 days, 1 hours, 28 minutes
Running processes 157
CPU load averages 0.06 (1 min) 0.03 (5 mins) 0.01 (15 mins)
CPU usage 1% user, 1% kernel, 0% IO, 98% idle
Real memory 748.44 MB total, 463.12 MB used

Virtual memory 1.86 GB total, 0 bytes used

Local disk space 34.84 GB total, 4.08 GB used

is my system. So what would I do to force squid to use 90% of what it can without the system going nuts?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Wed Nov 10, 2010 9:19 am    Post subject: Reply with quote

What are the permissions of /var/log/squid/cache (ls -l /var/log/squid/cache)?

use the above command "chown -R username:group /var/log/squid/cahe" to change ownership.

If you are using webmin, it asked you to initialize squid cache as a user , use that user to change ownership of squid cache.

Once more start/stop squid with startup script /etc/rc.d/rc.squid not from webmin, unless in squid module config you have startup script as /etc/rc.d/rc.squid start.

You are using 100MB cache disk and default memory should be 8MB but you can ignore the warning, or set "cache_mem 128MB" in squid.conf.

To make dansguardian executable use "chmod +x /etc/rc.d/rc.dansguardian"

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Wed Nov 10, 2010 11:15 pm    Post subject: Reply with quote

gerasimos_h wrote:
What are the permissions of /var/log/squid/cache (ls -l /var/log/squid/cache)?
gerasimos_h


Ok I did that and it outputed "total 0" meaning nothing in the cache folder.


gerasimos_h wrote:
use the above command "chown -R username:group /var/log/squid/cahe" to change ownership.
gerasimos_h


Been there done that dosen't make it work.

gerasimos_h wrote:
If you are using webmin, it asked you to initialize squid cache as a user , use that user to change ownership of squid cache. gerasimos_h


Originally I set that up for the admin user I don't know how to change that now.


gerasimos_h wrote:
Once more start/stop squid with startup script /etc/rc.d/rc.squid not from webmin, unless in squid module config you have startup script as /etc/rc.d/rc.squid start.
gerasimos_h


Got that set up already

gerasimos_h wrote:
You are using 100MB cache disk and default memory should be 8MB but you can ignore the warning, or set "cache_mem 128MB" in squid.conf.

To make dansguardian executable use "chmod +x /etc/rc.d/rc.dansguardian"

gerasimos_h


Ya that's all set fine as far as Dansguardian it will execute but won't work without squid's proxy server working.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Thu Nov 11, 2010 7:03 am    Post subject: Reply with quote

Here is an example for using user: nobody group: nogroup.
edit /etc/squid/squid.conf and add
Code:
cache_effective_user nobody
cache_effective_group nogroup

Change ownership with
Code:
chown -R nobody:nogroup /var/log/squid/cache


initialize cache and start squid.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Thu Nov 11, 2010 8:50 pm    Post subject: That helped a lot but porn filter is still not working and.. Reply with quote

Ok That helped a lot. Now it built the cache folder and did everything right. The Dansguardian porn filter still isn't working. I get this error if I try to stop squid or start it threw webmin.

2010/11/11 11:49:26| WARNING cache_mem is larger than total disk cache space!

Everything else looks good I think.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Thu Nov 11, 2010 8:53 pm    Post subject: Interesting Reply with quote

So I changed the Cache size in webmin manually to 20 GB and tried to start squid and got this:

FATAL: Bungled squid.conf line 81: cache_mem 20 GB
Squid Cache (Version 3.1.Cool: Terminated abnormally.
CPU Usage: 0.021 seconds = 0.012 user + 0.009 sys
Maximum Resident Size: 14576 KB
Page faults with physical i/o: 0
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Thu Nov 11, 2010 9:14 pm    Post subject: Reply with quote

Ok I lmited squid to 50 MB for cache and now it's not complaining. Dansguardian is running and the proxy for both is

port 3128

and the IP of the server is 192.168.0.158

But when I run Firefox threw that proxy and put porn in Google it still lets me go there and to any porn site it finds. I just want it to block it.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
JULinux
Member


Joined: 30 Sep 2010
Posts: 30
Location: Pomeroy WA United States

PostPosted: Thu Nov 11, 2010 9:15 pm    Post subject: Reply with quote

Once we get this working maybe I can have you help me get a second Ethernet port set up with 192.168.1.1 for all the computers to route threw. IDK I'm getting really frustrated at this point.

At least we are making progress.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional