Results 1 to 9 of 9

Thread: NAS: Create your own caching proxy

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. Quote Originally Posted by wpte View Post
    thanks serpent, I got it working now
    it goes pretty fast actually
    Please paste your squid.conf
    thank you

  2. #2
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by vinyols View Post
    Please paste your squid.conf
    thank you
    Got it working now tho, but I'm trying to get dansguardian working with it, so you can block the pop-ups etc.
    PHP Code:
    ## SQUID CONFIG
    cache_mgr myhidden@email-adress.com

    ## Those are the ports the proxy is going to listen to
    http_port 192.168.2.1:3128
    http_port 192.168.2.1
    :8081

    # TAG: visible_hostname
    # The host-name of the proxy-server. Can really be anything
    visible_hostname router

    # DISK CACHE OPTIONS
    # -----------------------------------------------------------------------------
    # Disk-cache options. Just adjust the cache-size
    cache_replacement_policy lru
    cache_dir ufs 
    /mnt/cache20000 16 256
    minimum_object_size 0 KB
    maximum_object_size 5000000 KB
    maximum_object_size_in_memory 1024 KB

    # MEMORY CACHE OPTIONS
    # -----------------------------------------------------------------------------
    # TAG: cache_mem (bytes)
    cache_mem 8 MB
    memory_replacement_policy lru

    # ACCESS CONTROLS
    # -----------------------------------------------------------------------------
    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 our_networks src 192.168.1.0
    /24 192.168.2.0/24
    acl to_localhost dst 127.0.0.0
    /8

    http_access allow manager localhost
    http_access allow manager our_networks
    http_access deny manager

    # Allow all clients from my network
    http_access allow our_networks

    # And finally deny all other access to this proxy
    http_access deny all

    #Allow ICP queries from everyone
    icp_access allow all



    # LOG-FILES
    # -----------------------------------------------------------------------------
    access_log /opt/var/squid/logs/access.log squid

    #cache_log none
    #cache_log /opt/var/squid/logs/cache.log

    #cache_access_log none
    #cache_access_log /opt/var/squid/logs/access.log

    #cache_store_log none
    #cache_store_log /opt/var/squid/logs/store.log


    # OPTIONS FOR TUNING THE CACHE
    # -----------------------------------------------------------------------------

    # TAG: cache
    # A list of ACL elements which, if matched, cause the request to
    # not be satisfied from the cache and the reply to not be cached.
    # In other words, use this to force certain objects to never be cached.
    #
    # You must use the word 'DENY' to indicate the ACL names which should
    # NOT be cached.
    #
    # Default is to allow all to be cached

    #We recommend you to use the following two lines.
    acl QUERY urlpath_regex cgi-bin \?
    cache deny QUERY
    refresh_pattern 
    ^ftp1440 2010080
    refresh_pattern 
    ^gopher1440 01440
    refresh_pattern 
    0 204320
    refresh_pattern 
    \.gif 1440 5040320 reload-into-ims
    refresh_pattern 
    \.jpg 1440 5040320 reload-into-ims
    refresh_pattern 
    \.tif 4320 5043200
    refresh_pattern 
    \.png 1440 5040320 reload-into-ims
    refresh_pattern 
    \.jpeg 1440 5040320 reload-into-ims
    refresh_pattern 
    ^http://*.google.*/.* 720 100% 4320

    # refresh patterns to enable caching of MS windows update
    refresh_pattern windowsupdate\.microsoft\.com/.*\.(cab|exe|psf4320 100120960 reload-into-ims
    refresh_pattern update
    \.microsoft\.com/.*\.(cab|exe|psf4320 100120960 reload-into-ims
    refresh_pattern office
    \.microsoft\.com/.*\.(cab|exe|psf4320 100120960
    refresh_pattern windowsupdate
    \.com/.*\.(cab|exe|psf4320 100120960 reload-into-ims
    refresh_pattern download
    \.microsoft\.com/.*\.(cab|exe|psf4320 100120960 reload-into-ims
    refresh_pattern microsoft
    \.com 4320 10010080


    pipeline_prefetch on
    # Apache mod_gzip and mod_deflate known to be broken so don't trust
    # Apache to signal ETag correctly on such responses
    acl apache rep_header Server ^Apache
    broken_vary_encoding allow apache

    # Leave coredumps in the first cache dir
    coredump_dir /opt/var/squid/cache

    # Disable cachemgr password
    cachemgr_passwd none all 
    I have my routers IP at 192.168.2.1
    chose 8081 for port because I have port 8080 for the webadmin page.

    I found out that 5gb is more than enough tho, still don't have it filled after a few days, only like 100mb or something

  3. #3

    dansguardian

    Any luck getting dansguarding to work with squid?

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Gizmo1007 View Post
    Any luck getting dansguarding to work with squid?
    currently I'm not working on that anymore

    I had some compiling problems I remember...
    maybe I should try the crosscompiler once

    there is also squidguard: http://www.squidguard.org/

Similar Threads

  1. Ошибка: Cannot create directory `/opt/tmp': Input/output error
    By GOLD in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 12
    Last Post: 31-01-2009, 17:55
  2. How do I create a post-boot script?
    By ChessMaster in forum WL-500g Q&A
    Replies: 0
    Last Post: 06-09-2008, 06:57
  3. Transparent proxy with http cache
    By peaksie in forum WL-500gP Tutorials
    Replies: 0
    Last Post: 22-08-2008, 09:27
  4. Proxy fьr WL500gP
    By LeChuck in forum German Discussion - Deutsch (DE)
    Replies: 1
    Last Post: 11-10-2007, 12:02

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •