LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-27-2005, 01:24 AM   #1
Trio3b
Member
 
Registered: Oct 2004
Location: Texas, USA
Distribution: MDV 2008.1, PCLinuxOS,
Posts: 315

Rep: Reputation: 30
configuring squid


Running squid included in Mandrake 10.2. Apparently squid is needed to use Dansguardian, a web content filter. I have read all the documentation on squid at aerospace, visolve,squid-cache,and as many versions(http,pdf) by as many authors as possible.

Don't know if by default Mandrake alters the application before, during or after install, but my squid.conf file bears practically NO RESEMBLANCE to any of the documentation.

If anyone has configured squid.conf, would appreciate any detailed help.

Thanks
 
Old 12-27-2005, 10:24 AM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Why don't you start by giving us any useful piece of information like what you are trying to accomplish?
 
Old 12-27-2005, 09:39 PM   #3
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Rep: Reputation: 30
here is something similar to my config file for squid:

Code:
http_port 192.168.1.1:3128

hierarchy_stoplist cgi-bin ?

#acl QUERY urlpath regex cgi-bin \?
#no_cache deny QUERY

cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
cache_swap_log /var/log/squid/cache_swap_log

maximum_object_size 4096 KB

cache_access_log /dev/null
cache_log /dev/null
cache_store_log none

redirect_program /etc/adzapper/wrapzap

redirect_children 5

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320

ident_timeout 1 seconds

shutdown_lifetime 10 seconds



acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.1.0/255.255.255.0
acl to_localhost dst 127.0.0.0/8

acl SSL_ports port 443 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 901         # SWAT

acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow localnet
#http_access allow ihug

http_access deny all

http_reply_access allow all

icp_access allow all

httpd_accel_host virtual

httpd_accel_with_proxy on

httpd_accel_uses_host_header on

forwarded_for off

header_access From deny all
header_access Referer deny all
header_access Server deny all
header_access Link deny all
header_access Via deny all
header_access X-Forwarded-For deny all
header_access Proxy-Connection deny all
header_access Accept deny all

coredump_dir /var/cache/squid
Replace the '192.168.1.x' instances with your local network settings.

oh btw, don't forget to redirect incoming requests with iptables (transparent proxy):

Code:
/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
HTH!

Last edited by ixion; 12-27-2005 at 09:45 PM.
 
Old 12-30-2005, 02:08 PM   #4
Trio3b
Member
 
Registered: Oct 2004
Location: Texas, USA
Distribution: MDV 2008.1, PCLinuxOS,
Posts: 315

Original Poster
Rep: Reputation: 30
squid

Thanks to ixion.
Will try your suggestions this weekend and post back.
Here is my setup if it helps.

Both PCs run MDK 10.2 Would like to keep PC1 filtered from 'net using DG. From what I've read, this setup can be configured a number of ways and I don't know the best/most flexible way.

PC1(192.168.10.1)eth0-> hub <-eth0 PC2(192.168.10.2)eth1 -> DSL modem -> 'net

local ntwrk setup as 'static'---eth1 to modem setup using DHCP

Not once did I read that squid or DG run as services in background. I spent 3 days looking for 'something to happen", like what happens in 99.9999% of applications.

Usually conf files have a bunch of stuff commented out at the beginning of line. This squidconf file has most lines uncommented.

http access and http deny are both listed, and both are uncommented. This implies a conflict. Can only assume file is read from top to bottom and first action? or last action? is taken?

unfortunately, this is non intuitive.

Also, Am assuming I run squid and DG on PC2 only?
Where do iptables fit into this?

This is my default installed squid.conf file and have NOT altered it yet.

http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir diskd /var/spool/squid 100 16 256
cache_store_log none
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
half_closed_clients off
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
acl mynetwork src 192.168.10.0/255.255.255.0
http_access allow mynetwork
http_access allow localhost
http_reply_access allow all
icp_access allow all
visible_hostname myfirewall@mydomain.com
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
append_domain .gateway.2wire.net
err_html_text admin@mydomain.com
deny_info ERR_CUSTOM_ACCESS_DENIED all
memory_pools off
coredump_dir /var/spool/squid
ie_refresh on

Thanks for your help
 
  


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
Problem with configuring squid.... coolguy_iiit Linux - Networking 2 09-05-2005 06:55 AM
configuring squid Faizan Linux - Networking 1 05-05-2005 12:12 PM
Configuring Squid phatboyz Linux - Software 2 02-18-2004 07:39 AM
configuring squid santosh Linux - Networking 5 07-31-2002 10:22 AM
Help me in Configuring Squid ACL tina_gora Linux - Networking 0 05-22-2001 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:06 PM.

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