[FreeBSD] squid ve transparency

2006-02-23 Başlik Mesut GÜLNAZ



firewall dan tüm port 80 isteklerini clientlar ile aynı ipye 
sahip bir server a yönlendirdim.
server üzerinde squid kuruluı ve çalışıyor.
clientlar ın proxy ayarlarını elle yaptığımda proxy den 
yararlanarak internete çıkıyorlar. ama elle ayarlamadan firewall dan 
yönlendirdiğim de istekler geliyor ama proxy internete çıkış yapmadan hemen 
cevap gönderiyor. neden anlayamadım.

squid üzerinde ipfw yüklü ve herhangi bir engelmeme yok. port 
yönlendirme de yok çünkü port zaten başka bir firewall tarafından 
yönlendiriliyor. tüm istekler squid in dinlediği porta geliyor.

kernel dosyası içeriğinin son satırları:
options IPFIREWALL options IPFIREWALL_VERBOSE options 
IPFIREWALL_FORWARDoptions IPDIVERToptions DUMMYNEToptions 
IPSTEALTHoptions IPFIREWALL_VERBOSE_LIMIT=100 options 
IPFIREWALL_DEFAULT_TO_ACCEPT options DUMMYNET #bandwith 
icin.#pseudo-device vlan 3 # IEEE 802.1Q VLAN Support

options SYSVMSGoptions 
MSGMNB=8192 # max # of bytes in a queueoptions 
MSGMNI=40 # number of 
message queue identifiersoptions 
MSGSEG=512 # number of message 
segments per queueoptions 
MSGSSZ=64 # size of a message 
segmentoptions MSGTQL=2048 # max messages in 
systemoptions SYSVSHMoptions 
SHMSEG=16 # max 
shared mem id's per processoptions 
SHMMNI=32 # max 
shared mem id's per systemoptions SHMMAX=2097152 # max shared memory 
segment size (bytes)options 
SHMALL=4096 # max amount of shared 


squid.conf dosyası:

http_port 3128visible_hostname 
proxy.mydomain.comhierarchy_stoplist cgi-bin ?acl QUERY urlpath_regex 
cgi-bin \?no_cache deny QUERYcache_mem 128 MBmaximum_object_size 512 
KBipcache_size 2048fqdncache_size 2048cache_dir ufs 
/usr/local/squid/cache 3072 60 312read_timeout 5 minutesrequest_timeout 
30 secondshalf_closed_clients offforwarded_for offauth_param basic 
children 5auth_param basic realm Squid proxy-caching web 
serverauth_param basic credentialsttl 2 hoursrefresh_pattern 
^ftp: 
1440 20% 10080refresh_pattern 
^gopher: 1440 
0% 1440refresh_pattern 
. 
0 20% 4320acl 
all src 0.0.0.0/0.0.0.0acl internet src 172.16.0.0/21acl nodownload 
urlpath_regex -i "/usr/local/etc/squid/nodownload" http_access deny 
nodownload acl DENYPAGE urlpath_regex Servletacl manager proto 
cache_objectacl localhost src 127.0.0.1/255.255.255.255acl to_localhost 
dst 127.0.0.0/8acl SSL_ports port 443 563acl Safe_ports port 
80 # httpacl 
Safe_ports port 21 # 
ftpacl Safe_ports port 443 563 # https, snewsacl 
Safe_ports port 70 # 
gopheracl Safe_ports port 
210 # waisacl Safe_ports 
port 1025-65535 # unregistered portsacl Safe_ports port 
280 # http-mgmtacl 
Safe_ports port 488 # 
gss-httpacl Safe_ports port 
591 # filemakeracl 
Safe_ports port 777 # multiling 
httpacl CONNECT method CONNECTno_cache deny DENYPAGEhttp_access 
allow internethttp_access allow manager localhosthttp_access deny 
managerhttp_access deny !Safe_portshttp_access deny CONNECT 
!SSL_portshttp_access allow localhosthttp_reply_access allow 
allhttp_access deny allicp_access allow allhttpd_accel_host 
virtualhttpd_accel_port 80httpd_accel_with_proxy 
onhttpd_accel_uses_host_header oncoredump_dir /usr/local/squid 
/error_directory /usr/local/etc/squid/errors/Turkishclient_db 
off#redirect_program /usr/local/bin/squidGuard#redirect_children 
10cache_effective_user squid cache_effective_group squidaccess_log 
/usr/local/squid/logs/access.log squid
---
[EMAIL PROTECTED]# ipfw 
show65535 240969 28785602 allow ip from any to any
[EMAIL PROTECTED]# egrep squid 
rc.conf squid_enable="YES"[EMAIL PROTECTED]# 
sockstat -l | grep squidsquid 
squid 903 5 udp4 
*:58934 
*:*squid squid 
903 12 tcp4 
*:3128 
*:*squid squid 
903 13 udp4 
*:3130 
*:*squid squid 
903 14 udp4 
*:4827 
*:*[EMAIL PROTECTED]# ps auxww 
| grep squidsquid 552 0.0 0.1 1660 
1116 ?? Ss 1:33PM 0:00.15 (pinger) 
(pinger)squid 709 0.0 0.1 1660 
1104 ?? Ss 2:17PM 0:00.13 (pinger) 
(pinger)squid 711 0.0 0.1 1660 
1104 ?? Ss 2:17PM 0:00.13 (pinger) 
(pinger)squid 746 0.0 0.1 1660 
1116 ?? Ss 2:18PM 0:00.16 (pinger) 
(pinger)squid 901 0.0 0.3 5552 
2804 ?? Is 3:09PM 0:00.01 
/usr/local/sbin/squid -Dsquid 903 0.0 1.0 
11472 9932 ?? S 3:09PM 
0:02.01 (squid) -D (squid)squid 904 0.0 0.1 
1272 596 ?? Is 3:09PM 
0:00.04 (unlinkd) (unlinkd)squid 905 0.0 0.1 
1660 1116 ?? Ss 3:09PM 0:00.11 
(pinger) (pinger)root 1094 0.0 0.1 
1316 688 p0 I 4:27PM 
0:00.01 tail -f /usr/local/squid/logs/access.logroot 1222 
0.0 0.1 1588 968 p2 S+ 
5:06PM 0:00.01 grep squid[EMAIL PROTECTED]# ls -l /var/db/pkg/ | grep 
squiddrwxr-xr-x 2 root wheel 512 
Feb 17 18:07 squid-2.5.12_4[EMAIL PROTECTED]# 


