Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /etc/squid/squid.conf
- #Хост и порт
- http_port 8080
- visible_hostname di
- #Отключаем Internet Cache Protocol
- icp_port 0
- #Отключаем кэширование негодных страниц
- acl donocache urlpath_regex cgi-bin user submit
- no_cache deny donocache
- #Объем быстрого кэша
- cache_mem 32 MB
- cache_dir ufs /var/spool/squid 1000 16 256
- #Логи
- cache_access_log /var/log/squid/access.log
- cache_log /var/log/squid/cache.log
- cache_store_log /var/log/squid/store.log
- #FTP
- ftp_user anonymous@
- ftp_list_width 32
- ftp_passive on
- ftp_sanitycheck on
- #Служебные ACL
- acl all src 0/0
- acl SMTP port 25
- #Кому доступен прокси
- acl doallow src 127.0.0.1/32 192.128.0.51/32 192.168.0.74/32 192.168.0.58/32 192.168.0.44/32 192.168.0.61/32 192.168.0.95/32 192.168.0.14/32 192.168.0.54/32 192.168.0.53/32 192.168.0.49/32 192.168.0.72/32 192.168.0.207/32
- #Cоздаем группы
- acl adm_group src 192.168.0.74/32
- acl nachalniki src 192.168.0.58/32 192.168.0.61/32 192.168.0.49/32
- acl technokad src 192.168.0.95/32 192.168.0.206/32
- acl workers src 192.168.0.72/32 192.168.0.53/32 192.168.0.44/32
- acl other src 192.168.0.85/32 192.168.0.43/32 192.168.0.41/32 192.168.0.11/32 192.168.0.14/32 192.168.0.54/32 192.168.0.207/32
- #Разрешенные порты
- acl Safe_ports port 80 8000 8080
- acl Safe_ports port 21 22 1701
- acl Safe_ports port 443 563 5190 5552 5222 5938
- acl Safe_ports port 777
- acl Safe_ports port 9080 9443
- acl CONNECT method CONNECT
- #Правила доступа
- http_access allow Safe_ports
- http_access deny SMTP
- http_access allow doallow
- http_access allow CONNECT adm_group
- http_access allow nachalniki
- http_access allow technokad
- http_access allow workers
- http_access allow other
- http_access deny all
- #Запретим ICP
- icp_access deny all
- #Попытка оптимизации
- reload_into_ims on
- refresh_pattern \.bz2$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.exe$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.gif$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.gz$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.ico$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.jpg$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.mid$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.mp3$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.pdf$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.swf$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.tar$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.tgz$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.zip$ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://ad\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://ads\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://adv\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://click\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://count\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://counter\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://engine\. 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://img\.readme\.ru 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern http://userpic\.livejournal\.com 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.ru/bf-analyze 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern \.ru/bf-si 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern /advs/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern /banners/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern /cgi-bin/iframe/ 43200 100% 43200 override-lastmod override-expire ignore-reload ignore-no-cache
- refresh_pattern ^ftp: 1440 20% 10080
- refresh_pattern ^gopher: 1440 0% 1440
- refresh_pattern . 0 80% 14400
- #Ограничения скорости (в байтах), канал на момент написания 1000000 байт\с (10 мбит)
- delay_pools 5
- delay_class 1 1
- delay_parameters 1 -1/-1
- delay_access 1 allow adm_group
- delay_access 1 deny all
- delay_class 2 2
- delay_parameters 2 150000/150000 50000/50000
- delay_access 2 allow nachalniki
- delay_access 2 deny all
- delay_class 3 2
- delay_parameters 3 150000/150000 75000/75000
- delay_access 3 allow technokad
- delay_access 3 deny all
- delay_class 4 2
- delay_parameters 4 180000/180000 60000/60000
- delay_access 4 allow workers
- delay_access 4 deny all
- delay_class 5 2
- delay_parameters 5 210000/210000 30000/30000
- delay_access 5 allow other
- delay_access 5 deny all
- iptables-save
- # Generated by iptables-save v1.4.8 on Fri Nov 2 15:37:30 2012
- *nat
- :PREROUTING ACCEPT [108289:5890293]
- :POSTROUTING ACCEPT [55278:4091321]
- :OUTPUT ACCEPT [55278:4091321]
- -A POSTROUTING -s 192.168.0.74/32 -o ppp0 -j SNAT --to-source 95.31.254.227
- COMMIT
- # Completed on Fri Nov 2 15:37:30 2012
- # Generated by iptables-save v1.4.8 on Fri Nov 2 15:37:30 2012
- *mangle
- :PREROUTING ACCEPT [2800076:1552978208]
- :INPUT ACCEPT [2794330:1551104229]
- :FORWARD ACCEPT [5130:1822215]
- :OUTPUT ACCEPT [3023730:1468386542]
- :POSTROUTING ACCEPT [3029098:1470243295]
- -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu
- COMMIT
- # Completed on Fri Nov 2 15:37:30 2012
- # Generated by iptables-save v1.4.8 on Fri Nov 2 15:37:30 2012
- *filter
- :INPUT ACCEPT [2705:550747]
- :FORWARD ACCEPT [0:0]
- :OUTPUT ACCEPT [1738:327639]
- -A INPUT -s 23.60.69.151/32 -j DROP
- -A INPUT -s 23.60.69.183/32 -j DROP
- -A INPUT -p tcp -m tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 15 --connlimit-mask 32 -j REJECT --reject-with icmp-port-unreachable
- -A INPUT -s 192.168.0.0/16 -p tcp -m tcp --dport 80 -j ACCEPT
- -A INPUT -p tcp -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachable
- COMMIT
- # Completed on Fri Nov 2 15:37:30 2012
- ifconfig
- ifconfig
- eth0 Link encap:Ethernet HWaddr 5c:d9:98:f5:96:c1
- inet addr:192.168.0.51 Bcast:192.168.0.255 Mask:255.255.255.0
- inet6 addr: fe80::5ed9:98ff:fef5:96c1/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:182097 errors:0 dropped:0 overruns:0 frame:0
- TX packets:212232 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:38120092 (36.3 MiB) TX bytes:205061769 (195.5 MiB)
- Interrupt:17 Base address:0xa000
- eth1 Link encap:Ethernet HWaddr 5c:d9:98:f5:a1:3e
- inet addr:10.97.15.232 Bcast:10.97.15.255 Mask:255.255.248.0
- inet6 addr: fe80::5ed9:98ff:fef5:a13e/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:5342712 errors:0 dropped:0 overruns:0 frame:0
- TX packets:6525265 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:3275009358 (3.0 GiB) TX bytes:3038030563 (2.8 GiB)
- Interrupt:18 Base address:0x4000
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:15166 errors:0 dropped:0 overruns:0 frame:0
- TX packets:15166 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:1809266 (1.7 MiB) TX bytes:1809266 (1.7 MiB)
- ppp0 Link encap:Point-to-Point Protocol
- inet addr:95.31.254.227 P-t-P:85.21.230.41 Mask:255.255.255.255
- UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1460 Metric:1
- RX packets:5284762 errors:0 dropped:0 overruns:0 frame:0
- TX packets:4695107 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:3
- RX bytes:2984729799 (2.7 GiB) TX bytes:2715287222 (2.5 GiB)
- route -n
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 85.21.230.41 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 85.21.230.41 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
- 85.21.192.3 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 85.21.72.83 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 85.21.52.254 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 85.21.79.12 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 195.14.50.26 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 89.179.135.67 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 213.234.192.8 10.97.8.1 255.255.255.255 UGH 0 0 0 eth1
- 85.21.34.0 10.97.8.1 255.255.255.240 UG 0 0 0 eth1
- 233.32.240.0 10.97.15.232 255.255.255.0 UG 0 0 0 eth1
- 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 85.21.90.0 10.97.8.1 255.255.255.0 UG 0 0 0 eth1
- 85.21.79.0 10.97.8.1 255.255.255.0 UG 0 0 0 eth1
- 10.97.8.0 0.0.0.0 255.255.248.0 U 0 0 0 eth1
- 85.21.0.0 10.97.8.1 255.255.0.0 UG 0 0 0 eth1
- 10.0.0.0 10.97.8.1 255.0.0.0 UG 0 0 0 eth1
- 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
Advertisement
Add Comment
Please, Sign In to add comment