Squid Windows

1. Squid Windows

Lucas Soares
LsoaresA

(usa Outra)

Enviado em 22/12/2012 - 10:33h

Bom dia , gostaria de controlar minha rede wireless , limitar velocidade de pessoas ligadas na rede por ip ou mac etc. Alguem poderia me ajuda.

Minha squid.conf

http_port 3128 transparent
icp_port 0

acl youtube dstdomain .youtube.com
acl speedtest dstdomain .speedtest.net
cache allow youtube
cache allow speedtest
hierarchy_stoplist cgi-bin ? .js .jsp
acl QUERY urlpath_regex cgi-bin \? .js .jsp
no_cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

cache_mem 128 MB
cache_[url=http://www.gsmfans.com.br/index.php?topic=47.0]SwapMemory[/url]low 90%
cache_[url=http://www.gsmfans.com.br/index.php?topic=47.0]SwapMemory[/url]high 98%
maximum_object_size 5 MB
maximum_object_size_in_memory 64 KB
ipcache_size 4096
ipcache_low 90%
ipcache_high 98%
fqdncache_size 16384
offline_mode off
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

cache_dir ufs D:/cache 6000 14 256

request_body_max_size 3 MB
cache_log c:/squid/var/logs/cache.log
cache_log none
cache_store_log none

refresh_pattern ^http://.*\.gif$ 1440 50% 20160 reload-into-ims
refresh_pattern ^http://.*\.asis$ 1440 50% 20160
refresh_pattern -i \.png$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.jpg$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.bmp$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.gif$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.ico$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.swf$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.flv$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.rar$ 10080 150% 40320
refresh_pattern -i \.ram$ 10080 150% 40320
refresh_pattern -i \.txt$ 1440 100% 20160 reload-into-ims
override-lastmod
refresh_pattern -i \.css$ 1440 60% 20160
refresh_pattern ^http:// 1 100% 20160 reload-into-ims ignore-reload
refresh_pattern ^ftp:// 240 50% 20160
refresh_pattern ^gopher:// 240 40% 20160
refresh_pattern /cgi-bin/ 0 0% 30
refresh_pattern . 0 100% 20160 reload-into-ims

negative_ttl 1 minutes
positive_dns_ttl 24 hours

quick_abort_min 0
quick_abort_max 0
quick_abort_pct 100

acl localnet src 192.168.0.0/16

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 4000
acl Safe_ports port 80 81 82 83 88 90 91 11371 # 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 SSL_ports port 2081-2090
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all

icp_access deny all
header_access Accept-Encoding deny all

miss_access allow localhost
miss_access allow localnet
miss_access deny all

visible_hostname proxy
hostname_aliases squid

logfile_rotate 1
append_domain .localhost

memory_pools off
log_icp_queries off
icp_hit_stale on
query_icmp on
reload_into_ims on

always_direct allow to_localhost
always_direct deny all
never_direct deny all


pipeline_prefetch on
vary_ignore_expire on



  


2. Re: Squid Windows

Reginaldo de Matias
saitam

(usa Slackware)

Enviado em 22/12/2012 - 13:08h

LsoaresA escreveu:

Bom dia , gostaria de controlar minha rede wireless , limitar velocidade de pessoas ligadas na rede por ip ou mac etc. Alguem poderia me ajuda.

Minha squid.conf

http_port 3128 transparent
icp_port 0

acl youtube dstdomain .youtube.com
acl speedtest dstdomain .speedtest.net
cache allow youtube
cache allow speedtest
hierarchy_stoplist cgi-bin ? .js .jsp
acl QUERY urlpath_regex cgi-bin \? .js .jsp
no_cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

cache_mem 128 MB
cache_[url=http://www.gsmfans.com.br/index.php?topic=47.0]SwapMemory[/url]low 90%
cache_[url=http://www.gsmfans.com.br/index.php?topic=47.0]SwapMemory[/url]high 98%
maximum_object_size 5 MB
maximum_object_size_in_memory 64 KB
ipcache_size 4096
ipcache_low 90%
ipcache_high 98%
fqdncache_size 16384
offline_mode off
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

cache_dir ufs D:/cache 6000 14 256

request_body_max_size 3 MB
cache_log c:/squid/var/logs/cache.log
cache_log none
cache_store_log none

refresh_pattern ^http://.*\.gif$ 1440 50% 20160 reload-into-ims
refresh_pattern ^http://.*\.asis$ 1440 50% 20160
refresh_pattern -i \.png$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.jpg$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.bmp$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.gif$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.ico$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.swf$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.flv$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.rar$ 10080 150% 40320
refresh_pattern -i \.ram$ 10080 150% 40320
refresh_pattern -i \.txt$ 1440 100% 20160 reload-into-ims
override-lastmod
refresh_pattern -i \.css$ 1440 60% 20160
refresh_pattern ^http:// 1 100% 20160 reload-into-ims ignore-reload
refresh_pattern ^ftp:// 240 50% 20160
refresh_pattern ^gopher:// 240 40% 20160
refresh_pattern /cgi-bin/ 0 0% 30
refresh_pattern . 0 100% 20160 reload-into-ims

negative_ttl 1 minutes
positive_dns_ttl 24 hours

quick_abort_min 0
quick_abort_max 0
quick_abort_pct 100

acl localnet src 192.168.0.0/16

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 4000
acl Safe_ports port 80 81 82 83 88 90 91 11371 # 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 SSL_ports port 2081-2090
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all

icp_access deny all
header_access Accept-Encoding deny all

miss_access allow localhost
miss_access allow localnet
miss_access deny all

visible_hostname proxy
hostname_aliases squid

logfile_rotate 1
append_domain .localhost

memory_pools off
log_icp_queries off
icp_hit_stale on
query_icmp on
reload_into_ims on

always_direct allow to_localhost
always_direct deny all
never_direct deny all


pipeline_prefetch on
vary_ignore_expire on



Esta de brincadeira né, usar Squid no Windows e postar no fórum Linux ainda.
Bom, acho melhor se quiser usar Squid no Windows, terá que colocar o daemon squid como serviço diretamente no Windows.

Recomendações:
Crie uma máquina virtual Linux (Debian) e assim instala o Squid.
Coloque duas interfaces de redes na máquina virtual, uma como NAT e outra como Bridge.








Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts