เปิดรับสมัครสมาชิก webboard ตามปกติแล้วครับ

ผู้เขียน หัวข้อ: squid 3.1.3 ของ clearOS ไม่เก็บ ip client ครับ  (อ่าน 6873 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ kenjung

  • ปี 1 เทอม 2
  • ***
  • กระทู้: 15
  • Reputation: 0
squid 3.1.3 ของ clearOS ไม่เก็บ ip client ครับ
« เมื่อ: กรกฎาคม 28, 2011, 04:20:57 am »
รบกวนขอคำแนะนำด้วยครับ squid 3.1.3 ของ clearos ไม่เก็บ IP เครื่อง client ที่ท่องเว็บครับ ไม่ทราบว่าผมต้องเพิ่มเติมส่วนใหนครับ
ไม่มีความรู้ในเรื่อง squid มากพอครับ ขอบคุณครับ ตัวอย่าง squid ของผมครับ หยิบมาจากใน board ครับ
http_access allow webconfig_lan
http_access allow localhost
# Squid 3.1.3 configuration  by Mr.Somlith Phouangmany (Network Administrator)
# This file is executed by the Squid on stop/start/restart/status.
# ClearOS & Clarkconnect squid modifly configuration by Somlith 16-April-2011 For Free

http_port 3128 transparent no-connection-auth
icp_port 0
icp_query_timeout 0
mcast_icp_query_timeout 2000
dead_peer_timeout 10 seconds

cache_dir aufs /var/spool/squid 1024 16 256
error_directory /usr/share/squid/errors/th
logformat common %{%m-%d-%Y %H:%M:%S}tl %>a %Ss/%03>Hs %rm %ru %un %Sh/%<A %mt
cache_access_log  /var/log/squid/access.log common

cache_store_log none
logfile_rotate 90
pid_filename /var/run/squid.pid

ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
negative_ttl 2 minutes
positive_dns_ttl 60 seconds
negative_dns_ttl 30 seconds
forward_timeout 5 minutes
connect_timeout 5 minutes
peer_connect_timeout 1 minutes
pconn_timeout 120 seconds

read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 2 minute
shutdown_lifetime 10 seconds
client_lifetime 1 day
half_closed_clients off
ie_refresh on
coredump_dir /var/spool/squid

acl manager proto cache_object
acl localhost src 127.0.0.0/8
# webconfig: acl_start
acl webconfig_lan src 192.168.0.0/16 10.0.0.0/8
acl webconfig_to_lan dst 192.168.0.0/16 10.0.0.0/8
# webconfig: acl_end
follow_x_forwarded_for allow localhost



acl to_localhost dst 127.0.0.0/8
acl somlith src 10.0.0.0/8 172.16.0.0/12 192.168.100.0/32
acl all_port port 1-65535
acl connect method connect

# Block Bit and uTorrent

acl bit url_regex -i .*announce passkey downloadzip.php dlzip.php \.torrrent$ \.torrent announce http://tracker passkey= info_hash
http_access deny bit

# ----- Acl Controls
acl SSL_ports port 443      # https
acl SSL_ports port 563      # snews
acl SSL_ports port 873      # rsync
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 631      # cups
acl Safe_ports port 873      # rsync
acl Safe_ports port 901      # SWAT
acl CONNECT method CONNECT
http_access allow somlith
http_access allow manager localhost
http_access deny manager
http_access allow webconfig_to_lan
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
icp_access allow somlith
icp_access allow all

acl SSL method CONNECT
never_direct allow SSL

url_rewrite_children 20
acl youtube_query url_regex -i \.youtube\.com\/get_video
acl metacafe_query dstdomain v.mccont.com www.reddragon88.net
acl dailymotion_query url_regex -i proxy\-[0-9][0-9]\.dailymotion\.com\/
acl google_query dstdomain vp.video.google.com
acl redtube_query dstdomain dl.redtube.com
acl xtube_query url_regex -i p[0-9a-z][0-9a-z]?[0-9a-z]?\.xtube\.com\/videos
acl vimeo_query url_regex bitcast\.vimeo\.com\/vimeo\/videos\/
acl wrzuta_query url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]?
url_rewrite_access allow youtube_query
url_rewrite_access allow metacafe_query
url_rewrite_access allow dailymotion_query
url_rewrite_access allow google_query
url_rewrite_access allow redtube_query
url_rewrite_access allow xtube_query
url_rewrite_access allow vimeo_query
url_rewrite_access allow wrzuta_query
redirector_bypass on

acl store_rewrite_list url_regex ^http://(.*?)/get_video\?
acl store_rewrite_list url_regex ^http://(.*?)/videodownload\?
acl store_rewrite_list url_regex ^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\?
acl store_rewrite_list url_regex ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\?

cache allow store_rewrite_list
cache allow all

# ----- No Cache -------

acl NOCACHE url_regex cgi-bin [^z]\? photos[1-9] \.D$ \.ini$ \.dll$ \.inf$ \.Xt \.xtp \.daf \.bmp \.txt \.id \.html \.htm Loader\.exe 1st$ update.cfg\? urlinfo\.ini$ updatelist notice_popup ProjectG.exe.zip$ start/ucg UCG\.DAT$ UCGA?\.exe$ version\.cfg$ \.xml$ \.ver version_list\.dat SFrame\.exe version_list\.* version\.* version.ini patchfile.lst configupdate we.exe version\.*cache
cache deny NOCACHE

