Поднимаю прокси по инструкциям salomatin'a и скриптам Drool'a, пока прозрачный хотя бы
Alt Office Server 4.0, в инет смотрит
rostlk, внутрь
local, сеть 192.168.0.ххх. Установлен squid, iptables, redirector
Что делал:
в
/etc/net/sysctl.conf в строчке
net.ipv4.ip_forward = 0 изменил на
1сделал
echo 1 > /proc/sys/net/ipv4/ip_forward
Прописываю правила iptables для нат и перенаправления трафика
# iptables -t nat -A POSTROUTING -o rostlk -s 192.168.0.0/24 -j MASQUERADE
# iptables -A FORWARD -s 192.168.0.0/24 -d ! 192.168.0.0/24 -j ACCEPT
# iptables -A FORWARD -d 192.168.0.0/24 -s ! 192.168.0.0/24 -j ACCEPT
# iptables -I PREROUTING -t nat -s 192.168.0.0/24 -p tcp --dport 80 -j DNAT --to 192.168.0.10:3128
# iptables-save>/etc/sysconfig/iptables
# service iptables restart
В
/etc/squid/squid.conf подправил
# Squid normally listens to port 3128
http_port 3128 transparent
# Example rule allowing access from your local networks. Adapt
# to list your (internal) IP networks from where browsing should
# be allowed
acl mynet src 192.168.0.0/24
http_access allow mynet
# And finally deny all other access to this proxy (закомментировал по Drool'у)
# http_access allow localhost
# http_access deny all
# service squid restart
При такой настройке у меня работает pidgin, загружаются ftp-шные страницы, страницы по http
s, а вот то, чего по http нет, например вводим
www.mail.ru, выдается такая табличка (firefox, opera, ie)
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.mail.ru/
The following error was encountered:
Unable to determine IP address from host name for www.mail.ru
The dnsserver returned:
Refused: The name server refuses to perform the specified operation.
This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
Your cache administrator is webmaster.
Generated Sun, 29 Nov 2009 06:13:27 GMT by media.transgeology.ru (squid/2.6.STABLE17)
В логах в файле /var/log/squid/access.log есть такие строки
1259477742.770 98 192.168.0.20 TCP_MISS/503 1591 GET http://www.mail.ru/ - DIRECT/www.mail.ru text/html
1259477742.886 93 192.168.0.20 TCP_MISS/503 1613 GET http://www.mail.ru/favicon.ico - DIRECT/www.mail.ru text/html
(media.transgeology.ru машина со сквидом, 192.168.0.20 это адрес машины, откуда ввожу
www.mail.ru)
Чего я где недоразрешил? Есть мысль, что как-то http не правильно заворачивается, а вот больше мыслей нету
В файрфоксе игрался с настройками прокси, но чот толку не было
http://www.mail.ru/ - DIRECT/www.mail.ru может пересылка куда-то не туда идет?