rc.conf içerisinde ipfw ile ilgili bir satır yok.

iyi çalışmalar


Re: [FreeBSD] squid ve transparency

2006-02-23 Başlik Mesut GÜLNAZ



bu arada ekleme yapmak istiyorum firewall dan yaptığım hedef 
port 80 olanları proxy in 3128 ine yönlendir komutuna proxy den gelen istekler 
dahil değildir. belirtmeyi unutmuşum.

bunun yanında messages çıktısını da eklemek 
istiyorum..
[EMAIL PROTECTED]# tail 
/var/log/messagesFeb 23 17:09:18 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 127.0.0.1:63264Feb 23 17:09:18 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052Feb 23 17:09:28 proxy 
kernel: Connection attempt to UDP 127.0.0.1:62062 from 127.0.0.1:65002Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 17:09:38 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 127.0.0.1:63264Feb 23 17:09:38 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052Feb 23 17:09:48 proxy 
kernel: Connection attempt to UDP 127.0.0.1:62062 from 127.0.0.1:65002Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 17:09:58 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 127.0.0.1:63264Feb 23 17:09:58 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052


bunlar nedir bilmiyorum..

  - Original Message - 
  From: 
  Mesut GÜLNAZ 
  
  To: freebsd@lists.enderunix.org 
  
  Sent: Thursday, February 23, 2006 5:08 
  PM
  Subject: [FreeBSD] squid ve 
  transparency
  
  firewall dan tüm port 80 isteklerini clientlar ile aynı ipye 
  sahip bir server a yönlendirdim.
  server üzerinde squid kuruluı ve çalışıyor.
  clientlar ın proxy ayarlarını elle yaptığımda proxy den 
  yararlanarak internete çıkıyorlar. ama elle ayarlamadan firewall dan 
  yönlendirdiğim de istekler geliyor ama proxy internete çıkış yapmadan hemen 
  cevap gönderiyor. neden anlayamadım.
  
  squid üzerinde ipfw yüklü ve herhangi bir engelmeme yok. 
  port yönlendirme de yok çünkü port zaten başka bir firewall tarafından 
  yönlendiriliyor. tüm istekler squid in dinlediği porta geliyor.
  
  kernel dosyası içeriğinin son satırları:
  options IPFIREWALL options IPFIREWALL_VERBOSE 
  options IPFIREWALL_FORWARDoptions IPDIVERToptions 
  DUMMYNEToptions IPSTEALTHoptions IPFIREWALL_VERBOSE_LIMIT=100 
  options IPFIREWALL_DEFAULT_TO_ACCEPT options DUMMYNET #bandwith 
  icin.#pseudo-device vlan 3 # IEEE 802.1Q VLAN Support
  
  options SYSVMSGoptions 
  MSGMNB=8192 # max # of bytes in a 
  queueoptions 
  MSGMNI=40 # number of 
  message queue identifiersoptions 
  MSGSEG=512 # number of message 
  segments per queueoptions 
  MSGSSZ=64 # size of a message 
  segmentoptions MSGTQL=2048 # max messages in 
  systemoptions SYSVSHMoptions 
  SHMSEG=16 # max 
  shared mem id's per processoptions 
  SHMMNI=32 # max 
  shared mem id's per systemoptions SHMMAX=2097152 # max shared memory 
  segment size (bytes)options 
  SHMALL=4096 # max amount of shared 
  
  
  squid.conf dosyası:
  
  http_port 3128visible_hostname 
  proxy.mydomain.comhierarchy_stoplist cgi-bin ?acl QUERY urlpath_regex 
  cgi-bin \?no_cache deny QUERYcache_mem 128 MBmaximum_object_size 
  512 KBipcache_size 2048fqdncache_size 2048cache_dir ufs 
  /usr/local/squid/cache 3072 60 312read_timeout 5 
  minutesrequest_timeout 30 secondshalf_closed_clients 
  offforwarded_for offauth_param basic children 5auth_param basic 
  realm Squid proxy-caching web serverauth_param basic credentialsttl 2 
  hoursrefresh_pattern 
  ^ftp: 
  1440 20% 10080refresh_pattern 
  ^gopher: 1440 
  0% 1440refresh_pattern 
  . 
  0 20% 4320acl 
  all src 0.0.0.0/0.0.0.0acl internet src 172.16.0.0/21acl nodownload 
  urlpath_regex -i "/usr/local/etc/squid/nodownload" http_access deny 
  nodownload acl DENYPAGE urlpath_regex Servletacl manager proto 
  cache_objectacl localhost src 127.0.0.1/255.255.255.255acl 
  to_localhost dst 127.0.0.0/8acl SSL_ports port 443 563acl Safe_ports 
  port 80 # httpacl 
  Safe_ports port 21 # 
  ftpacl Safe_ports port 443 563 # https, 
  snewsacl Safe_ports port 
  70 # gopheracl 
  Safe_ports port 210 # 
  waisacl Safe_ports port 1025-65535 # unregistered portsacl 
  Safe_ports port 280 # 
  http-mgmtacl Safe_ports port 
  488 # gss-httpacl 
  Safe_ports port 591 # 
  filemakeracl Safe_ports port 
  777 # multiling httpacl 
  CONNECT method CONNECTno_cache deny DENYPAGEhttp_access allow 
  internethttp_access allow manager localhosthttp_access deny 
  managerhttp_access deny !Safe_portshttp_access deny CONNECT 
  !SSL_portshttp_access allow localhosthttp_reply_access allow 
  allhttp_access deny allicp_access allow allhttpd_accel_host 
  virtualhttpd_accel_port 80httpd_accel_with_proxy 
  onhttpd_accel_uses_host_header oncoredump_dir /usr/local/squid 
  /error_directory /usr/local/etc/squid/errors/Turkishclient_db 
  off#redirect_program /usr/local/bin/squidGuard#redirect_children 
  10cache_effective_user squid cache_effective_group squidaccess_log 
  /usr/local/squid/logs/access