# ----- Administrative Parameters

cache_mgr [email protected] Phouangmany
cache_effective_user squid
cache_effective_group squid
visible_hostname [email protected]

memory_pools on
memory_pools_limit 50 MB
forwarded_for on
client_db on
netdb_low 9900
netdb_high 10000
pipeline_prefetch on
balance_on_multiple_ip on
reload_into_ims on
vary_ignore_expire on

cache_mem 64 MB
maximum_object_size 20 MB
maximum_object_size_in_memory 512 KB
cache_swap_low 90
cache_swap_high 98
ipcache_size 4096
ipcache_low 90
ipcache_high 98
fqdncache_size 4096
client_netmask 255.255.255.255
ftp_passive on
ftp_sanitycheck on
dns_nameservers 127.0.0.1

cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

# ----- Delay Pools
#acl limitdown1 url_regex -i .mp3 .ogg .wav .wma .3gp .avi .mov .mp4 .mpeg .mpg .wma .mkv .divx .vob .iso .nrg .torrent .flv
#acl limitdown2 url_regex -i .zip .rar .7z .exe .msi

#delay_pools 3

#delay_class 1 2  #
#delay_parameters 1 102400/102400 102400/102400
#delay_access 1 allow limitdown1
#delay_access 1 deny all

#delay_class 2 2
#delay_parameters 2 102400/102400 102400/102400
#delay_access 2 allow limitdown2
#delay_access 2 deny all

#delay_class 3 1
#delay_parameters 3 -1/-1
#delay_access 3 allow localhost

# ----- refresh_pattern--------

refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videodownload\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\? 43200 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\? 43200 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
refresh_pattern ^http://sjl-v[0-9]+\.sjl\.youtube\.com 10080 90% 999999 ignore-no-cache override-expire ignore-private

refresh_pattern -i (html|htm|/)$  0 20% 720
refresh_pattern -i (asp\?|php\?)  0 20% 720
refresh_pattern -i (asp|php)$  0 20% 720
refresh_pattern \.(exe|zip|gz|arj|lha|lzh|rar|tgz|tar|Z)$ 4320 80% 43200 override-lastmod reload-into-ims ignore-reload
refresh_pattern ^http://update.cabal.* 43200 100% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://download.cabal.* 43200 100% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://patch.sf.* 43200 100% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://trdownload.in.th 43200 100% 432000 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://cbt.patch.easportsfifaonline2.in.th/.* 43200 100% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://patch.dekaron.in.th/* 43200 90% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://61.90.199.12.*/.* 43200 90% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://202.43.33.122/ 43200 20% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://202.43.34.11 43200 100% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^http://202.43.34.110/patch/  43200 90% 43200 ignore-reload override-lastmod reload-into-ims override-expire ignore-no-cache ignore-private
refresh_pattern ^gopher://.*\.*$ 0 20% 1440
refresh_pattern ^http://.*\.*$ 0 20% 1440
refresh_pattern ^ftp://.*\.*$ 0 20% 1440
refresh_pattern ^ftp: 0 20% 1440
refresh_pattern ^gopher: 0 0% 1440
refresh_pattern . 0 20% 1440
# webconfig: http_port_start
# webconfig: http_port_end


เพิ่มในส่วนใหนถึงจะสามารถเก็บ ip client ลง log squid ได้ คับ  ^^!!!
Signature cleanned by Admin

ออฟไลน์ bethofen

  • มือใหม่
  • *
  • กระทู้: 4
  • Reputation: 0
Re: squid 3.1.3 ของ clearOS ไม่เก็บ ip client ครับ
« ตอบกลับ #1 เมื่อ: สิงหาคม 10, 2011, 07:41:10 am »
ลองแก้ตรงนี้ครับ

cache_mem 64 MB
maximum_object_size 20 MB
maximum_object_size_in_memory 512 KB
cache_swap_low 90
cache_swap_high 98
ipcache_size 4096
ipcache_low 90
ipcache_high 98
fqdncache_size 4096
client_netmask 255.255.255.255 <<<<<< เปลี่ยนเป็น 255.255.255.0 ครับ
ftp_passive on
ftp_sanitycheck on
dns_nameservers 127.0.0.1

ออฟไลน์ kenjung

  • ปี 1 เทอม 2
  • ***
  • กระทู้: 15
  • Reputation: 0
Re: squid 3.1.3 ของ clearOS ไม่เก็บ ip client ครับ
« ตอบกลับ #2 เมื่อ: สิงหาคม 15, 2011, 11:11:49 am »
ระบบก็ยังไม่เก็บ ip client เหมือนเดิม ครับ
08-15-2011 18:06:51 :: TCP_MISS/200 POST http://resolver1.axigen.ctmail.com/SpamResolverNG/SpamResolverNG.dll? - DIRECT/134.159.159.80 text/html

พอมีวิธีแก้แบบอื่นมั๊ยครับ
Signature cleanned by Admin

ออฟไลน์ nattha_wat

  • สอบภาคทฤษฎี
  • *
  • กระทู้: 5
  • Reputation: 0
Re: squid 3.1.3 ของ clearOS ไม่เก็บ ip client ครับ
« ตอบกลับ #3 เมื่อ: มกราคม 09, 2012, 11:38:49 am »
client_netmask 255.255.255.255 /255.255.255.0 <<<<<< เปลี่ยนเป็น 255.255.255.0 ครับ