The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  вход/выход  слежка  RSS
"squid и проблема tcp_miss/302"
Вариант для распечатки  
Пред. тема | След. тема 
Форум Настройка Squid и других прокси серверов (Учет работы пользователей, логи)
Изначальное сообщение [ Отслеживать ]

"squid и проблема tcp_miss/302"  +/
Сообщение от djeg email(ok) on 05-Июн-14, 16:05 
ОС RHEL 6
Squid Cache: Version 3.1.10 configure options: '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-internal-dns' '--disable-strict-error-checking' '--exec_prefix=/usr' '--libexecdir=/usr/lib64/squid' '--localstatedir=/var' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid' '--with-logdir=$(localstatedir)/log/squid' '--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking' '--enable-arp-acl' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL,DB,POP3,squid_radius_auth' '--enable-ntlm-auth-helpers=smb_lm,no_check,fakeauth' '--enable-digest-auth-helpers=password,ldap,eDirectory' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups' '--enable-linux-netfilter' '--enable-referer-log' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-storeio=aufs,diskd,ufs' '--enable-useragent-log' '--enable-wccpv2' '--enable-esi' '--with-aio' '--with-default-user=squid' '--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpie' 'LDFLAGS=-pie' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpie' --with-squid=/builddir/build/BUILD/squid-3.1.10

[root@xxx squid]# cat squid.conf
auth_param basic program /usr/lib64/squid/squid_ldap_auth -d -R -D xxx@xxx.kz -w xxx -b «dc=xxx,dc=kz» -f sAMAccountName=%s -d xxx.xxx.kz xxx.xxx.kz
auth_param basic children 5
auth_param basic realm xxx.KZ

external_acl_type ldapg children=5 %LOGIN /usr/lib64/squid/squid_ldap_group -d -R -b «dc=xxx,dc=kz» -f "(&(sAMAccountName=%v)(memberOf=CN=%a,OU=Service-DIT,DC=xxx,DC=kz))" -D xxx@xxx.kz -w xxx -K -h xxx.xxx.kz xxx.xxx.kz

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443 60001 8180 8643 8888
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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 a
cl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
cl Safe_ports port 777 # multiling http
acl Safe_ports port 60001 8180 8643 8888 # NUC

acl CONNECT method CONNECT
acl POST method POST
acl GET method GET
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#http_access deny to_localhost
acl auth proxy_auth REQUIRED
acl proxy_ldap external ldapg proxyldap
http_access allow proxy_ldap
http_access allow proxy_ldap CONNECT SSL_ports
#http_access allow localnet
#http_access allow localnet CONNECT SSL_ports
http_access allow localhost
http_access deny !auth all
#http_access allow auth
http_access deny all

http_port 3128
hierarchy_stoplist cgi-bin ?
#cache_dir ufs /var/spool/squid 100 16 256
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

как видно из конфига сквид работает с авторизацией керберос в АД.

прокся тестовая, но на продуктивах в отличие от тестового есть еще ACL с блокировкой по сайтам.

проблема в том что и на тестовом и продуктивном прокси у многих пользователей не открывается сайт http://hh.kz

вот что пишет в логах когда на этот сайт подключаюсь я:
1401966755.556 491 xxx.xxx.xxx.xxx TCP_MISS/200 53041 GET http://hh.kz/ super_user DIRECT/178.88.114.118 text/html
1401966755.922 125 xxx.xxx.xxx.xxx TCP_MISS/200 435 GET http://hhcdn.ru/pv super_user DIRECT/94.124.200.82 text/javascript
1401966756.035 58 xxx.xxx.xxx.xxx TCP_MISS/200 436 GET http://hhcdn.ru/pv super_user DIRECT/94.124.200.82 text/javascript

вот что пишет когда подключается пользователь: 1401966979.350 170 ууу.ууу.ууу.ууу TCP_MISS/302 561 GET http://hh.kz/ just_user DIRECT/178.88.114.118 text/html
1401966986.242 57 ууу.ууу.ууу.ууу TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ just_user DIRECT/94.124.200.81 text/plain
1401966993.306 164 ууу.ууу.ууу.ууу TCP_MISS/302 374 GET http://hh.kz/hhid/bind just_user DIRECT/178.88.114.118 text/plain
1401967000.300 149 ууу.ууу.ууу.ууу TCP_MISS/302 561 GET http://hh.kz/ just_user DIRECT/178.88.114.118 text/html
1401967007.222 57 ууу.ууу.ууу.ууу TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ just_user DIRECT/94.124.200.81 text/plain

пробовали у разных юзеров в разных браузерах, проблема везде одинаковая. загрузка висит и обрывается. что странно у меня доступ есть, хотя как видно из конфига, он у меня такой же как у всех юзеров. кеш у себя и пользователей чистился неоднократно. Сам прокси не кеширующий. Может быть настройки браузера?