Re: [FreeBSD] squid ve transparency

2006-02-23 Başlik Huzeyfe Onal
Merhaba,firewall yonlendirme yaptiginda Squid makineye istek geliyor, Squid gidip internetten sayfayi aliyor geri gonderecegi zaman firewall uzerinden degil de direkt ic agdaki makineye yolluyor, icerideki makinede boyle bir cevap beklemedigi icin paket kabul edilmiyor.
Squid'i WCCP destegi ile kurarak calistirirsaniz sistem umdugunuz gibi calisacaktir..23.02.2006 tarihinde Mesut GÜLNAZ 
[EMAIL PROTECTED] yazmış:







bu arada ekleme yapmak istiyorum firewall dan yaptığım hedef 
port 80 olanları proxy in 3128 ine yönlendir komutuna proxy den gelen istekler 
dahil değildir. belirtmeyi unutmuşum.

bunun yanında messages çıktısını da eklemek 
istiyorum..
[EMAIL PROTECTED]# tail 
/var/log/messagesFeb 23 17:09:18 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 

127.0.0.1:63264Feb 23 17:09:18 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 

127.0.0.1:60052Feb 23 17:09:28 proxy 
kernel: Connection attempt to UDP 127.0.0.1:62062 from 

127.0.0.1:65002Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 17:09:38 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 

127.0.0.1:63264Feb 23 17:09:38 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 

127.0.0.1:60052Feb 23 17:09:48 proxy 
kernel: Connection attempt to UDP 127.0.0.1:62062 from 

