لطفا وارد شوید یا ثبت‌نام کنید تا به انجمن‌ها دسترسی کامل داشته باشید.



 
امتياز موضوع :
  • 0 رأي - معدل امتيازات : 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشکل در squid 2.7
2009-06-22, 12:57 PM,
ارسال : #1
مشکل در squid 2.7
از squid 2.7 stable استفاده می‌کنم
Ubuntu server 9.04
این هم فایل Squid

کد :
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
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 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 purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
#############################################################
##Servers 192.168.5.1    192.168.5.7
acl Servers src 192.168.5.1/32
acl Servers src 192.168.5.2/31
acl Servers src 192.168.5.4/30

##IT1        192.168.5.9        192.168.5.22
acl IT1        src 192.168.5.8/29
acl IT1     src 192.168.5.16/30
acl IT1     src 192.168.5.20/31
acl IT1     src 192.168.5.22/32

##IT2         192.168.5.23    192.168.5.29
acl IT2     src 192.168.5.23/32
acl IT2     src 192.168.5.24/30
acl IT2     src 192.168.5.28/31

##Boodjeh     192.168.5.30    192.168.5.40
acl Boodjeh     src 192.168.5.30/31
acl Boodjeh     src 192.168.5.32/29
acl Boodjeh     src 192.168.5.40/32

##Pazhohesh    192.168.5.41    192.168.5.49
acl Pazhohesh     src 192.168.5.41/32
acl Pazhohesh     src 192.168.5.42/31
acl Pazhohesh     src 192.168.5.44/30
acl Pazhohesh     src 192.168.5.48/31


##Edari        192.168.5.90    192.168.5.100
acl Edari         src 192.168.5.90/31
acl Edari        src 192.168.5.92/30
acl Edari        src 192.168.5.96/30
acl Edari        src 192.168.5.100/32

##Bazargani        192.168.5.101    192.168.5.139
acl Bazargani     src 192.168.5.101/32
acl Bazargani     src 192.168.5.102/31
acl Bazargani     src 192.168.5.104/29
acl Bazargani     src 192.168.5.112/28
acl Bazargani     src 192.168.5.128/29
acl Bazargani     src 192.168.5.136/30



##Civil            192.168.5.140    192.168.5.199
acl Civil         src 192.168.5.140/30
acl Civil         src 192.168.5.144/28
acl Civil         src 192.168.5.160/27
acl Civil         src 192.168.5.192/29

##TRANSPARENT PROXY
##httpd_accel_host virtual
##httpd_accel_port 80
##httpd_accel_with_proxy on
##httpd_accel_uses_host_header on

http_port 3128 transparent
always_direct allow all

coredump_dir /var/spool/squid


http_access allow Servers
http_access allow Boodjeh
http_access allow Pazhohesh
http_access allow Edari
http_access allow Bazargani
http_access allow Civil

delay_pools 2
delay_class 1 1
delay_parameters 1 32000/64000
delay_access 1 allow Boodjeh
delay_access 1 allow Pazhohesh
delay_access 1 allow Edari
delay_access 1 allow Bazargani
delay_access 1 allow Civil
delay_access 1 deny all

delay_class 2 1
delay_parameters 2 32000/2048000
delay_access 1 allow IT1
delay_access 2 deny all
#############################################################
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 8080
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log 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 apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid

اما کلاینت‌ها این پیغام را دریافت می‌کنند:

The requested URL could not be retrieved

کسی می‌داند مشکل کجاست؟
جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ
2009-06-23, 07:26 AM,
ارسال : #2
پاسخ: مشکل در squid 2.7
شما تنظیمات iptables مربوط به redirect کردن ترافیک و transparent proxy رو انجام دادید؟

Don't bother, we're using GNU/Linux everywhere, even there Big Grin
Linuxmotto
گروه کاربران لینوکس اصفهان
مشاهده تارنمای کاربر جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ
2009-06-24, 06:53 AM,
ارسال : #3
پاسخ: مشکل در squid 2.7
بله این هم اسکریپت iptables من:
#!/bin/sh
IPTABLES=/sbin/iptables
$IPTABLES -F

$IPTABLES -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
$IPTABLES -A POSTROUTING -t nat -o ppp0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward
echo Starting Internet Connection Sharing...
جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ
2009-06-24, 09:53 PM,
ارسال : #4
پاسخ: مشکل در squid 2.7
اینو بخونید: http://www.cyberciti.biz/tips/linux-setu...howto.html.
کامله.
اینم مثال‌هایی از تنظیمات Squid:
http://wiki.squid-cache.org/ConfigExamples
جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ
2009-06-27, 06:47 AM,
ارسال : #5
پاسخ: مشکل در squid 2.7
لینکی که ارسال کرده اید مربوط به squid 2.6 است و در squid 2.7 بخش transparent proxy تغییر کرده است...
فکر می‌کنم مشکلم دقیقا همین حا باشد در Transparent proxy، چون وقتی با پروکسی کار می‌کنم هیچ مشکلی وجود ندارد.
جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ
2009-08-29, 07:20 AM,
ارسال : #6
پاسخ: مشکل در squid 2.7
کد :
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1
acl SSL_ports port 443
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 CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl networks src 192.168.246.0/24
http_access allow networks
http_access allow localhost
http_access deny all
icp_access deny all
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
cache_mem 128 MB
cache_dir aufs /cache 4096  16 256
maximum_object_size 12 MB
negative_ttl 3 minutes
positive_dns_ttl 15 hours
cache_mgr Dark
visible_hostname Cache
httpd_accel_no_pmtu_disc on
pipeline_prefetch on

لحظه ای پاک بزرگ دل به دریا زد و رفت
مشاهده تارنمای کاربر جستجوی تمامی ارسال های کاربر
نقل قول این ارسال در یک پاسخ


رفتن به انجمن :


کاربران در حال مشاهده موضوع : 1 مهمان