Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: Squid 2.6 nedokáže anonymizovat headers?  (Přečteno 2120 krát)

vlad4321

  • Návštěvník
  • Příspěvků: 4
Squid 2.6 nedokáže anonymizovat headers?
« kdy: 19 Června 2007, 21:25:34 »
Mám Ubuntu 7.04. Nedávno jsem si všiml, že SQUID 2.6 z nějakého důvodu ignoruje nastavení header_access. Především mě zlobí, že v hlavičce vrací odkazující URL. Zkoušel jsem různé kombinace squid.conf, strávil jsem nad tím problémem několik hodin, ale ať dělám, co dělám, referer URL je tam pořád. Co dělám špatně?

Zde je můj squid.conf:
Kód: [Vybrat]
http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
forward_timeout 1 minutes
peer_connect_timeout 10 seconds
request_timeout 1 minutes
half_closed_clients off
shutdown_lifetime 3 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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
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 631 # cups
acl Safe_ports port 873 # rsync
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 deny all
http_reply_access allow all
icp_access allow all
header_access From deny all
header_access Referer deny all
header_access Server deny all
header_access User-Agent deny all
header_access Link deny all
coredump_dir /var/spool/squid
visible_hostname blue.ray.net
redirect_program /usr/bin/adzapper

DuckD

  • Stálý člen
  • **
  • Příspěvků: 878
  • Open Srdcař
    • www.duckd.cz
Squid 2.6 nedokáže anonymizovat headers?
« Odpověď #1 kdy: 19 Června 2007, 23:25:38 »
Zdar,
možná ti pomůže můj squid.conf
ale nekamenuj mě když ti to bude platné jako modrá obrazovka ve Windovs.

Kód: [Vybrat]
more /var/ipcop/proxy/squid.conf
shutdown_lifetime 5 seconds
icp_port 0

http_port 127.0.0.1:800
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_effective_user squid
cache_effective_group squid

pid_filename /var/run/squid.pid

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

log_mime_hdrs off
forwarded_for off

# Do not modify '/var/ipcop/proxy/squid.conf' directly since any changes
# you make will be overwritten whenever you resave proxy settings using the
# web interface! Instead, modify the file '/var/ipcop/proxy/acl' and then
# restart squid using the web interface. Changes made to the 'acl' file
# will propagate to the 'squid.conf' file at that time.
# [Scott Tregear, 22 Feb 2005]

# Uncomment the following line to enable logging of User-Agent header:
#useragent_log      /var/log/squid/user_agent.log

# Uncomment the following line to enable logging of Referer header:
#referer_log        /var/log/squid/referer.log

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
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 __PROXY_PORT__ # Squid port (for icons)

acl IPCop_http  port 81
acl IPCop_https port 445
acl IPCop_ips  dst 192.168.2.1
acl IPCop_networks src 192.168.2.0/255.255.255.0
acl CONNECT method CONNECT

##Access to squid:
#local machine, no restriction
#http_access allow         localhost

#GUI admin if local machine connects
#http_access allow         IPCop_ips IPCop_networks IPCop_http
#http_access allow CONNECT IPCop_ips IPCop_networks IPCop_https

#Deny not web services
#http_access deny          !Safe_ports
#http_access deny  CONNECT !SSL_ports

#Finally allow IPCop_networks clients
#http_access allow         IPCop_networks
#http_access deny          all
# Cop+ acl rules follow, above rules should remain commented out
http_access allow         localhost IPCop_http
http_access allow CONNECT localhost IPCop_https
http_access deny          !Safe_ports
http_access deny  CONNECT !SSL_ports
http_access allow         localhost
http_access deny         all
maximum_object_size 256 KB
minimum_object_size 0 KB

cache_mem 96000 KB
cache_dir aufs /var/log/cache 20 16 256

request_body_max_size 0 KB
reply_body_max_size 0 allow all

visible_hostname ipcop.localdomain

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
8) Lidé žijí v souborech. ===>> LINUXTERO <<=== Pravidelná dávka tvého linuxtera!

vlad4321

  • Návštěvník
  • Příspěvků: 4
Squid 2.6 nedokáže anonymizovat headers?
« Odpověď #2 kdy: 20 Června 2007, 01:56:01 »
Uf. Díky, ale hází to chyby.

1. pokus:
cd: 173: can't cd to /var/log/cache
FATAL: Bungled squid.conf line 46: acl Safe_ports port __PROXY_PORT__ # Squid port (for icons)

Jaká řádka 173? Vždyť tam je 84 řádků? Jo, přišel jsem na to. Byla to řádka 73.
Také odkomentoval jsem linku 46

2. pokus
2007/06/19 19:47:55| parseConfigFile: line 78 unrecognized: 'httpd_accel_host virtual'
2007/06/19 19:47:55| parseConfigFile: line 79 unrecognized: 'httpd_accel_port 80'
2007/06/19 19:47:55| parseConfigFile: line 80 unrecognized: 'httpd_accel_with_proxy on'
2007/06/19 19:47:55| parseConfigFile: line 81 unrecognized: 'httpd_accel_uses_host_header on'
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 2.6.STABLE5): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Aborted (core dumped)

Chybějící user id squid bych uměl spravit. Ale ty chyby na řádcích 78 - 81 ne.

DuckD

  • Stálý člen
  • **
  • Příspěvků: 878
  • Open Srdcař
    • www.duckd.cz
Squid 2.6 nedokáže anonymizovat headers?
« Odpověď #3 kdy: 20 Června 2007, 07:31:18 »
Ten Squid není přímo z Ubuntu, je z mého serveru který pracuje s distribucí www.ipcop.org .
Takže se to může trochu jinak nastavovat. Upravil bych to co už tam máš a podle citu bych zkoušel to ostatní.
Například toto bych tam vůbec nedával:
Kód: [Vybrat]
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
8) Lidé žijí v souborech. ===>> LINUXTERO <<=== Pravidelná dávka tvého linuxtera!

 

Provoz zaštiťuje spolek OpenAlt.