Snaiper

Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Нужна помощь, передо мной встала задача пропустить www(порт 80) трафик через squid с оригинальными адресами клиентов Поставил Debian 5 (в кернеле стоит опция tproxy) dmesg |grep TPROXY NF_TPROXY: Transparent proxy support initialized, version 4.1.0 NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. Поставил iptables c поддержкой tproxy (git clone git://git.balabit.hu/bazsi/iptables-tproxy.git) Мои правила: iptables -t mangle -N DIVERT iptables -t mangle -A DIVERT -j MARK --set-mark 1 iptables -t mangle -A DIVERT -j ACCEPT iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-ip 127.0.0.1 --on-port 3129 ip rule add fwmark 1 lookup 100 ip route add local 0.0.0.0/0 dev lo table 100 Поставил squid с опцией --enable-linux-netfilter squid -v Squid Cache: Version 3.1.0.14 configure options: '--enable-linux-netfilter' '--enable-http-violations--enable-async-io=8' '--enable-useragent-log' '--enable-cache-digests--enable-follow-x-forwarded-for' '--enable-storeio=aufs' '--enable-removal-policies=heap,lru' '--with-maxfd=16384' '--enable-poll--with-filedescriptors=16384' '--disable-ident-lookups--enable-zph-qos' '--enable-truncate' '--with-pthreads--with-large-files' '--enable-ssl--with-openssl=/usr/include/openssl/--disable-htcp' '--enable-inline' '--enable-delay-pools--enable-underscores' '--enable-icap-client--with-default-user=squid' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--disable-maintainer-mode' '--disable-dependency-tracking' '--srcdir=.' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' --with-squid=/usr/src/squid-3.1.0.14 --enable-ltdl-convenience В конфиге squid http_port 3128 http_port 3129 tproxy Клиенты получают ошибку: The following error was encountered while trying to retrieve the URL: http://www.whatismyip.com/ Connection to 72.233.89.199 failed. The system returned: (110) Connection timed out The remote host or network may be down. Please try the request again. В логах squid я вижу ..... 2009/10/02 01:39:32.709| PconnPool::key(www.whatismyip.com,80,(no domain),xxx.xxx.xxx.xxxis {www.whatismyip.com:80-xxx.xxx.xxx.xxx} 2009/10/02 01:39:32.709| PconnPool::pop: lookup for key {www.whatismyip.com:80-xxx.xxx.xxx.xxx} failed. 2009/10/02 01:39:32.709| FilledChecklist.cc(162) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0xbfaf5d38 ...... В чём проблема: настройка кернела, iptables или squid виноват? (если ставлю опцию transparent - то squid раьотает в прозрачном режиме без проблем) |