уже не знаю что делать, помогите разобраться с проблемой.

Ответить | Правка | Cообщить модератору

Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "squid и проблема tcp_miss/302"  +/
Сообщение от Ninjatrasher (ok) on 05-Июн-14, 16:39 
>[оверквотинг удален]
> 1401967000.300 149 ууу.ууу.ууу.ууу TCP_MISS/302 561 GET http://hh.kz/ just_user DIRECT/178.88.114.118
> text/html
> 1401967007.222 57 ууу.ууу.ууу.ууу TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/
> just_user DIRECT/94.124.200.81 text/plain
> пробовали у разных юзеров в разных браузерах, проблема везде одинаковая. загрузка висит
> и обрывается. что странно у меня доступ есть, хотя как видно
> из конфига, он у меня такой же как у всех юзеров.
> кеш у себя и пользователей чистился неоднократно. Сам прокси не кеширующий.
> Может быть настройки браузера?
> уже не знаю что делать, помогите разобраться с проблемой.

хм... а если попробовать указать сквиду acl hh dest hh.kz
и потом прописать http_access allow hh?

Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

2. "squid и проблема tcp_miss/302"  +/
Сообщение от asavah (ok) on 05-Июн-14, 23:23 
>хотя как видно из конфига, он у меня такой же как у всех юзеров

хмм но разница то на лице.

попробовать убрать
acl auth proxy_auth REQUIRED
acl proxy_ldap external ldapg proxyldap
http_access allow proxy_ldap
http_access allow proxy_ldap CONNECT SSL_ports

и сделать для проверки
http_access allow localnet
http_access allow localnet CONNECT SSL_ports

если проблема исчезнет - пинать LDAP итд.
так же может помочь:
cache deny all

так же стоит обратить внимание на антитвари/брандмауеры/прочую прелесть.

разница между super_user и just_user где то есть, убивайте/исключайте звенья по одному.

Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

3. "squid и проблема tcp_miss/302"  +/
Сообщение от djeg email(ok) on 06-Июн-14, 08:24 
[root@proxy07 squid]# squid -N -d9
2014/06/06 10:13:10| Starting Squid Cache version 3.1.10 for x86_64-redhat-linux-gnu...
2014/06/06 10:13:10| Process ID 1935
2014/06/06 10:13:10| With 1024 file descriptors available
2014/06/06 10:13:10| Initializing IP Cache...
2014/06/06 10:13:10| DNS Socket created at [::], FD 5
2014/06/06 10:13:10| DNS Socket created at 0.0.0.0, FD 6
2014/06/06 10:13:10| Adding domain tsb.kz from /etc/resolv.conf
2014/06/06 10:13:10| Adding nameserver 10.159.7.34 from /etc/resolv.conf
2014/06/06 10:13:10| Adding nameserver 10.159.4.2 from /etc/resolv.conf
2014/06/06 10:13:10| User-Agent logging is disabled.
2014/06/06 10:13:10| Referer logging is disabled.
2014/06/06 10:13:10| Unlinkd pipe opened on FD 11
2014/06/06 10:13:10| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2014/06/06 10:13:10| Store logging disabled
2014/06/06 10:13:10| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2014/06/06 10:13:10| Target number of buckets: 1008
2014/06/06 10:13:10| Using 8192 Store buckets
2014/06/06 10:13:10| Max Mem  size: 262144 KB
2014/06/06 10:13:10| Max Swap size: 0 KB
2014/06/06 10:13:10| Using Least Load store dir selection
2014/06/06 10:13:10| Set Current Directory to /var/spool/squid
2014/06/06 10:13:10| Loaded Icons.
2014/06/06 10:13:10| Accepting  HTTP connections at [::]:3128, FD 12.
2014/06/06 10:13:10| HTCP Disabled.
2014/06/06 10:13:10| Squid plugin modules loaded: 0
2014/06/06 10:13:10| Adaptation support is off.
2014/06/06 10:13:10| Ready to serve requests.
2014/06/06 10:13:11| storeLateRelease: released 0 objects


acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl SSL_ports port 443 60001 8180 8643 8888
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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 Safe_ports port 60001 8180 8643 8888 # NUC
acl CONNECT method CONNECT
acl POST method POST
acl GET method GET
acl hh dst 178.88.114.118
acl hhid dst 94.124.200.81
acl hhcdn dst 94.124.200.82
acl hhid_url url_regex -i hhid\.ru
acl hh_url url_regex -i hh\.kz
acl hhcdn_url url_regex -i hhcdn\.ru