127.0.0.1:65002Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 17:09:58 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 

127.0.0.1:63264Feb 23 17:09:58 proxy kernel: Connection 
attempt to UDP 127.0.0.1:55032 from 

127.0.0.1:60052


bunlar nedir bilmiyorum..

  - Original Message - 
  

From: 
  Mesut GÜLNAZ 
  
  To: 

freebsd@lists.enderunix.org 
  
  Sent: Thursday, February 23, 2006 5:08 
  PM
  Subject: [FreeBSD] squid ve 
  transparency
  
  firewall dan tüm port 80 isteklerini clientlar ile aynı ipye 
  sahip bir server a yönlendirdim.
  server üzerinde squid kuruluı ve çalışıyor.
  clientlar ın proxy ayarlarını elle yaptığımda proxy den 
  yararlanarak internete çıkıyorlar. ama elle ayarlamadan firewall dan 
  yönlendirdiğim de istekler geliyor ama proxy internete çıkış yapmadan hemen 
  cevap gönderiyor. neden anlayamadım.
  
  squid üzerinde ipfw yüklü ve herhangi bir engelmeme yok. 
  port yönlendirme de yok çünkü port zaten başka bir firewall tarafından 
  yönlendiriliyor. tüm istekler squid in dinlediği porta geliyor.
  
  kernel dosyası içeriğinin son satırları:
  options IPFIREWALL options IPFIREWALL_VERBOSE 
  options IPFIREWALL_FORWARDoptions IPDIVERToptions 
  DUMMYNEToptions IPSTEALTHoptions IPFIREWALL_VERBOSE_LIMIT=100 
  options IPFIREWALL_DEFAULT_TO_ACCEPT options DUMMYNET #bandwith 
  icin.#pseudo-device vlan 3 # IEEE 802.1Q VLAN Support
  
  options SYSVMSGoptions 
  MSGMNB=8192 # max # of bytes in a 
  queueoptions 
  MSGMNI=40 # number of 
  message queue identifiersoptions 
  MSGSEG=512 # number of message 
  segments per queueoptions 
  MSGSSZ=64 # size of a message 
  segmentoptions MSGTQL=2048 # max messages in 
  systemoptions SYSVSHMoptions 
  SHMSEG=16 # max 
  shared mem id's per processoptions 
  SHMMNI=32 # max 
  shared mem id's per systemoptions SHMMAX=2097152 # max shared memory 
  segment size (bytes)options 
  SHMALL=4096 # max amount of shared 
  
  
  squid.conf dosyası:
  
  http_port 3128visible_hostname 
  proxy.mydomain.comhierarchy_stoplist cgi-bin ?acl QUERY urlpath_regex 
  cgi-bin \?no_cache deny QUERYcache_mem 128 MBmaximum_object_size 
  512 KBipcache_size 2048fqdncache_size 2048cache_dir ufs 
  /usr/local/squid/cache 3072 60 312read_timeout 5 
  minutesrequest_timeout 30 secondshalf_closed_clients 
  offforwarded_for offauth_param basic children 5auth_param basic 
  realm Squid proxy-caching web serverauth_param basic credentialsttl 2 
  hoursrefresh_pattern 
  ^ftp: 
  1440 20% 10080refresh_pattern 
  ^gopher: 1440 
  0% 1440refresh_pattern 
  . 
  0 20% 4320acl 
  all src 0.0.0.0/0.0.0.0acl internet src 

172.16.0.0/21acl nodownload 
  urlpath_regex -i /usr/local/etc/squid/nodownload http_access deny 
  nodownload acl DENYPAGE urlpath_regex Servletacl manager proto 
  cache_objectacl localhost src 127.0.0.1/255.255.255.255acl 
  to_localhost dst 127.0.0.0/8acl SSL_ports port 443 563acl Safe_ports 
  port 80 # httpacl 
  Safe_ports port 21 # 
  ftpacl Safe_ports port 443 563 # https, 
  snewsacl Safe_ports port 
  70 # gopheracl 
  Safe_ports port 210 # 
  waisacl Safe_ports port 1025-65535 # unregistered portsacl 
  Safe_ports port 280 # 
  http-mgmtacl Safe_ports port 
  488 # gss-httpacl 
  Safe_ports port 591 # 
  filemakeracl Safe_ports port 
  777 # multiling httpacl 
  CONNECT method CONNECTno_cache deny DENYPAGEhttp_access allow 
  internethttp_access allow manager localhosthttp_access deny 
  managerhttp_access deny !Safe_portshttp_access deny CONNECT 
  !SSL_portshttp_access allow localhosthttp_reply_access allow 
  allhttp_access deny

Re: [FreeBSD] squid ve transparency

