soloc_so Posted April 21, 2006 Posted April 21, 2006 Подскажите есть у кого пример рабочей конфигурации, а то какая то хрнь получается всех клиентов заворачивает не на порт прокси, а на ip прокси сервера Вставить ник Quote
Kucher2 Posted April 25, 2006 Posted April 25, 2006 squid: http_port 3128 httpd_accel_host virtual httpd_accel_port 80 httpd_accel_with_proxy on httpd_accel_uses_host_header on visible_hostname srv hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin ? no_cache deny QUERY cache_mem 32 MB maximum_object_size 4096 KB minimum_object_size 0 KB ftp_passive on #ftp_sanytocheck on #request_header_max_size 5 MB request_body_max_size 4 MB cache_dir ufs /usr/local/squid/cache 512 16 256 cache_access_log /usr/local/squid/logs/access.log cache_log /usr/local/squid/logs/cache.log cache_store_log /usr/local/squid/logs/store.log pid_filename /usr/local/squid/logs/squid.pid refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl home src <твоя сеть>/<маска> acl to_localhost dst 127.0.0.0/8 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 CONNECT method CONNECT http_access allow home http_access deny all coredump_dir c:squidvarcache ipfw (примерный): #!/bin/sh fwcmd="/sbin/ipfw" natdcmd="/sbin/natd" int_if="rl0" #erv_if="xl1" ext_if="rl1" ${fwcmd} -f flush #заворачиваем HTTP на SQUID ${fwcmd} add 10 fwd 127.0.0.1,3128 tcp from <твоя сеть>/<маска сети> to any 80 uot xmit ${ext_if} #заворачиваем на НАТ всё что приходит извне ${fwcmd} add 50 divert natd ip from any to <IP-адрес шлюза в инет> ${fwcmd} add 55 deny icmp from any to any frag ${fwcmd} add 60 allow icmp from any to any ${fwcmd} add 200 deny ip from any to 127.0.0.0/8 ${fwcmd} add 250 deny ip from 127.0.0.0/8 to any ${fwcmd} add 00305 deny ip from any to <твоя сеть>/24 out via ${ext_if} #заворачиваем на НАТ всё что идёт из локалки в мир ${fwcmd} add 50 divert natd ip from <IP-адрес шлюза в инет> to <IP машин внутренней сети> <Разрешающие правила для машин внутренней сети> ${fwcmd} add 50020 deny log ip from <твоя сеть>/24 to <внутр. IP шлюза> via ${int_if} ${fwcmd} add 50029 allow tcp from any to any out via ${ext_if} setup ${fwcmd} add 50030 allow tcp from any to any via ${ext_if} established ${fwcmd} add 50031 allow udp from any to any out via ${ext_if} ${fwcmd} add 50032 allow udp from any 53 to any in via ${ext_if} $fwcmd add 65534 deny log ip from any to any Только не задавай вопросов: сам содрал. :) Конфиг SQUID 100% рабочий. в ipfw самое главное для squid - 10-ое правило. Вставить ник Quote
Saenara Posted April 25, 2006 Posted April 25, 2006 Если, таки, пользоваться pf, то rdr on fxp1 proto tcp from 192.168.0.0/16 to any port { 20, 21, 80, 3128, 8000, 8080 } -> 192.168.1.10 port 3128 Где 192.168.0.0/16 -- твоя сеть 192.168.1.10/32 -- адрес прокси сервера Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.