http_access allow manager localhost
http_access deny manager
http_access allow hh_url
http_access allow hh
http_access allow hhid_url
http_access allow hhid
http_access allow hhcdn
http_access allow hhid_url
http_access allow all
http_access allow hh_url hh hhid_url hhid hhcdn hhid_url CONNECT SSL_ports
http_access allow hh_url hh hhid_url hhid hhcdn hhid_url POST Safe_ports
http_access allow hh_url hh hhid_url hhid hhcdn hhid_url  GET Safe_ports
http_access allow all CONNECT SSL_ports
http_access allow localhost
cache deny hh
cache deny hh_url
cache deny hhid
cache deny hhid_url
cache deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid
refresh_pattern ^ftp:         &n... 1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320


это то, что осталось от конфига теперь

так же пробовались следующие варианты:
1.
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl SSL_ports port 443 60001 8180 8643 8888
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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 Safe_ports port 60001 8180 8643 8888 # NUC
acl CONNECT method CONNECT
acl POST method POST
acl GET method GET

http_access allow manager localhost
http_access deny manager
http_access allow all
http_access allow all CONNECT SSL_ports
http_access allow localhost
cache deny all

http_port 3128
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid
refresh_pattern ^ftp:         &n... 1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320

2.
http_access allow manager localhost
http_access deny manager
http_access allow all
http_access allow all CONNECT SSL_ports
http_access allow localhost

3.
acl CONNECT method CONNECT
acl POST method POST
acl GET method GET
acl hh dst 178.88.114.118
acl hhid dst 94.124.200.81
acl hhcdn dst 94.124.200.82


http_access allow manager localhost
http_access deny manager
http_access allow hh
http_access allow hhid
http_access allow hhcdn
http_access allow all CONNECT SSL_ports
http_access allow localhost
cache deny hh
cache deny hhid
cache deny hhcdn

etc.......

[root@proxy07 squid]# cat /etc/resolv.conf
search xxx.kz
nameserver 10.159.7.34
nameserver 10.159.4.2

nslookup hh.kz
Server:         10.159.7.34
Address:        10.159.7.34#53

Non-authoritative answer:
Name:   hh.kz
Address: 178.88.114.118


логи:
мои:
1402028008.497    726  TCP_MISS/200 53058 GET http://hh.kz/ - DIRECT/178.88.114.118 text/html
1402028008.838    178  TCP_MISS/200 435 GET http://hhcdn.ru/pv? - DIRECT/94.124.200.82 text/javascript
1402028008.946    114  TCP_MISS/200 436 GET http://hhcdn.ru/pv? - DIRECT/94.124.200.82 text/javascript
1402028009.055    132 1 TCP_MISS/200 1096 GET http://go.youlamedia.com/sjs.php? - DIRECT/95.213.130.123 text/javascript
1402028009.074    119  TCP_MISS/200 390 GET http://counter.yadro.ru/hit;HH_KZ? - DIRECT/88.212.196.103 image/gif
1402028009.077    145  TCP_MISS/304 341 GET http://stats.g.doubleclick.net/dc.js - DIRECT/173.194.71.154 -
1402028009.126     65  TCP_MISS/200 1096 GET http://go.youlamedia.com/sjs.php? - DIRECT/95.213.130.123 text/javascript
1402028009.132    164  TCP_MISS/200 1205 GET http://dc.cb.b4.a0.top.mail.ru/counter? - DIRECT/217.69.133.145 image/gif
1402028009.240    107  TCP_MISS/302 685 GET http://www.tns-counter.ru/V13a***R%3E*hh_ru/ru/UTF-8/tmsec=hh_total/359842899 - DIRECT/217.73.200.221 image/gif
1402028009.256    170  TCP_MISS/200 2737 GET http://counter.rambler.ru/top100.scn? - DIRECT/81.19.88.80 image/gif
1402028009.317     71  TCP_MISS/200 1823 GET http://go.youlamedia.com/ajs.php? - DIRECT/95.213.130.123 text/javascript
1402028009.362    118  TCP_MISS/200 390 GET http://counter.yadro.ru/hit;HeadHunter? - DIRECT/88.212.196.103 image/gif
1402028009.414    168 1 TCP_MISS/200 661 GET http://a.adwolf.ru/getCode? - DIRECT/109.235.208.56 text/html
1402028009.429    166  TCP_MISS/200 1825 GET http://go.youlamedia.com/ajs.php? - DIRECT/95.213.130.123 text/javascript
1402028009.452    112  TCP_MISS/200 510 GET http://www.tns-counter.ru/V13b***R%3E*hh_ru/ru/UTF-8/tmsec=hh_total/359842899 - DIRECT/217.73.200.221 image/gif
1402028009.554    120  TCP_MISS/304 309 GET http://www.google-analytics.com/plugins/ga/inpage_linkid.js - DIRECT/89.218.72.114 -
1402028009.633     57  TCP_MISS/200 640 GET http://go.youlamedia.com/lg.php? - DIRECT/95.213.130.123 image/gif
1402028009.704     56  TCP_MISS/200 683 GET http://go.youlamedia.com/lg.php? - DIRECT/95.213.130.123 image/gif
1402028009.776    201  TCP_MISS/302 506 GET http://mygpuid.com/? - DIRECT/78.140.152.178 text/html
1402028009.821     71  TCP_MISS/200 550 GET http://stats.g.doubleclick.net/__utm.gif? - DIRECT/173.194.71.154 image/gif
1402028009.857    284  TCP_MISS/200 20575 GET http://pagead2.googlesyndication.com/pagead/show_ads.js - DIRECT/173.194.32.173 text/javascript
1402028009.906     57  TCP_MISS/200 457 GET http://go.youlamedia.com/? - DIRECT/95.213.130.123 image/gif
1402028009.926    143  TCP_MISS/200 550 GET http://stats.g.doubleclick.net/__utm.gif? - DIRECT/173.194.71.154 image/gif
1402028010.600    395  TCP_MISS/302 1213 GET http://googleads.g.doubleclick.net/pagead/ads? - DIRECT/173.194.32.185 text/html
1402028010.604    347  TCP_MISS/302 1213 GET http://googleads.g.doubleclick.net/pagead/ads? - DIRECT/173.194.32.185 text/html
1402028010.812     57  TCP_MISS/200 1286 GET http://go.youlamedia.com/ac.php? - DIRECT/95.213.130.123 text/html
1402028010.823     68  TCP_MISS/200 1286 GET http://go.youlamedia.com/ac.php? - DIRECT/95.213.130.123 text/html
1402028010.909     57  TCP_MISS/200 480 GET http://hhcdn.ru/pv? - DIRECT/94.124.200.82 text/javascript
1402028010.931     57  TCP_MISS/200 435 GET http://hhcdn.ru/pv? - DIRECT/94.124.200.82 text/javascript
1402028011.002     71  TCP_MISS/200 703 GET http://go.youlamedia.com/lg.php? - DIRECT/95.213.130.123 image/gif
1402028011.027     59  TCP_MISS/200 703 GET http://go.youlamedia.com/lg.php? - DIRECT/95.213.130.123 image/gif