2006-02-23 Başlik Mesut GÜLNAZ



söz konusu squid kurulumunu 

[X] 
SQUID_WCCP 
Enable Web Cache Coordination Protocol

desteği ile gerçekleştirmiştim. belirtmek istediğim bir şey 
varki o da squid in access.log dosyasına firewall dan port 80yönlendirmesi 
yaptığımda herhangi bir giriş olmuyor. lakin dediğim gibi manuel olarak 
ayarladığımda access.log a kayıt girişi olmaktadır.

iyi çalışmalar...

- Original Message - 

  From: 
  Huzeyfe 
  Onal 
  To: freebsd@lists.enderunix.org 
  
  Sent: Thursday, February 23, 2006 9:00 
  PM
  Subject: Re: [FreeBSD] squid ve 
  transparency
  Merhaba,firewall yonlendirme yaptiginda Squid makineye 
  istek geliyor, Squid gidip internetten sayfayi aliyor geri gonderecegi zaman 
  firewall uzerinden degil de direkt ic agdaki makineye yolluyor, 
  icerideki makinede boyle bir cevap beklemedigi icin paket kabul edilmiyor. 
  Squid'i WCCP destegi ile kurarak calistirirsaniz sistem umdugunuz gibi 
  calisacaktir..
  23.02.2006 tarihinde Mesut GÜLNAZ  [EMAIL PROTECTED] 
  yazmış:
  
bu arada ekleme yapmak istiyorum firewall dan yaptığım 
hedef port 80 olanları proxy in 3128 ine yönlendir komutuna proxy den gelen 
istekler dahil değildir. belirtmeyi unutmuşum.

bunun yanında messages çıktısını da eklemek 
istiyorum..
[EMAIL PROTECTED]# tail 
/var/log/messagesFeb 23 17:09:18 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 127.0.0.1:63264Feb 23 
17:09:18 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:62062 from 127.0.0.1:65002Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 127.0.0.1:59879Feb 23 
17:09:38 proxy kernel: Connection attempt to UDP 127.0.0.1:52211 from 127.0.0.1:63264Feb 23 
17:09:38 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:62062 from 127.0.0.1:65002Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 127.0.0.1:59879Feb 23 
17:09:58 proxy kernel: Connection attempt to UDP 127.0.0.1:52211 from 127.0.0.1:63264Feb 23 
17:09:58 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 127.0.0.1:60052


bunlar nedir bilmiyorum..


  - 
  Original Message - 
  From: 
  Mesut GÜLNAZ 
  To: 
  freebsd@lists.enderunix.org 
  Sent: 
  Thursday, February 23, 2006 5:08 PM
  Subject: 
  [FreeBSD] squid ve transparency
  
  firewall dan tüm port 80 isteklerini clientlar ile aynı 
  ipye sahip bir server a yönlendirdim.
  server üzerinde squid kuruluı ve çalışıyor.
  clientlar ın proxy ayarlarını elle yaptığımda proxy den 
  yararlanarak internete çıkıyorlar. ama elle ayarlamadan firewall dan 
  yönlendirdiğim de istekler geliyor ama proxy internete çıkış yapmadan 
  hemen cevap gönderiyor. neden anlayamadım.
  
  squid üzerinde ipfw yüklü ve herhangi bir engelmeme yok. 
  port yönlendirme de yok çünkü port zaten başka bir firewall tarafından 
  yönlendiriliyor. tüm istekler squid in dinlediği porta 
  geliyor.
  
  kernel dosyası içeriğinin son satırları:
  options IPFIREWALL options IPFIREWALL_VERBOSE 
  options IPFIREWALL_FORWARDoptions IPDIVERToptions 
  DUMMYNEToptions IPSTEALTHoptions IPFIREWALL_VERBOSE_LIMIT=100 
  options IPFIREWALL_DEFAULT_TO_ACCEPT options DUMMYNET #bandwith 
  icin.#pseudo-device vlan 3 # IEEE 802.1Q VLAN Support
  
  options SYSVMSGoptions 
  MSGMNB=8192 # max # of bytes in a 
  queueoptions 
  MSGMNI=40 # number 
  of message queue identifiersoptions 
  MSGSEG=512 # number of message 
  segments per queueoptions 
  MSGSSZ=64 # size of a 
  message segmentoptions MSGTQL=2048 # max 
  messages in systemoptions SYSVSHMoptions 
  SHMSEG=16 # 
  max shared mem id's per processoptions 
  SHMMNI=32 # 
  max shared mem id's per systemoptions SHMMAX=2097152 # max 
  shared memory segment size (bytes)options 
  SHMALL=4096 # max amount of 
  shared 
  
  squid.conf dosyası:
  
  http_port 3128visible_hostname proxy.mydomain.comhierarchy_stoplist cgi-bin 
  ?acl QUERY urlpath_regex cgi-bin \?no_cache deny 
  QUERYcache_mem 128 MBmaximum_object_size 512 KBipcache_size 
  2048fqdncache_size 2048cache_dir ufs /usr/local/squid/cache 3072 
  60 312read_timeout 5 minutesrequest_timeout 30 
  secondshalf_closed_clients offforwarded_for offauth_param 
  basic children 5auth_param basic realm Squid proxy-caching web 
  serverauth_param basic credentialsttl 2 hoursrefresh_pattern 
  ^ftp: 
  1440 20% 
  10080refresh_pattern 
  ^gopher: 1440 
  0% 1440refresh_pattern 
  . 
  0 20% 
  4320acl all src 0.0.0.0/0.0.0.0acl 
  internet src 172.16.0.0/21acl

