Delinear o servidor squid - redirecionar o tráfego com pf

2

Qual é o meu objetivo: saber o que os funcionários estão procurando na Internet (quais páginas, por quanto tempo etc; sem armazenamento em cache).

O que eu fiz: instale o squid no openBSD

Problema: vejo todo o tráfego (tcpdump), mas não consigo redirecioná-lo para o squid

Como eu conectei:

         [ internet ]
              |
[ switch with port mirroring ]  => [ squid server ]
              |
           [ LAN ]

Meu servidor squid tem dois NIC: sis0 com o endereço IP 10.0.0.100 (conexão de gerenciamento) e rl0 sem endereço IP e com o modo promisc (sem bridge; todo o tráfego está indo para essa interface).

Meu pf.conf:

pass            # establish keep-state
block in on ! lo0 proto tcp to port 6000:6010
pass in on rl0 proto tcp from any to any port {80 443 3128 8080} rdr-to 10.2.0.247 port 3128

Não tenho nada em /var/squid/log/access.log. nc -l 3128 imprimir nada.

Meu squid.conf:

cat /etc/squid/squid.conf | grep -v ^$ | grep -v ^#                                                                                                       
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/24    # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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 localnet
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 10.0.0.100:3128
hierarchy_stoplist cgi-bin ?
cache_dir null /tmp
maximum_object_size 20480 KB
access_log /var/squid/logs/access.log squid
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
coredump_dir /var/squid/cache
    
por Ducker 24.06.2013 / 18:57

1 resposta

1

Seu localnet no squid.conf está errado: acl localnet src 10.0.0.0/24

deve ser acl localnet src 10.2.0.0/24

    
por 16.07.2013 / 06:22