LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-19-2006, 07:42 AM   #1
leandrob
LQ Newbie
 
Registered: Jan 2006
Location: Brazil
Distribution: Debian Sarge
Posts: 19

Rep: Reputation: 0
Squid


I need a example of squid.conf to put in my PC, I want a simple example with all free! I don't want anything blocked.
It is just I conect free in my LAN.

Last edited by leandrob; 01-19-2006 at 07:44 AM.
 
Old 01-19-2006, 09:03 AM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
How about the sample squid.conf file?
 
Old 01-20-2006, 02:29 AM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Read the docs here http://www.squid-cache.org/ and there's a sample one in /etc/squid. Anyway here's mine, its from a Mandriva 2006 box with squid-2.5.STABLE10. It was generated automatically by Mandriva's Internet Connection Sharing setup wizard:
Code:
 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 allow to_localhost acl mynetwork src 192.168.1.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 .mydomain err_html_text admin@mydomain.com deny_info ERR_CUSTOM_ACCESS_DENIED all memory_pools off coredump_dir /var/spool/squid ie_refresh on
Keep in mind that although it appears to restrict access to non-localhost machines to certain ports this doesn't actually have any effect unless you firewall outgoing access and force everything on your LAN to go through the Squid proxy. If you don't block outgoing access but instead redirect all outgoing http traffic to port 3128 this just functions as a normal transparent proxy (this is how I use it).

Last edited by tkedwards; 01-20-2006 at 02:31 AM.
 
Old 01-20-2006, 02:35 AM   #4
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Yuck! I edited the post and the code section went all crazy on one line, at least in Konqueror and Firefox anyway.

Again here's my squid.conf:
Code:
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 allow to_localhost
acl mynetwork src 192.168.1.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 .mydomain
err_html_text admin@mydomain.com
deny_info ERR_CUSTOM_ACCESS_DENIED all
memory_pools off
coredump_dir /var/spool/squid
ie_refresh on
 
Old 01-20-2006, 06:11 AM   #5
leandrob
LQ Newbie
 
Registered: Jan 2006
Location: Brazil
Distribution: Debian Sarge
Posts: 19

Original Poster
Rep: Reputation: 0
What must I move in this example for that it starts in my PC? because He is with error im my server.

thanks
 
Old 01-20-2006, 11:08 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Post the error message
 
  


Reply



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
SQUID for blocking yahoo and msn [inc squid.conf] chrisfirestar Linux - Security 10 03-03-2008 08:33 AM
Squid: special configuration for remote Squid server hamish Linux - Software 0 12-06-2005 03:58 PM
squid message customization, hiding squid versioin rajnishmishra Linux - Networking 0 11-27-2004 03:55 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM
Squid load testing software / Squid optimisation? gundelgauk Linux - Networking 2 08-31-2004 07:36 PM

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

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