Re: [FreeBSD] squid ve transparency

2006-02-23 Başlik Huzeyfe Onal
Merhabalar,zaten WCCP'yi IPFW ile yapamazsiniz, Cisco bir switch/router olmali. Orayi kacirmisim ben. Bu secenegi gecersek her uc sistemin ayni agda oldugu bu yapi icin asagidaki gibi bir duzenek gelistirilebilir;
Internete giden 80 port istekleri ! proxy'den gelmiyorsa Proxy'ye 3128/TCP'ye yonlendir.Proxy'e giden paketleri Firewall'in ic bacagi ile NAT yap.Bu yapinin calismasi lazim, benzer bir yapiyi kullaniyorum tek farki, Proxy'yi farkli bir agda calistiriyorum.
24.02.2006 tarihinde Mesut GÜLNAZ [EMAIL PROTECTED] yazmış:







söz konusu squid kurulumunu 

[X] 
SQUID_WCCP 
Enable Web Cache Coordination Protocol

desteği ile gerçekleştirmiştim. belirtmek istediğim bir şey 
varki o da squid in access.log dosyasına firewall dan port 80yönlendirmesi 
yaptığımda herhangi bir giriş olmuyor. lakin dediğim gibi manuel olarak 
ayarladığımda access.log a kayıt girişi olmaktadır.

iyi çalışmalar...

- Original Message - 

  
From: 
  Huzeyfe 
  Onal 
  To: 
freebsd@lists.enderunix.org 
  
  Sent: Thursday, February 23, 2006 9:00 
  PM
  Subject: Re: [FreeBSD] squid ve 
  transparency
  Merhaba,firewall yonlendirme yaptiginda Squid makineye 
  istek geliyor, Squid gidip internetten sayfayi aliyor geri gonderecegi zaman 
  firewall uzerinden degil de direkt ic agdaki makineye yolluyor, 
  icerideki makinede boyle bir cevap beklemedigi icin paket kabul edilmiyor. 
  Squid'i WCCP destegi ile kurarak calistirirsaniz sistem umdugunuz gibi 
  calisacaktir..
  23.02.2006 tarihinde Mesut GÜLNAZ  [EMAIL PROTECTED]
 
  yazmış:
  
bu arada ekleme yapmak istiyorum firewall dan yaptığım 
hedef port 80 olanları proxy in 3128 ine yönlendir komutuna proxy den gelen 
istekler dahil değildir. belirtmeyi unutmuşum.

bunun yanında messages çıktısını da eklemek 
istiyorum..
[EMAIL PROTECTED]# tail 
/var/log/messagesFeb 23 17:09:18 proxy kernel: Connection attempt to UDP 
127.0.0.1:52211 from 
127.0.0.1:63264Feb 23 
17:09:18 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 
127.0.0.1:60052Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:62062 from 
127.0.0.1:65002Feb 23 
17:09:28 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 
17:09:38 proxy kernel: Connection attempt to UDP 127.0.0.1:52211 from 
127.0.0.1:63264Feb 23 
17:09:38 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 
127.0.0.1:60052Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:62062 from 
127.0.0.1:65002Feb 23 
17:09:48 proxy kernel: Connection attempt to UDP 127.0.0.1:55408 from 
127.0.0.1:59879Feb 23 
17:09:58 proxy kernel: Connection attempt to UDP 127.0.0.1:52211 from 
127.0.0.1:63264Feb 23 
17:09:58 proxy kernel: Connection attempt to UDP 127.0.0.1:55032 from 
127.0.0.1:60052


bunlar nedir bilmiyorum..


  - 
  Original Message - 
  
