نوشته اصلی توسط
jalal95
من از دستور
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128
استفاده كردم اما خطاي زير را داد ايا دستور iptables براي اسكوئيد 3 كار نميكنه جايگزين اون چيه؟
ببخشيد يادم رفت پيغام خطا را بزارم اينم پيغام خطا
[
کد:
root@localhost ~]# service squid start
2009/07/21 14:35:12| Processing Configuration File: /etc/squid/squid.conf (depth 0)
2009/07/21 14:35:12| cache_cf.cc(346) squid.conf:63 unrecognized: 'iptables'
2009/07/21 14:35:12| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/07/21 14:35:12| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/07/21 14:35:12| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
اينم كانفيگ اسكوئيد
کد:
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:"Liberation Serif"; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"DejaVu Sans"; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"DejaVu Sans Mono"; mso-font-alt:"MS Gothic"; mso-font-charset:0; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:none; mso-hyphenate:none; font-size:12.0pt; font-family:"Liberation Serif","serif"; mso-fareast-font-family:"DejaVu Sans"; mso-bidi-font-family:"Times New Roman"; mso-fareast-language:#00FF;} p.PreformattedText, li.PreformattedText, div.PreformattedText {mso-style-name:"Preformatted Text"; mso-style-unhide:no; margin:0in; margin-bottom:.0001pt; mso-pagination:none; mso-hyphenate:none; font-size:10.0pt; font-family:"DejaVu Sans Mono"; mso-fareast-font-family:"DejaVu Sans Mono"; mso-bidi-font-family:"DejaVu Sans Mono"; mso-fareast-language:#00FF;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:56.7pt 56.7pt 56.7pt 56.7pt; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1; mso-footnote-position:beneath-text;} -->
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 http://download.macromedia.com/ 300 60% 20160
refresh_pattern http://office.microsoft.com/ 300 60% 20160
refresh_pattern http://wxpsp2.microsoft.com/ 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 sisbom@yahoo.com
cache_mem 32 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
access_log /var/log/squid/access.log squid
acl manager proto cache_object
#
acl lan src 85.185.8.64/255.255.255.224
#
acl allnet src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
iptables -t nat -A PREROUTING -s 85.185.8.66/24 -p tcp --dport 80 -j REDIRECT --to-port 3128
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
#
acl WinUpdate dstdomain au.download.windowsupdate.com
acl WinUpdate dstdomain download.windowsupdate.com
acl WinUpdate dstdomain windowsmedia.com
#
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 deny WinUpdate
http_access allow lan
http_access deny all
icp_access allow lan
http_reply_access allow all
visible_hostname SmartISPBilling
logfile_rotate 2
strip_query_terms off
cache_effective_user squid