مشکل در استارت اسکویید پس از طی مراحل زیر لطفا راهنمایی کنید
yum install squid
بعد فولدر ساختن و دادن دسترسی
mkdir /cache
chown -v 777 /cache
to ye
/var/log
mkdir /var/log/squid
chown -v 777 /var/log/squid
بعد
vi /etc/squid/squid.conf
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
cache_dir aufs /var/spool/squid 8192 32 512
log_fqdn off
debug_options ALL,1
refresh_pattern ^ftp: 2880 25% 10080
refresh_pattern ^gopher: 2880 0% 2880
refresh_pattern -i \.(htmx|xhtml|sxml|shtml|java|aspx|perl)$ 5760 60% 10080 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(do|asp|css|php|xml|ocx|html|chtml|phtml)$ 5760 60% 10080 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(jpg|jpe|aac|jpeg|gif|png|bmp|pic)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(mpg|mpeg|mov|avi|midi|wmv|asx|thm)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(mid|wav|mp[234]|rm|ra|ram|wma|au)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(css|js|jar|class|pdf|doc|swf|txt)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(exe|tgz|tbz|tar|gz|bz2|zip|rar|cab)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(xbm|thb|dcr|art|spl|viv|z|vrm|vrml)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(jpg|jpe|aac|jpeg|gif|png|bmp|pic)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(aif|aifc|aiff|arj|c|cpt|dir|dxr|hqx)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(lha|lzh|movie|mpe|mpga|pl|ppt|ps|qt)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern -i \.(qtm|ras|sea|sit|tif|tiff|js|jsp|fla)$ 20160 95% 99000 ignore-reload override-expire override-lastmod
refresh_pattern http://*.windowsupdate.microsoft.com/ 300 60% 20160
refresh_pattern Microsoft Windows Update 300 60% 20160
refresh_pattern http://download.macromedia.com/ 300 60% 20160
refresh_pattern Microsoft Download Center 300 60% 20160
refresh_pattern Office - Microsoft Office 300 60% 20160
refresh_pattern http://wxpsp2.microsoft.com/ 300 60% 20160
refresh_pattern IBM Support and downloads 300 60% 20160
refresh_pattern http://w2ksp4.microsoft.com/ 300 60% 20160
refresh_pattern http://xpsp1.microsoft.com/ 300 60% 20160
refresh_pattern ftp://ftp.nai.com/ 300 60% 20160
refresh_pattern . 300 50% 4320
negative_ttl 5 minutes
positive_dns_ttl 24 hours
negative_dns_ttl 1 minute
cache_mgr admin@hajiWashington.com
cache_mem 128 MB
maximum_object_size 20 MB
cache_replacement_policy heap LFUDA
cache_swap_low 90
cache_swap_high 95
maximum_object_size_in_memory 50 KB
logfile_rotate 10
memory_pools off
quick_abort_min 0 KB
quick_abort_max 0 KB
log_icp_queries off
client_db off
half_closed_clients off
pid_filename /var/run/squid.pid
error_directory /etc/squid/errors
cache_log /dev/null
cache_store_log /dev/null
acl manager proto cache_object
#access_log /var/log/squid/access.log squid
acl all src 0.0.0.0/0.0.0.0
acl lan src 192.168.169.0/255.255.255.0
acl wan src 2x.x.x.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access allow localhost
http_access allow lan
http_access allow wan
http_access deny all
icp_access allow lan
icp_access allow wan
http_reply_access allow lan
http_reply_access allow wan
visible_hostname hajiWashington
logfile_rotate 2
strip_query_terms off
cache_effective_user squid
squid -z
در این فایل زدم
/etc/rc.d/rc.local
iptables -A PREROUTING -p tcp -t nat -d [ip cache server] --dport 3128 -j DROP
iptables -A PREROUTING -p tcp -t nat -s 10.169.254.0/24 --dport 80 -j REDIRECT --to 3128
iptables -A PREROUTING -p tcp -t nat --dport 80 -j DROP
بعد
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
# iptables -P INPUT ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -P FORWARD ACCEPT
vi /etc/squid/squid.conf
chkconfig squid on
/etc/init.d/squid startOutput:
در ایجا هم زدم
/etc/sysctl.conf
net.ipv4.ip_forward = 1
هر بلایی بگین سرش اوردم نمی دونم چرا اوکی نمیشه قبلا یه بار زده بودم خیلی راحت اوکی شد الان 3 روزه هر کار می کنم اوکی نمیشه
خیلی اذیتم می کنه لطفا کمکمممممممممممم کنید
version 2.7 squid
version 2.7 squid
موضوعات مشابه:
- عدم دسترسی به شبکه داخلی و قطع شدن اینترنت پس از برقراری و پ ن
- عدم شناسایی کارت شبکه پس از نصب asterisk
- کارهایی که پس از نفوذ باید انجام داد ؟
- کارایی اسکویید به عنوان پراکسی سرور