From: 
  Mesut GÜLNAZ 
  To: 
  freebsd@lists.enderunix.org 
  Sent: 
  Thursday, February 23, 2006 5:08 PM
  Subject: 
  [FreeBSD] squid ve transparency
  
  firewall dan tüm port 80 isteklerini clientlar ile aynı 
  ipye sahip bir server a yönlendirdim.
  server üzerinde squid kuruluı ve çalışıyor.
  clientlar ın proxy ayarlarını elle yaptığımda proxy den 
  yararlanarak internete çıkıyorlar. ama elle ayarlamadan firewall dan 
  yönlendirdiğim de istekler geliyor ama proxy internete çıkış yapmadan 
  hemen cevap gönderiyor. neden anlayamadım.
  
  squid üzerinde ipfw yüklü ve herhangi bir engelmeme yok. 
  port yönlendirme de yok çünkü port zaten başka bir firewall tarafından 
  yönlendiriliyor. tüm istekler squid in dinlediği porta 
  geliyor.
  
  kernel dosyası içeriğinin son satırları:
  options IPFIREWALL options IPFIREWALL_VERBOSE 
  options IPFIREWALL_FORWARDoptions IPDIVERToptions 
  DUMMYNEToptions IPSTEALTHoptions IPFIREWALL_VERBOSE_LIMIT=100 
  options IPFIREWALL_DEFAULT_TO_ACCEPT options DUMMYNET #bandwith 
  icin.#pseudo-device vlan 3 # IEEE 802.1Q VLAN Support
  
  options SYSVMSGoptions 
  MSGMNB=8192 # max # of bytes in a 
  queueoptions 
  MSGMNI=40 # number 
  of message queue identifiersoptions 
  MSGSEG=512 # number of message 
  segments per queueoptions 
  MSGSSZ=64 # size of a 
  message segmentoptions MSGTQL=2048 # max 
  messages in systemoptions SYSVSHMoptions 
  SHMSEG=16 # 
  max shared mem id's per processoptions 
  SHMMNI=32 # 
  max shared mem id's per systemoptions SHMMAX=2097152 # max 
  shared memory segment size (bytes)options 
  SHMALL=4096 # max amount of 
  shared 
  
  squid.conf dosyası:
  
  http_port 3128visible_hostname proxy.mydomain.comhierarchy_stoplist cgi-bin 
  ?acl QUERY urlpath_regex cgi-bin \?no_cache deny 
  QUERYcache_mem 128 MBmaximum_object_size 512 KBipcache_size

Re: [FreeBSD] squid ve transparency

2006-02-23 Başlik Mesut GÜLNAZ



şu şekilde bir kural yapısında dediğinizi gerçekleştirmeye 
çalıştım
84 ipsi squid in ipsi. 80 ise bir client. firewall openbsd ve 
pf.

root# pfctl -s all | grep 172.16.0.84 no rdr on sk1 
inet proto tcp from 172.16.0.84 to any port = wwwrdr on sk1 inet proto tcp 
from 172.16.0.80 to any port = www - 172.16.0.84 port 3128pass in log 
quick on sk1 inet proto tcp from 172.16.0.84 to any port = www keep state label 
"2"self tcp 172.16.0.84:3128 - 66.102.9.104:80 - 
172.16.0.80:1954 CLOSED:SYN_SENTself tcp 
172.16.0.84:3128 - 65.54.168.250:80 - 
172.16.0.80:1956 CLOSED:SYN_SENTself tcp 
172.16.0.84:3128 - 65.54.168.250:80 - 
172.16.0.80:1957 
CLOSED:SYN_SENT
squidden alınan ilgili tcpdump çıktıları ise şu 
şekilde:

