К сожалению не имею большого опыта настройки Squid, и потому не смог самостоятельно увидеть в чем моя ошибка. Squid загружается без ошибок и показывает что работает нормально. Однако на клиентских машин инет не работает.Вот конфиг Squid:
http_port 3128
icp_port 3130
htcp_port 4827cache_peer 192.168.1.100 parent 81 0 default no-query
hierarchy_stoplist cgi-bin ?
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95maximum_object_size 1024 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KBipcache_size 10240
ipcache_low 90
ipcache_high 95cache_dir ufs c:/squid25/var/cache 100 16 256
cache_access_log c:/squid25/var/logs/access.log
cache_log c:/squid25/var/logs/cache.log
cache_store_log c:/squid25/var/logs/store.logemulate_httpd_log off
mime_table c:/squid25/etc/mime.conf
log_mime_hdrs off
useragent_log c:/squid25/var/logs/useragent.log
pid_filename c:/squid25/var/logs/squid.pid
debug_options ALL,1
client_netmask 255.255.255.0ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck ondns_nameservers 10.50.0.2
diskd_program c:/squid25/libexec/diskd.exe
unlinkd_program c:/squid25/libexec/unlinkd.exe
pinger_program c:/squid25/libexec/pinger.exeauth_param ntlm program c:/squid25/libexec/ntlm_win32_auth.exe -v -a InetUsers
auth_param ntlm children 15
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 1 minutesrefresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_mgr 192.168.1.100
visible_hostname 192.168.1.100
unique_hostname 192.168.1.100memory_pools on
memory_pools_limit 5 MBicon_directory c:/squid25/share/icons
error_directory c:/squid25/share/errors/Englishacl all src 192.168.0.0-192.168.1.255
acl manager proto cache_object
acl localhost src 127.0.0.1
acl to_localhost dst 127.0.0.0
acl CONNECT method CONNECThttp_access allow all
http_reply_access allow all
icp_access allow all
miss_access allow all# ignore_unknown_nameservers on
# ie_refresh onВнешний IP на сервере 195.131.89.1
Внутренний: 192.168.1.100
IP клиентов: 192.168.1.1-192.168.1.50Вот выдержка из access-лога на одном из этапов настройки:
1041254251.102 0 192.168.1.0 TCP_DENIED/407 1697 GET http://www.yandex.ru/ - NONE/- text/html
1041257408.122 50 192.168.1.0 TCP_MISS/200 1578 GET http://www.ya.ru/ - DEFAULT_PARENT/192.168.1.100 text/html192.168.1.0 [30/Dec/2002:18:10:26 +0300] "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
Заранее спасибо, Алексей.
>К сожалению не имею большого опыта настройки Squid, и потому не смог
>самостоятельно увидеть в чем моя ошибка. Squid загружается без ошибок и
>показывает что работает нормально. Однако на клиентских машин инет не работает.
А ты броузеры то на клиентских машинах настроил, если настроил, то покажи, что там задал.
> cache_peer 192.168.1.100 parent 81 0 default no-query
ты пытался описать родительский прокси ? почему тогда IP с твоего внутренного интерфейса ? либо закоментарь, либо пиши верно прокси своего провайдера.> client_netmask 255.255.255.0
ты сознательно не показываешь в логе клиентский ip ? хотя хозяин - барин в данном случае ...> acl all src 192.168.0.0-192.168.1.255
лучше было оставить:
acl all src 0.0.0.0/0.0.0.0
хм... если ты хотел диапазон ip задать, то в твоем случае
acl yournet src 192.168.1.1-192.168.1.50/255.255.255.255
тогда своим разрешаешь:
http_access allow yuornet
остальных нафик:
http_access deny allв таком случае все задано явно, удобно.
и зря ты выкинул:
acl SSL_ports
acl Safe_portsпосмотри как в squid.conf.default написано для примера.
почитай http://squid.opennet.ru/FAQ/my/FAQrus-10.html
Спасибо, keepver!
Твои замечания были весьма полезны.Сейчас Сквид заработал и все вроде бы замечательно :))
Осталась только одна проблема: все соединения Сквид пишет в лог как соединения с одного и того же Ай-Пи(192.168.1.0) независимо от того с какой машины идет обращение.Подскажите как сделать, чтобы обращения воспринимались правильно.
Вот текущий конфиг:
http_port 3128
icp_port 3130
htcp_port 4827cache_peer 195.131.89.19 parent 3128 0 default no-query
hierarchy_stoplist cgi-bin ?
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95maximum_object_size 1024 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KBipcache_size 10240
ipcache_low 90
ipcache_high 95cache_dir ufs c:/squid25/var/cache 100 16 256
cache_access_log c:/squid25/var/logs/access.log
cache_log c:/squid25/var/logs/cache.log
cache_store_log c:/squid25/var/logs/store.logemulate_httpd_log off
mime_table c:/squid25/etc/mime.conf
log_mime_hdrs off
useragent_log c:/squid25/var/logs/useragent.log
pid_filename c:/squid25/var/logs/squid.pid
debug_options ALL,1
client_netmask 255.255.255.0ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck ondns_nameservers 195.131.52.130
dns_nameservers 194.8.160.90
diskd_program c:/squid25/libexec/diskd.exe
unlinkd_program c:/squid25/libexec/unlinkd.exe
pinger_program c:/squid25/libexec/pinger.exeauth_param ntlm program c:/squid25/libexec/ntlm_win32_auth.exe -v -a InetUsers
auth_param ntlm children 15
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 1 minutesrefresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_mgr 192.168.1.100
visible_hostname 192.168.1.100
unique_hostname 192.168.1.100memory_pools on
memory_pools_limit 5 MBicon_directory c:/squid25/share/icons
error_directory c:/squid25/share/errors/Englishacl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl adm src 192.168.1.50/255.255.255.255
acl net src 192.168.1.1-192.168.1.100/255.255.255.255acl multimedia urlpath_regex -i \.mp3$ \.mpeg$ \.avi$ \.mov$ \.mpg$
acl mult urlpath_regex -i \.swf$ \.zip$
delay_pools 2
delay_class 1 1
delay_class 2 1
delay_access 1 allow multimedia
delay_access 1 deny all
delay_access 2 allow mult
delay_access 2 deny all
delay_parameters 1 1200/1200
delay_parameters 1 15000/15000http_access allow manager adm
http_access allow net
http_reply_access allow net
icp_access allow net
miss_access allow net
miss_access deny all
http_access deny all
http_reply_access deny all# ignore_unknown_nameservers on
# ie_refresh on
Спасибо, keepver!
Твои замечания были весьма полезны.Сейчас Сквид заработал и все вроде бы замечательно :))
Осталась только одна проблема: все соединения Сквид пишет в лог как соединения с одного и того же Ай-Пи(192.168.1.0) независимо от того с какой машины идет обращение.Подскажите как сделать, чтобы обращения воспринимались правильно.
Вот текущий конфиг:
http_port 3128
icp_port 3130
htcp_port 4827cache_peer 195.131.89.19 parent 3128 0 default no-query
hierarchy_stoplist cgi-bin ?
cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95maximum_object_size 1024 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KBipcache_size 10240
ipcache_low 90
ipcache_high 95cache_dir ufs c:/squid25/var/cache 100 16 256
cache_access_log c:/squid25/var/logs/access.log
cache_log c:/squid25/var/logs/cache.log
cache_store_log c:/squid25/var/logs/store.logemulate_httpd_log off
mime_table c:/squid25/etc/mime.conf
log_mime_hdrs off
useragent_log c:/squid25/var/logs/useragent.log
pid_filename c:/squid25/var/logs/squid.pid
debug_options ALL,1
client_netmask 255.255.255.0ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck ondns_nameservers 195.131.52.130
dns_nameservers 194.8.160.90
diskd_program c:/squid25/libexec/diskd.exe
unlinkd_program c:/squid25/libexec/unlinkd.exe
pinger_program c:/squid25/libexec/pinger.exeauth_param ntlm program c:/squid25/libexec/ntlm_win32_auth.exe -v -a InetUsers
auth_param ntlm children 15
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 1 minutesrefresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_mgr 192.168.1.100
visible_hostname 192.168.1.100
unique_hostname 192.168.1.100memory_pools on
memory_pools_limit 5 MBicon_directory c:/squid25/share/icons
error_directory c:/squid25/share/errors/Englishacl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl adm src 192.168.1.50/255.255.255.255
acl net src 192.168.1.1-192.168.1.100/255.255.255.255acl multimedia urlpath_regex -i \.mp3$ \.mpeg$ \.avi$ \.mov$ \.mpg$
acl mult urlpath_regex -i \.swf$ \.zip$
delay_pools 2
delay_class 1 1
delay_class 2 1
delay_access 1 allow multimedia
delay_access 1 deny all
delay_access 2 allow mult
delay_access 2 deny all
delay_parameters 1 1200/1200
delay_parameters 1 15000/15000http_access allow manager adm
http_access allow net
http_reply_access allow net
icp_access allow net
miss_access allow net
miss_access deny all
http_access deny all
http_reply_access deny all# ignore_unknown_nameservers on
# ie_refresh onА вот кусок лог-файла(обращения шли с 192.168.1.5 и 192.168.1.2):
1041762499.156 210 192.168.1.0 TCP_MISS/200 935 GET http://top.list.ru/counter? - DIRECT/194.67.23.251 image/gif
1041762499.276 360 192.168.1.0 TCP_MISS/304 228 GET http://mmedia.ozon.ru/graphics/img_ass/88/oz_button_4.gif - DIRECT/194.186.100.21 -
1041762499.336 120 192.168.1.0 TCP_MISS/200 422 GET http://www.combats.ru/ch.pl? - DIRECT/217.106.235.236 text/html
1041762499.437 131 192.168.1.0 TCP_MISS/200 1085 GET http://counter.rambler.ru/top100.cnt? - DIRECT/81.19.66.19 image/gif
1041762499.597 591 192.168.1.0 TCP_MISS/200 1923 GET http://top.combats.ru/c.pl? - DIRECT/217.106.235.193 image/png
1041762499.697 200 192.168.1.0 TCP_MISS/200 271 GET http://www.clx.ru/pic.php? - DIRECT/217.106.231.254 text/htmlКак сделать так, чтобы в логе писался реальный адрес клиентской машины.
Заранее спасибо, Genius