/l3/users/14-08-2009/nt-lnet/debian14.net.nt/root :1 |
|
# /usr/sbin/squid-reports
bash: /usr/sbin/squid-reports: No such file or directory |
#vim /etc/def
|
#vim /etc/squid/
|
#vim /etc/squid/sarg.conf
--- /tmp/l3-saved-1632.10492.12601 2009-08-14 20:05:35.000000000 +0300 +++ /etc/squid/sarg.conf 2009-08-14 20:06:26.000000000 +0300 @@ -26,7 +26,7 @@ # Spanish # Turkish # -language English +language Russian_koi8 # TAG: access_log file # Where is the access.log file |
#vim /etc/squid/sarg.hosts
|
#vim /etc/squid/sarg.user
|
#vim /etc/squid/sarg.users
|
#vim /etc/squid/sarg.
|
#/etc/init.d/s
screen-cleanup single ssh stop-bootlogd-single sysklogd sendsigs squid stop-bootlogd sudo |
#/etc/init.d/s
|
#vim /etc/squid/sarg.conf
|
#less /var/log/squid/access.log
|
#ssh 192.168.16.254 'xm create debianN N=6'
The authenticity of host '192.168.16.254 (192.168.16.254)' can't be established. RSA key fingerprint is 90:7f:6c:4f:4c:b3:6c:3a:73:79:4d:77:f2:82:51:64. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.254' (RSA) to the list of known hosts. root@192.168.16.254's password: Using config file "/etc/xen/debianN". Error: Domain 'debian6' already exists with ID '68' |
#ping 192.168.16.6
PING 192.168.16.6 (192.168.16.6) 56(84) bytes of data. 64 bytes from 192.168.16.6: icmp_seq=1 ttl=64 time=0.509 ms 64 bytes from 192.168.16.6: icmp_seq=2 ttl=64 time=0.147 ms --- 192.168.16.6 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.147/0.328/0.509/0.181 ms |
#nc 192.168.16.6:0
192.168.16.6:0: forward host lookup failed: Unknown host |
#nc 192.168.16.6 5900
(UNKNOWN) [192.168.16.6] 5900 (?) : Connection refused |
#apt-cache search torrent
aria2 - High speed download utility azureus - BitTorrent client bittornado - bittorrent client with enhanced curses interface bittornado-gui - bittorrent client with enhanced GUI interface bittorrent - Scatter-gather network file transfer bittorrent-gui - Scatter-gather network file transfer (GUI files) cfv - versatile file checksum creator and verifier democracyplayer - GTK+ based RSS video aggregator democracyplayer-data - GTK+ based RSS video aggregator data files freeloader - A nice GNOME download manager supporting torrents ... libtorrent9 - a C++ BitTorrent library libtorrent9-dev - a C++ BitTorrent library (development files) mldonkey-server - Door to the 'donkey' network php4-apache2-mod-bt - PHP bindings for mod_bt php5-apache2-mod-bt - PHP bindings for mod_bt podracer - podcast aggregator/downloader qtorrent - graphical BitTorrent client using Qt 3.x rtorrent - ncurses BitTorrent client based on LibTorrent tcllib - the Standard Tcl Library transmission - free, lightweight BitTorrent client |
#ssh 192.168.16.254
root@192.168.16.254's password: |
#exit
[root@hostA:~]# /etc/init.d/gdm restart Stopping GNOME Display Manager: gdm. Starting GNOME Display Manager: gdm. exit Connection to 192.168.16.6 closed. |
#apt-cache search torrent
aria2 - High speed download utility azureus - BitTorrent client bittornado - bittorrent client with enhanced curses interface bittornado-gui - bittorrent client with enhanced GUI interface bittorrent - Scatter-gather network file transfer bittorrent-gui - Scatter-gather network file transfer (GUI files) cfv - versatile file checksum creator and verifier democracyplayer - GTK+ based RSS video aggregator democracyplayer-data - GTK+ based RSS video aggregator data files freeloader - A nice GNOME download manager supporting torrents ... libtorrent9 - a C++ BitTorrent library libtorrent9-dev - a C++ BitTorrent library (development files) mldonkey-server - Door to the 'donkey' network php4-apache2-mod-bt - PHP bindings for mod_bt php5-apache2-mod-bt - PHP bindings for mod_bt podracer - podcast aggregator/downloader qtorrent - graphical BitTorrent client using Qt 3.x rtorrent - ncurses BitTorrent client based on LibTorrent tcllib - the Standard Tcl Library transmission - free, lightweight BitTorrent client |
#apt-get install bittorrent-gui
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово Будут установлены следующие дополнительные пакеты: bittorrent esound-common libaudiofile0 libesd0 libwxbase2.6-0 libwxgtk2.6-0 python-central python-support python-wxgtk2.6 python-wxversion Предлагаемые пакеты: esound libgnomeprintui2.2-0 wx2.6-doc wx2.6-examples python-xml Рекомендуемые пакеты: esound-clients НОВЫЕ пакеты, которые будут установлены: ... Настраивается пакет bittorrent (3.4.2-10) ... Starting BitTorrent tracker: disabled in /etc/default/bittorrent. Настраивается пакет python-wxversion (2.6.3.2.1.5) ... Настраивается пакет libwxbase2.6-0 (2.6.3.2.1.5) ... Настраивается пакет libaudiofile0 (0.2.6-6) ... Настраивается пакет esound-common (0.2.36-3) ... Настраивается пакет libesd0 (0.2.36-3) ... Настраивается пакет libwxgtk2.6-0 (2.6.3.2.1.5) ... Настраивается пакет python-wxgtk2.6 (2.6.3.2.1.5) ... Настраивается пакет bittorrent-gui (3.4.2-10) ... |
#whereis bittorent
bittorent: |
#whereis bittorent-gui
bittorent-gui: |
#dpkg -L
/. /usr /usr/share /usr/share/doc /usr/share/doc/bittorrent-gui /usr/share/doc/bittorrent-gui/copyright /usr/share/doc/bittorrent-gui/changelog.Debian.gz /usr/share/man /usr/share/man/man1 /usr/share/man/man1/btcompletedirgui.bittorrent.1.gz /usr/lib /usr/lib/mime /usr/lib/mime/packages /usr/lib/mime/packages/bittorrent-gui /usr/bin /usr/bin/btcompletedirgui.bittorrent /usr/bin/btdownloadgui.bittorrent /usr/share/man/man1/btdownloadgui.bittorrent.1.gz |
#vim /etc/squid/squid.conf
--- /tmp/l3-saved-1632.24059.14294 2009-08-14 20:57:19.000000000 +0300 +++ /etc/squid/squid.conf 2009-08-14 20:58:25.000000000 +0300 @@ -2576,6 +2576,11 @@ # be allowed #acl our_networks src 192.168.1.0/24 192.168.2.0/24 #http_access allow our_networks + + +acl torrent browser "/etc/squid/browser.txt" +http_access deny torrent + acl our_net src 192.168.16.0/24 http_access allow our_net http_access allow localhost |
#grep torrent /etc/squid/squid.conf
acl torrent browser "/etc/squid/browser.txt" http_access deny torrent |
#vim /etc/squid/browser.txt
|
#echo "Morpheus
> KaZaa > KaZaaClient > Gnutella > Gnucleus > e2dk > Gator > Bearshare > BitTorrent > "torrent Morpheus KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare BitTorrent torrent |
#P2P-Agent
bash: P2P-Agent: command not found |
#Napster
bash: Napster: command not found |
#KaZaA
|
#echo "Morpheus
KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare BitTorrent |
#vim /etc/squid/browser.txt
|
#echo "Morpheus
[root@debian14:rejik3]# echo "Morpheus KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare BitTorrent BitTorrent" > /etc/squid/browser.txt KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare |
#Napster
|
#echo "Morpheus
KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare BitTorrent |
#P2P-Agent
|
#echo "Morpheus
KaZaa KaZaaClient Gnutella Gnucleus e2dk Gator Bearshare |
#squid -k reconfigure
1 Morpheus 2 KaZaa 3 KaZaaClient 4 Gnutella 5 Gnucleus 6 e2dk 7 Gator 8 Bearshare 9 BitTorrent "/etc/squid/browser.txt" 9L, 77C+q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31 |
#less /var/log/squid/cache.log
|
#/etc/init.d/squid restart
Restarting Squid HTTP proxy: squid Waiting.....................done. . |
#vim /etc/squid/browser.txt
|
#vim /etc/squid/squid.conf
|
#less /var/log/squid/access.log
|
#tail
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ... 1250272911.979 113 192.168.16.14 TCP_MISS/302 626 GET http://ad.adperium.com/imp? - DIRECT/217.163.21.31 - 1250272912.602 1042 192.168.16.14 TCP_MISS/200 1270 GET http://3.adbrite.com/mb/text_group.php? - DIRECT/69.64.250.20 application/x-javascript 1250272912.819 841 192.168.16.14 TCP_MISS/200 1415 GET http://ad.yieldmanager.com/imp? - DIRECT/217.163.21.31 application/x-javascript 1250272912.841 863 192.168.16.14 TCP_MISS/200 1501 GET http://ad.yieldmanager.com/imp? - DIRECT/217.163.21.31 application/x-javascript 1250272913.439 276 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.442 219 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.542 702 192.168.16.14 TCP_MISS/200 23194 GET http://content.yieldmanager.edgesuite.net/ct/sf/cc/19/cc19d2f09b346a7915e18e743c914a6a.jpeg - DIRECT/213.155.158.9 image/jpeg 1250272913.586 347 192.168.16.14 TCP_MISS/200 433 GET http://pixel.quantserve.com/pixel;r=646495009;fpan=0;fpa=P0-1692175950-1250272354459;ns=0;url=http%3A%2F%2Fwww.mininova.org%2Ftor%2F2849201;ref=http%3A%2F%2Fwww.mininova.org%2F;ce=1;je=1;sr=1024x768x24;dg=E5417-U-MO-5;dst=1;et=1250272913241;tzo=-180;a=p-7crBtnORZhUlY - DIRECT/4.71.209.24 image/gif 1250272913.704 117 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.971 272 192.168.16.14 TCP_MISS/200 23477 GET http://www.mininova.org/get/2849201 - DIRECT/87.233.147.140 application/x-bittorrent |
#tail /var/log/squid/access.log &
[1] 5021 1250272911.979 113 192.168.16.14 TCP_MISS/302 626 GET http://ad.adperium.com/imp? - DIRECT/217.163.21.31 - 1250272912.602 1042 192.168.16.14 TCP_MISS/200 1270 GET http://3.adbrite.com/mb/text_group.php? - DIRECT/69.64.250.20 application/x-javascript 1250272912.819 841 192.168.16.14 TCP_MISS/200 1415 GET http://ad.yieldmanager.com/imp? - DIRECT/217.163.21.31 application/x-javascript 1250272912.841 863 192.168.16.14 TCP_MISS/200 1501 GET http://ad.yieldmanager.com/imp? - DIRECT/217.163.21.31 application/x-javascript 1250272913.439 276 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.442 219 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.542 702 192.168.16.14 TCP_MISS/200 23194 GET http://content.yieldmanager.edgesuite.net/ct/sf/cc/19/cc19d2f09b346a7915e18e743c914a6a.jpeg - DIRECT/213.155.158.9 image/jpeg 1250272913.586 347 192.168.16.14 TCP_MISS/200 433 GET http://pixel.quantserve.com/pixel;r=646495009;fpan=0;fpa=P0-1692175950-1250272354459;ns=0;url=http%3A%2F%2Fwww.mininova.org%2Ftor%2F2849201;ref=http%3A%2F%2Fwww.mininova.org%2F;ce=1;je=1;sr=1024x768x24;dg=E5417-U-MO-5;dst=1;et=1250272913241;tzo=-180;a=p-7crBtnORZhUlY - DIRECT/4.71.209.24 image/gif 1250272913.704 117 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.100 image/gif 1250272913.971 272 192.168.16.14 TCP_MISS/200 23477 GET http://www.mininova.org/get/2849201 - DIRECT/87.233.147.140 application/x-bittorrent [1]+ Done tail /var/log/squid/access.log |
#/etc/init.d/squid restart
[root@debian14:rejik3]# tail /var/log/squid/cache.log & [1] 5031 2009/08/14 21:01:15| 0 Objects expired. 2009/08/14 21:01:15| 0 Objects cancelled. 2009/08/14 21:01:15| 0 Duplicate URLs purged. 2009/08/14 21:01:15| 0 Swapfile clashes avoided. 2009/08/14 21:01:15| Took 0.3 seconds (2072.2 objects/sec). 2009/08/14 21:01:15| Beginning Validation Procedure 2009/08/14 21:01:15| Completed Validation Procedure 2009/08/14 21:01:15| Validated 559 Entries 2009/08/14 21:01:15| store_swap_size = 4700k 2009/08/14 21:01:15| storeLateRelease: released 0 objects [1]+ Done tail /var/log/squid/cache.log Restarting Squid HTTP proxy: squid Waiting.....................done. . |
#less /var/log/squid/cache.log
|
#tail /var/log/squid/access.log &
|
#ps aux | grep firefox
user 1664 0.9 13.2 183480 78780 ? Ssl 18:48 1:19 /usr/lib/iceweasel/firefox-bin root 5176 0.0 0.1 4624 744 ttyp4 R+ 21:05 0:00 grep firefox |
#kill -9 1664
|
#jobs
|
#ps aux | grep tail
root 5272 0.0 0.1 4624 744 ttyp4 R+ 21:06 0:00 grep tail |
#tail -f
[1] 5280 1250273172.566 0 192.168.16.14 TCP_HIT/200 9642 GET http://www.google-analytics.com/ga.js - NONE/- text/javascript 1250273172.575 325 192.168.16.14 TCP_MISS/200 1439 GET http://ad.yieldmanager.com/imp? - DIRECT/217.163.21.31 application/x-javascript 1250273172.658 99 192.168.16.14 TCP_MISS/200 729 GET http://s.mininova.org/images/rss.gif? - DIRECT/87.233.147.141 image/gif 1250273172.816 157 192.168.16.14 TCP_HIT/200 23254 GET http://content.yieldmanager.edgesuite.net/atoms/90/da/4b/ed/90da4bedeaeb2ab6259d472ad507a550.gif - NONE/- image/gif 1250273173.044 219 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.113 image/gif 1250273173.051 226 192.168.16.14 TCP_MISS/200 493 GET http://www.google-analytics.com/__utm.gif? - DIRECT/74.125.87.113 image/gif 1250273173.177 618 192.168.16.14 TCP_HIT/200 893 GET http://s.mininova.org/images/icon-lighty.png - NONE/- image/png 1250273173.303 212 192.168.16.14 TCP_MISS/200 15036 GET http://www.mininova.org/get/2848734 - DIRECT/87.233.147.140 application/x-bittorrent 1250273173.481 436 192.168.16.14 TCP_MISS/200 1589 GET http://content.yieldmanager.edgesuite.net/atoms/b4/91/e3/c6/b491e3c6db95f85efcfcf62a112294d1.gif - DIRECT/213.155.158.18 image/gif 1250273173.855 1029 192.168.16.14 TCP_MISS/200 1916 GET http://edge.quantserve.com/quant.js - DIRECT/213.155.158.27 application/x-javascript |
#tail -f /var/log/squid/cache.log
[2] 5290 2009/08/14 21:05:21| 0 Objects expired. 2009/08/14 21:05:21| 0 Objects cancelled. 2009/08/14 21:05:21| 0 Duplicate URLs purged. 2009/08/14 21:05:21| 0 Swapfile clashes avoided. 2009/08/14 21:05:21| Took 0.3 seconds (2195.1 objects/sec). 2009/08/14 21:05:21| Beginning Validation Procedure 2009/08/14 21:05:21| Completed Validation Procedure 2009/08/14 21:05:21| Validated 562 Entries 2009/08/14 21:05:21| store_swap_size = 4732k 2009/08/14 21:05:21| storeLateRelease: released 0 objects |
#less /var/log/squid/cache.log 1250273238.018 929 192.168.16.14 TCP_MISS/200 352 GET http://sb.google.com/safebrowsing/update? - DIRECT/209.85.133.93 text/html
|
#vim /etc/squid/browser.txt
|
#1250273350.853 206 192.168.16.14 TCP_MISS/200 471 GET http://suggestqueries.google.com/complete/search? - DIRECT/74.125.87.113 text/javascript
1250273397.455 1030 192.168.16.14 TCP_MISS/200 25166 GET http://zone96.hotwords.com.br/img/hw_csspadrao_0_v12.css - DIRECT/74.55.228.250 text/css 1250273397.553 98 192.168.16.14 TCP_MISS/200 27195 GET http://googleads.g.doubleclick.net/pagead/imgad? - DIRECT/74.125.87.155 image/jpeg 1250273397.597 2377 192.168.16.14 TCP_MISS/200 20643 GET http://img.vivaolinux.com.br/imagens/banners/banner-prhost.gif - DIRECT/76.74.248.57 image/gif 1250273397.669 383 192.168.16.14 TCP_MISS/200 8434 GET http://www.vivaolinux.com.br/imagens/fotos/IMG_0016.JPG - DIRECT/76.74.248.57 image/jpeg 1250273397.864 266 192.168.16.14 TCP_MISS/200 716 GET http://ads.doclix.com/adserver/CntImprImg? - DIRECT/208.122.61.169 image/png 1250273397.911 47 192.168.16.14 TCP_MISS/200 2182 GET http://static.techguy.org/favicon.ico - DIRECT/205.234.175.175 application/octet-stream 1250273397.925 255 192.168.16.14 TCP_MISS/200 716 GET http://ads.doclix.com/adserver/CntImprImg? - DIRECT/208.122.61.169 image/png 1250273398.095 170 192.168.16.14 TCP_MISS/200 5145 GET http://zone96.hotwords.com.br/img/balao_0_gif.gif - DIRECT/74.55.228.250 image/gif 1250273398.171 260 192.168.16.14 TCP_MISS/200 716 GET http://ads.doclix.com/adserver/CntImprImg? - DIRECT/208.122.61.169 image/png 1250273398.238 685 192.168.16.14 TCP_MISS/200 1581 GET http://pagead2.googlesyndication.com/pagead/abglogo/abg-pt-100c-000000.png - DIRECT/74.125.87.167 image/png 1250273398.260 165 192.168.16.14 TCP_MISS/200 416 GET http://zone96.hotwords.com.br/img/transp_hotwords_2.gif - DIRECT/74.55.228.250 image/gif 1250273398.362 190 192.168.16.14 TCP_MISS/200 634 GET http://img.vivaolinux.com.br/imagens/layout/box_bottom.gif - DIRECT/76.74.248.57 image/gif 1250273398.427 188 192.168.16.14 TCP_MISS/200 515 GET http://img.vivaolinux.com.br/imagens/layout/breadcrumb_topback.gif - DIRECT/76.74.248.57 image/gif 1250273398.454 193 192.168.16.14 TCP_MISS/200 608 GET http://img.vivaolinux.com.br/imagens/layout/breadcrumb_topright.gif - DIRECT/76.74.248.57 image/gif 1250273398.552 190 192.168.16.14 TCP_MISS/200 916 GET http://img.vivaolinux.com.br/imagens/layout/breadcrumb_middleright.gif - DIRECT/76.74.248.57 image/gif 1250273398.616 189 192.168.16.14 TCP_MISS/200 784 GET http://img.vivaolinux.com.br/imagens/layout/breadcrumb_middleleft.gif - DIRECT/76.74.248.57 image/gif 1250273399.855 3529 192.168.16.14 TCP_MISS/200 1034 GET http://www.vivaolinux.com.br/comunidades/imagens/entrar_ico.png - DIRECT/76.74.248.57 image/png 1250273400.049 192 192.168.16.14 TCP_MISS/200 2264 GET http://www.vivaolinux.com.br/favicon.ico - DIRECT/76.74.248.57 image/x-icon 1250273400.050 196 192.168.16.14 TCP_MISS/200 2254 GET http://www.vivaolinux.com.br/favicon.ico - DIRECT/76.74.248.57 image/x-icon |
#vim /etc/squid/squid.conf
--- /tmp/l3-saved-1632.4677.21816 2009-08-14 21:10:48.000000000 +0300 +++ /etc/squid/squid.conf 2009-08-14 21:11:07.000000000 +0300 @@ -2578,7 +2578,7 @@ #http_access allow our_networks -acl torrent browser "/etc/squid/browser.txt" +acl torrent rep_mime_type -i "/etc/squid/browser.txt" http_access deny torrent acl our_net src 192.168.16.0/24 |
#vim /etc/squid/browser.txt
--- /tmp/l3-saved-1632.964.22984 2009-08-14 21:11:24.000000000 +0300 +++ /etc/squid/browser.txt 2009-08-14 21:12:09.000000000 +0300 @@ -1 +1 @@ -x-bittorrent +application/x-bittorrent |
#2009/08/14 21:12:46| Starting Squid Cache version 2.6.STABLE5 for i386-debian-linux-gnu...
[root@debian14:rejik3]# /etc/init.d/squid restart Restarting Squid HTTP proxy: squid2009/08/14 21:12:14| Preparing for shutdown after 219 requests 2009/08/14 21:12:14| Waiting 30 seconds for active connections to finish 2009/08/14 21:12:14| FD 18 Closing HTTP connection Waiting..................2009/08/14 21:12:45| Shutting down... 2009/08/14 21:12:45| FD 19 Closing ICP connection 2009/08/14 21:12:45| Closing unlinkd pipe on FD 16 2009/08/14 21:12:45| storeDirWriteCleanLogs: Starting... 2009/08/14 21:12:45| Finished. Wrote 672 entries. 2009/08/14 21:12:45| Took 0.0 seconds (2498141.3 entries/sec). ... 1250273575.172 378 192.168.16.14 TCP_MISS/200 3946 GET http://googleads.g.doubleclick.net/pagead/ads? - DIRECT/74.125.87.156 text/html 1250273575.297 616 192.168.16.14 TCP_MISS/200 5316 GET http://googleads.g.doubleclick.net/pagead/ads? - DIRECT/74.125.87.155 text/html 1250273575.391 119 192.168.16.14 TCP_MISS/200 1580 GET http://pagead2.googlesyndication.com/pagead/abglogo/abg-es-100c-000000.png - DIRECT/74.125.87.164 image/png 1250273575.590 194 192.168.16.14 TCP_MISS/200 666 GET http://www.mail-archive.com/favicon.ico - DIRECT/72.52.77.3 image/x-icon 1250273575.598 206 192.168.16.14 TCP_MISS/200 666 GET http://www.mail-archive.com/favicon.ico - DIRECT/72.52.77.3 image/x-icon 1250273575.816 424 192.168.16.14 TCP_MISS/200 6792 GET http://www.mail-archive.com/linux-l@listas.softwarelibre.cu/msg04958.html - DIRECT/72.52.77.3 text/html 1250273577.512 124 192.168.16.14 TCP_MISS/204 401 GET http://www.google.com/url? - DIRECT/74.125.87.103 text/html 1250273580.083 1697 192.168.16.14 TCP_MISS/200 6370 GET http://www.squid-cache.org/mail-archive/squid-dev/200702/0019.html - DIRECT/12.160.37.9 text/html 1250273580.106 23 192.168.16.14 TCP_HIT/200 1899 GET http://www.squid-cache.org/favicon.ico - NONE/- image/x-icon 1250273580.116 9 192.168.16.14 TCP_HIT/200 1899 GET http://www.squid-cache.org/favicon.ico - NONE/- image/x-icon |
#vim /etc/squid/squid.conf
--- /tmp/l3-saved-1632.18091.24502 2009-08-14 21:13:35.000000000 +0300 +++ /etc/squid/squid.conf 2009-08-14 21:13:47.000000000 +0300 @@ -2578,7 +2578,7 @@ #http_access allow our_networks -acl torrent rep_mime_type -i "/etc/squid/browser.txt" +acl torrent rep_mime_type -i "/etc/squid/browser.txt" http_access deny torrent acl our_net src 192.168.16.0/24 |
#/etc/init.d/squid restart
2009/08/14 21:14:48| Closing unlinkd pipe on FD 16 2009/08/14 21:14:48| storeDirWriteCleanLogs: Starting... 2009/08/14 21:14:48| Finished. Wrote 685 entries. 2009/08/14 21:14:48| Took 0.0 seconds (2490909.1 entries/sec). CPU Usage: 0.012 seconds = 0.004 user + 0.008 sys Maximum Resident Size: 0 KB Page faults with physical i/o: 0 Memory usage for squid via mallinfo(): total space in arena: 2380 KB Ordinary blocks: 2320 KB 21 blks Small blocks: 0 KB 0 blks Holding blocks: 240 KB 1 blks Free Small blocks: 0 KB Free Ordinary blocks: 59 KB Total in use: 2560 KB 98% Total free: 59 KB 2% 2009/08/14 21:14:48| Squid Cache (Version 2.6.STABLE5): Exiting normally. ...done. . |
#vim /etc/squid/squid.conf
--- /tmp/l3-saved-1632.294.18792 2009-08-14 21:15:19.000000000 +0300 +++ /etc/squid/squid.conf 2009-08-14 21:15:31.000000000 +0300 @@ -2579,6 +2579,7 @@ acl torrent rep_mime_type -i "/etc/squid/browser.txt" +http_reply_access deny torrent http_access deny torrent acl our_net src 192.168.16.0/24 |
#2009/08/14 21:16:04| User-Agent logging is disabled.
[root@debian14:rejik3]# /etc/init.d/squid restart Restarting Squid HTTP proxy: squid2009/08/14 21:15:32| Preparing for shutdown after 0 requests 2009/08/14 21:15:32| Waiting 30 seconds for active connections to finish 2009/08/14 21:15:32| FD 18 Closing HTTP connection Waiting..................2009/08/14 21:16:03| Shutting down... 2009/08/14 21:16:03| FD 19 Closing ICP connection 2009/08/14 21:16:03| Closing unlinkd pipe on FD 16 2009/08/14 21:16:03| storeDirWriteCleanLogs: Starting... 2009/08/14 21:16:03| Finished. Wrote 685 entries. 2009/08/14 21:16:03| Took 0.0 seconds (2696850.4 entries/sec). ... 2009/08/14 21:16:05| 0 Objects expired. 2009/08/14 21:16:05| 0 Objects cancelled. 2009/08/14 21:16:05| 0 Duplicate URLs purged. 2009/08/14 21:16:05| 0 Swapfile clashes avoided. 2009/08/14 21:16:05| Took 0.3 seconds (2555.4 objects/sec). 2009/08/14 21:16:05| Beginning Validation Procedure 2009/08/14 21:16:05| Completed Validation Procedure 2009/08/14 21:16:05| Validated 685 Entries 2009/08/14 21:16:05| store_swap_size = 5520k 2009/08/14 21:16:05| storeLateRelease: released 0 objects |
#/etc/init.d/squid restart
2009/08/14 21:18:27| Closing unlinkd pipe on FD 16 2009/08/14 21:18:27| storeDirWriteCleanLogs: Starting... 2009/08/14 21:18:27| Finished. Wrote 688 entries. 2009/08/14 21:18:27| Took 0.0 seconds (2625954.2 entries/sec). CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys Maximum Resident Size: 0 KB Page faults with physical i/o: 0 Memory usage for squid via mallinfo(): total space in arena: 2384 KB Ordinary blocks: 2329 KB 24 blks Small blocks: 0 KB 0 blks Holding blocks: 240 KB 1 blks Free Small blocks: 0 KB Free Ordinary blocks: 54 KB Total in use: 2569 KB 98% Total free: 54 KB 2% 2009/08/14 21:18:27| Squid Cache (Version 2.6.STABLE5): Exiting normally. ...done. . |
#vim /etc/squid/squid.conf
--- /tmp/l3-saved-1632.17931.17078 2009-08-14 21:19:08.000000000 +0300 +++ /etc/squid/squid.conf 2009-08-14 21:19:29.000000000 +0300 @@ -2579,7 +2579,7 @@ acl torrent rep_mime_type -i "/etc/squid/browser.txt" -#http_reply_access deny torrent +http_reply_access deny torrent acl our_net src 192.168.16.0/24 http_access allow our_net |
#squid -k reconfigure
1 ^application/x-bittorrent$ "/etc/squid/browser.txt" 1L, 27C+q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31 |
#vim /etc/squid/browser.txt
|
#apt-cache search squid
adzapper - proxy advertisement zapper add-on awffull - web server log analysis program biosquid - utilities for biological sequence analysis biosquid-dev - headers and static library for biological sequence analysis calamaris - log analyzer for Squid or Oops proxy log files ccze - A robust, modular log coloriser dansguardian - Web content filtering frox - Transparent caching ftp proxy jesred - A redirector for the Squid proxy kernel-patch-wrr - Extension to traffic Control/network bandwidth management ... squid3-client - A full featured Web Proxy cache (HTTP proxy) - control utility squid3-common - A full featured Web Proxy cache (HTTP proxy) - common files squidclient - Command line URL extractor that talks to (a) squid squidguard - filter, redirector and access controller plug for Squid squidtaild - Squid log monitoring program squidview - monitors and analyses squid access.log files srg - Fast, Flexible and Detailed log analysis for the Squid Proxy tinyproxy - A lightweight, non-caching, optionally anonymizing http proxy varnish - A state-of-the-art, high-performance HTTP accelerator zope-cachefu - suite of Zope products for speeding up Plone |
#ssh 192.168.16.13
The authenticity of host '192.168.16.13 (192.168.16.13)' can't be established. RSA key fingerprint is 0e:8f:e8:d1:f0:cb:29:54:44:04:5c:e6:c7:22:0f:30. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.13' (RSA) to the list of known hosts. root@192.168.16.13's password: Linux debian13 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 UTC 2007 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. Last login: Fri Aug 14 11:29:46 2009 from 192.168.16.1 Can't locate Term/VT102.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/bin/l3-agent line 13. BEGIN failed--compilation aborted at /usr/local/bin/l3-agent line 13. |
#vim /etc/mail
|
#vim /etc/mail/
|
#echo test | mail -s test edu@serg.net.nt
3 #$ 4 # You must run newaliases(1) after making changes to this file.$ 5 #$ 6 $ 7 # Required aliases$ 8 postmaster:^Iroot$ 17 edu: sergey.cherepenin@gmail.com,scherepenin@techexpert.ua$ ~ ~ ~ ... ~ ~ ~ ~ ~ ~ ~ ~ "/etc/mail/aliases" 17L, 305C записано Can't send mail: sendmail process failed with error code 67 |
#cd /etc/mail
[root@debian13:~]# cd /etc/maill bash: cd: /etc/maill: Нет такого файла или каталога |
#/etc/init.d/sendmail restart
[root@debian13:mail]# make Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Creating /etc/mail/relay-domains # Optional file... Updating ALIAS_FILE ... /etc/mail/aliases: 6 aliases, longest 53 bytes, 132 bytes total The following file(s) have changed: ** ** You should issue `/etc/init.d/sendmail reload` ** ** Restarting Mail Transport Agent (MTA): sendmail. |
#1250276722.209 118 192.168.16.14 TCP_MISS/301 663 GET http://gmail.com/ - DIRECT/74.125.79.83 text/html
[root@debian13:mail]# less /var/log/mail.log Aug 13 18:33:38 debian13 sendmail[3219]: alias database /etc/mail/aliases rebuilt by root Aug 13 18:33:38 debian13 sendmail[3219]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total Aug 13 18:33:38 debian13 sm-mta[3257]: starting daemon (8.13.8): SMTP+queueing@00:10:00 Aug 13 18:37:03 debian13 sm-mta[3479]: starting daemon (8.13.8): SMTP+queueing@00:10:00 Aug 13 18:42:24 debian13 sm-mta[3940]: starting daemon (8.13.8): SMTP+queueing@00:10:00 Aug 13 18:44:13 debian13 sendmail[3978]: n7DFiDsr003978: from=root, size=47, class=0, nrcpts=1, msgid=<200908131544.n7DFiDsr003978@debian13.serg.net.nt>, relay=root@localhost Aug 13 18:44:13 debian13 sm-mta[3979]: n7DFiDn7003979: from=<root@debian13.serg.net.nt>, size=340, class=0, nrcpts=1, msgid=<200908131544.n7DFiDsr003978@debian13.serg.net.nt>, proto=ESMTP, daemon=MSP-v4, relay=localhost.localdomain [127.0.0.1] Aug 13 18:44:13 debian13 sendmail[3978]: n7DFiDsr003978: to=user@serg.net.nt, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30047, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n7DFiDn7003979 Message accepted for delivery) Aug 13 18:44:14 debian13 sm-mta[3980]: n7DFiDn7003979: to=<user@serg.net.nt>, ctladdr=<root@debian13.serg.net.nt> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30574, dsn=2.0.0, stat=Sent ... Aug 14 22:05:06 debian13 sm-mta[14353]: n7EJ54Pg014353: Milter add: header: X-Spam-Status: No, score=1.5 required=5.0 tests=ALL_TRUSTED,TVD_SPACE_RATIO\n\tautolearn=no version=3.2.5 Aug 14 22:05:06 debian13 sm-mta[14353]: n7EJ54Pg014353: Milter add: header: X-Spam-Level: * Aug 14 22:05:06 debian13 sm-mta[14353]: n7EJ54Pg014353: Milter add: header: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on debian13.serg.net.nt Aug 14 22:05:06 debian13 sm-mta[14353]: n7EJ54Pg014353: Milter add: header: X-Virus-Scanned: clamav-milter 0.95.2 at debian13 Aug 14 22:05:06 debian13 sm-mta[14353]: n7EJ54Pg014353: Milter add: header: X-Virus-Status: Clean Aug 14 22:05:06 debian13 sendmail[14352]: n7EJ54mV014352: to=edu@serg.net.nt, ctladdr=root (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=30040, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n7EJ54Pg014353 Message accepted for delivery) Aug 14 22:05:07 debian13 sm-mta[14356]: n7EJ54Pg014353: to=sergey.cherepenin@gmail.com, ctladdr=<root@debian13.serg.net.nt> (0/0), delay=00:00:03, xdelay=00:00:01, mailer=esmtp, pri=60832, relay=gmail-smtp-in.l.google.com. [209.85.218.22], dsn=2.0.0, stat=Sent (OK 1250276703 26si3053940bwz.59) Aug 14 22:05:07 debian13 sm-mta[14356]: STARTTLS=client, relay=mail.techexpert.ua., version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-MD5, bits=128/128 1250276722.388 177 192.168.16.14 TCP_MISS/302 978 GET http://mail.google.com/mail/ - DIRECT/74.125.87.83 text/html 1250276735.710 854 192.168.16.14 TCP_MISS/302 1208 GET http://www.google.com.ua/accounts/SetSID? - DIRECT/74.125.87.147 text/html |
#ls -l /bin/myrm
[root@debian13:mail]# cp /bin/rm /bin/myrm -rwxr-xr-x 1 root root 52444 Авг 14 22:08 /bin/myrm |
#ls -l /bin/myrm
[root@debian13:mail]# chmod 4744 /bin/myrm -rwsr--r-- 1 root root 52444 Авг 14 22:08 /bin/myrm |
#vim /etc/mail/aliases
|
#ls -ld /tmp/testdir/
[root@debian13:mail]# ls -lD /tmp/testdir/ итого 0 //DIRED-OPTIONS// --quoting-style=literal drwxr-xr-x 2 root root 48 Авг 14 22:08 /tmp/testdir/ |
#echo test | mail -s test goodbuy@serg.net.nt
[root@debian13:mail]# ps aux | grep sendmail root 14787 0.0 0.3 9048 2064 ? Ss 22:09 0:00 sendmail: MTA: accepting connections root 14852 0.0 0.1 4788 744 ttyp5 R+ 22:10 0:00 grep sendmail Can't send mail: sendmail process failed with error code 67 |
#man aliases
|
#mail
Message 4: From MAILER-DAEMON@serg.net.nt Fri Aug 14 22:12:58 2009 Date: Fri, 14 Aug 2009 22:12:58 +0300 From: Mail Delivery Subsystem <MAILER-DAEMON@serg.net.nt> To: <root@serg.net.nt> MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="n7EJCw75015171.1250277178/debian13.serg.net.nt" Subject: Returned mail: see transcript for details Auto-Submitted: auto-generated (failure) ... Message-Id: <200908141912.n7EJCwQs015167@debian13.serg.net.nt> To: goodbuy@serg.net.nt Subject: test X-Spam-Status: No, score=1.5 required=5.0 tests=ALL_TRUSTED,TVD_SPACE_RATIO autolearn=no version=3.2.5 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on debian13.serg.net.nt X-Virus-Scanned: clamav-milter 0.95.2 at debian13 X-Virus-Status: Clean --n7EJCw75015171.1250277178/debian13.serg.net.nt-- |
#ls -ld /tmp/testdir/
[root@debian13:mail]# ls -lD /tmp/testdir/ итого 0 //DIRED-OPTIONS// --quoting-style=literal drwxr-xr-x 2 root root 48 Авг 14 22:08 /tmp/testdir/ |
#mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/root": 4 messages 1 new 4 unread U 1 MAILER-DAEMON@ser Fri Aug 14 22:10 73/2581 Returned mail: see transcript for details U 2 MAILER-DAEMON@ser Fri Aug 14 22:11 73/2581 Returned mail: see transcript for details U 3 MAILER-DAEMON@ser Fri Aug 14 22:12 73/2581 Returned mail: see transcript for details >N 4 MAILER-DAEMON@ser Fri Aug 14 22:14 70/2590 Returned mail: see transcript for details & Message 4: From MAILER-DAEMON@serg.net.nt Fri Aug 14 22:14:39 2009 Date: Fri, 14 Aug 2009 22:14:39 +0300 ... --n7EJEdYH015265.1250277279/debian13.serg.net.nt & At EOF & At EOF & At EOF & q Saved 1 message in /root/mbox Held 3 messages in /var/mail/root |
#mail
No mail for root |
#mkdir /tmp/testdir/
echo \/tmp\/testdir | ls -ld /tmp/testdir/ ls: невозможно получить доступ к /tmp/testdir/: Нет такого файла или каталога |
#grep myrm /etc/mail/aliases
[root@debian13:mail]# ls -l /bin/myrm -rwsr-sr-x 1 root root 52444 Авг 14 22:08 /bin/myrm goodbuy: |"/bin/myrm -rf" |
#make
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ... "aliases" 19L, 399C записано Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Creating /etc/mail/relay-domains # Optional file... Updating ALIAS_FILE ... /etc/mail/aliases: 8 aliases, longest 70 bytes, 220 bytes total The following file(s) have changed: ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#date
Restarting Mail Transport Agent (MTA): sendmail. Птн Авг 14 22:24:17 EEST 2009 |
#cal
[root@debian13:mail]# 1250277889.188 375 192.168.16.14 TCP_MISS/200 353 GET http://sb.google.com/safebrowsing/update? - DIRECT/209.85.133.91 text/html Август 2009 Вс Пн Вт Ср Чт Пт Су 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
Время первой команды журнала | 19:04:58 2009- 8-14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 21:25:27 2009- 8-14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008