00:09:6b:47:a8:64  00:90:27:3f:15:5d, ethertype IPv4 
(0x0800), length 60: IP (tos 0x0, ttl 128, id 55165, offset 0, flags [none], 
length: 40) 172.16.0.80.1953  172.16.0.84.3128: R [tcp sum ok] 
1849008494:1849008494(0) win 000:00:5a:9d:4a:78  00:90:27:3f:15:5d, 
ethertype IPv4 (0x0800), length 62: IP (tos 0x0, ttl 127, id 55167, offset 0, 
flags [none], length: 48) 172.16.0.80.1953  172.16.0.84.3128: S [tcp sum ok] 
1849008493:1849008493(0) win 65535 mss 
1460,nop,nop,sackOK00:90:27:3f:15:5d  00:09:6b:47:a8:64, ethertype 
IPv4 (0x0800), length 62: IP (tos 0x0, ttl 64, id 62114, offset 0, flags 
[DF], length: 48) 172.16.0.84.3128  172.16.0.80.1953: S [tcp sum ok] 
1451729512:1451729512(0) ack 1849008494 win 65535 mss 
1460,nop,nop,sackOK00:09:6b:47:a8:64  00:90:27:3f:15:5d, ethertype 
IPv4 (0x0800), length 60: IP (tos 0x0, ttl 128, id 55168, offset 0, flags 
[none], length: 40) 172.16.0.80.1953  172.16.0.84.3128: R [tcp sum ok] 
1849008494:1849008494(0) win 000:00:5a:9d:4a:78  00:90:27:3f:15:5d, 
ethertype IPv4 (0x0800), length 62: IP (tos 0x0, ttl 127, id 55175, offset 0, 
flags [none], length: 48) 172.16.0.80.1953  172.16.0.84.3128: S [tcp sum ok] 
1849008493:1849008493(0) win 65535 mss 
1460,nop,nop,sackOK00:90:27:3f:15:5d  00:09:6b:47:a8:64, ethertype 
IPv4 (0x0800), length 62: IP (tos 0x0, ttl 64, id 62124, offset 0, flags 
[DF], length: 48) 172.16.0.84.3128  172.16.0.80.1953: S [tcp sum ok] 
207399004:207399004(0) ack 1849008494 win 65535 mss 
1460,nop,nop,sackOK00:09:6b:47:a8:64  00:90:27:3f:15:5d, ethertype 
IPv4 (0x0800), length 60: IP (tos 0x0, ttl 128, id 55176, offset 0, flags 
[none], length: 40) 172.16.0.80.1953  172.16.0.84.3128: R [tcp sum ok] 
1849008494:1849008494(0) win 0

dediğiniz NAT işlemini gerçekleştirmeden bu bir fikir 
verebilir mi? bunun yanında squid den client ın yaptığı google a ulaşmak için 
herhangi bir istekin çıkmadığı dikkatimi çekiyor. yani 172.16.0.84 ip si google 
ulaşmak için herhangi bir istekte bulunmuyor. keep state kullandığım için pflog 
a da herhangi bir request düşmüyor. acaba nerde yanlış yapıyorum.

kolay gelsin...

  - Original Message - 
  From: 
  Huzeyfe 
  Onal 
  To: freebsd@lists.enderunix.org 
  
  Sent: Friday, February 24, 2006 8:52 
  AM
  Subject: Re: [FreeBSD] squid ve 
  transparency
  Merhabalar,zaten WCCP'yi IPFW ile 
  yapamazsiniz, Cisco bir switch/router olmali. Orayi kacirmisim ben. Bu 
  secenegi gecersek her uc sistemin ayni agda oldugu bu yapi icin asagidaki gibi 
  bir duzenek gelistirilebilir;
  
Internete giden 80 port istekleri ! proxy'den gelmiyorsa Proxy'ye 
3128/TCP'ye yonlendir.
Proxy'e giden paketleri Firewall'in ic bacagi ile NAT yap.Bu 
  yapinin calismasi lazim, benzer bir yapiyi kullaniyorum tek farki, Proxy'yi 
  farkli bir agda calistiriyorum. 
  24.02.2006 tarihinde Mesut GÜLNAZ [EMAIL PROTECTED] yazmış:
  
söz konusu squid kurulumunu 

[X] 
SQUID_WCCP 
Enable Web Cache Coordination Protocol

desteği ile gerçekleştirmiştim. belirtmek istediğim bir 
şey varki o da squid in access.log dosyasına firewall dan port 
80yönlendirmesi yaptığımda herhangi bir giriş olmuyor. lakin dediğim 
gibi manuel olarak ayarladığımda access.log a kayıt girişi 
olmaktadır.

iyi çalışmalar...

- Original Message - 

  From: 
  Huzeyfe Onal 
  To: 
  freebsd@lists.enderunix.org 
  
  Sent: 
  Thursday, February 23, 2006 9:00 PM
  Subject: 
  Re: [FreeBSD] squid ve transparency
  Merhaba,firewall yonlendirme yaptiginda Squid 
  makineye istek geliyor, Squid gidip internetten sayfayi aliyor geri 
  gonderecegi zaman firewall uzerinden degil de direkt ic agdaki 
  makineye yolluyor, icerideki makinede boyle bir cevap beklemedigi icin 
  paket kabul edilmiyor. Squid'i WCCP destegi ile kurarak calistirirsaniz 
  sistem umdugunuz gibi calisacaktir..
  23.02.2006 tarihinde Mesut GÜLNAZ  [EMAIL PROTECTED] 
   yazmış: 
  
bu arada ekleme yapmak istiyorum firewall dan yaptığım 
hedef port 80 olanları proxy in 3128 ine yönlendir komutuna proxy den 
gelen istekler dahil değildir. belirtmeyi unutmuşum.

bunun yanında messages çı