!!! Необходимо настроить в браузере “Автоматическое определение параметров прокси”
dnscmd /config /enableglobalqueryblocklist 0
# cat /etc/bind/corpX.un
wpad A 192.168.X.10 ;wpad A 192.168.X.1 ;GSSAPI proxy A 172.16.1.X
# cat /var/www/html/wpad.dat
function FindProxyForURL(url,host) { if (shExpMatch(host, "*corpX.un")) return "DIRECT"; else if (dnsDomainIs(host,"isp.un")) return "DIRECT"; else // return "HTTPS proxy.corpX.un:8080"; // return "PROXY proxy.corpX.un:3128"; // return "PROXY gate.corpX.un:3128"; //GSSAPI }
gate# cat squid.conf
... http_port 8888 transparent http_port 3128 ...
gate# squid -k check gate# squid -k reconfigure
[gate:~] # cat /var/db/ports/www_squid/options
... OPTIONS_FILE_SET+=TP_PF ...
[gate:~] # cat /etc/devfs.conf
... perm pf 0644
[gate:~] # cat /etc/pf.conf
... rdr proto tcp from $pppoe_corp_net to any port 80 -> 127.0.0.1 port 8888 ...
[gate:~] # /etc/rc.d/pf reload
root@gate:~# iptables -t nat -A PREROUTING -p tcp -s 192.168.100+X.0/24 --dport 80 -j REDIRECT --to-port 8888
gate# tail -f access.log