пользователя:

1402027540.784    117  TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ - DIRECT/94.124.200.81 text/plain
1402027547.822    166  TCP_MISS/302 374 GET http://hh.kz/hhid/bind? - DIRECT/178.88.114.118 text/plain
1402027554.829    161 TCP_MISS/302 561 GET http://hh.kz/ - DIRECT/178.88.114.118 text/html
1402027561.718     55  TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ - DIRECT/94.124.200.81 text/plain
1402027568.861    150  TCP_MISS/302 374 GET http://hh.kz/hhid/bind? - DIRECT/178.88.114.118 text/plain
1402027575.815    156  TCP_MISS/302 561 GET http://hh.kz/ - DIRECT/178.88.114.118 text/html
1402027582.762     55  TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ - DIRECT/94.124.200.81 text/plain
1402027589.820    150  TCP_MISS/302 374 GET http://hh.kz/hhid/bind? - DIRECT/178.88.114.118 text/plain
1402027596.925    208  TCP_MISS/302 561 GET http://hh.kz/ - DIRECT/178.88.114.118 text/html
1402027603.735     56  TCP_MISS/302 533 GET http://hhid.ru/validate/;http;hh.kz;80;/ - DIRECT/94.124.200.81 text/plain

Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

4. "squid и проблема tcp_miss/302"  +/
Сообщение от djeg email(ok) on 06-Июн-14, 08:35 
нашла решение!

>http_access allow all CONNECT Safe_ports

добавила эту строчку и доступ появился, теперь нужно определить конкретный порт из всех Safe_ports

найду порт, отпишу сюда.

Ответить | Правка | ^ к родителю #3 | Наверх | Cообщить модератору

5. "squid и проблема tcp_miss/302"  +/
Сообщение от djeg email(ok) on 12-Июн-14, 15:17 
нашли все таки решение
оказывается веб шилд блочил сайт


Ответить | Правка | ^ к родителю #4 | Наверх | Cообщить модератору

6. "squid и проблема tcp_miss/302"  +/
Сообщение от djeg email(ok) on 12-Июн-14, 15:18 
> нашли все таки решение
> оказывается веб шилд блочил сайт

а настройки сквида вернула на прежние. т.е. убрала дырку с сэйф портами

Ответить | Правка | ^ к родителю #5 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру