/l3/users/clint/nt-lNet/linux4.linux.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 |
|
#host backtown
Host backtown not found: 3(NXDOMAIN) |
#vi /etc/hosts
|
#tail -f /var/log/squid/
![]() access.log cache.log store.log |
#tail -f /var/log/squid/access.log
![]() 1158854905.790 990 192.168.15.4 TCP_MISS/200 17590 GET http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml - DIRECT/212.58.240.44 application/xml 1158856299.143 24 192.168.15.4 TCP_DENIED/403 1440 GET http://mail.ru/favicon.ico - NONE/- text/html 1158858516.108 1173 192.168.15.4 TCP_MISS/302 829 GET http://fxfeeds.mozilla.com/rss20.xml - DIRECT/63.245.209.21 text/html 1158858521.732 5622 192.168.15.4 TCP_REFRESH_MISS/200 17629 GET http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml - DIRECT/212.58.240.145 application/xml 1158909644.873 25 127.0.0.1 TCP_MISS/400 2236 GET http://10.0.1.1/exchange - DIRECT/10.0.1.1 text/html 1158909645.516 3 127.0.0.1 TCP_MISS/400 2236 GET http://10.0.1.1/favicon.ico - DIRECT/10.0.1.1 text/html 1158909735.193 180923 127.0.0.1 TCP_MISS/504 1481 GET http://fxfeeds.mozilla.com/rss20.xml - DIRECT/63.245.209.21 text/html 1158909781.572 219 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158909834.884 1 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158909838.959 1 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.0.0.0 192.168.15.254 255.0.0.0 UG 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth1 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#route del default gw 192.168.15.254
|
#ifconfig eth1:1 down
|
#route del default gw 192.168.15.254
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.0.0.0 192.168.15.254 255.0.0.0 UG 0 0 0 eth0 |
#route add default gw 192.168.15.254
|
#tail -f /var/log/squid/access.log
![]() 1158856299.143 24 192.168.15.4 TCP_DENIED/403 1440 GET http://mail.ru/favicon.ico - NONE/- text/html 1158858516.108 1173 192.168.15.4 TCP_MISS/302 829 GET http://fxfeeds.mozilla.com/rss20.xml - DIRECT/63.245.209.21 text/html 1158858521.732 5622 192.168.15.4 TCP_REFRESH_MISS/200 17629 GET http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml - DIRECT/212.58.240.145 application/xml 1158909644.873 25 127.0.0.1 TCP_MISS/400 2236 GET http://10.0.1.1/exchange - DIRECT/10.0.1.1 text/html 1158909645.516 3 127.0.0.1 TCP_MISS/400 2236 GET http://10.0.1.1/favicon.ico - DIRECT/10.0.1.1 text/html 1158909735.193 180923 127.0.0.1 TCP_MISS/504 1481 GET http://fxfeeds.mozilla.com/rss20.xml - DIRECT/63.245.209.21 text/html 1158909781.572 219 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158909834.884 1 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158909838.959 1 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158910012.259 9 127.0.0.1 TCP_MISS/503 1554 GET http://backtown/exchange/ - DIRECT/backtown text/html 1158910030.123 11531 127.0.0.1 TCP_MISS/200 1066 GET http://xgu.ru/l3/users/cherep - DIRECT/62.149.17.62 text/html 1158910030.285 92 127.0.0.1 TCP_MISS/200 6999 GET http://xgu.ru/l3files/l3.css - DIRECT/62.149.17.62 text/css 1158910030.343 4 127.0.0.1 TCP_MISS/200 809 GET http://xgu.ru/l3files/folder.gif - DIRECT/62.149.17.62 image/gif 1158910030.370 85 127.0.0.1 TCP_MISS/200 786 GET http://xgu.ru/l3files/folder.up.gif - DIRECT/62.149.17.62 image/gif 1158910030.492 121 127.0.0.1 TCP_MISS/200 761 GET http://xgu.ru/favicon.ico - DIRECT/62.149.17.62 image/x-icon 1158910049.752 362 127.0.0.1 TCP_MISS/200 1132 GET http://xgu.ru/l3/users/cherep/nt-lNet/linux4.linux.nt - DIRECT/62.149.17.62 text/html 1158910055.667 352 127.0.0.1 TCP_MISS/404 608 GET http://xgu.ru/tigra/hints.js - DIRECT/62.149.17.62 text/html 1158910055.969 294 127.0.0.1 TCP_MISS/404 612 GET http://xgu.ru/tigra/hints_cfg.js - DIRECT/62.149.17.62 text/html 1158910056.311 308 127.0.0.1 TCP_MISS/200 642 GET http://xgu.ru/l3files/error.png - DIRECT/62.149.17.62 image/png 1158910066.580 15578 127.0.0.1 TCP_MISS/200 1816233 GET http://xgu.ru/l3/users/cherep/nt-lNet/linux4.linux.nt/root - DIRECT/62.149.17.62 text/html |
#cat /etc/squid/squid.conf
#Default: # pid_filename /var/run/squid.pid # TAG: debug_options # Logging options are set as section,level where each source file # is assigned a unique section. Lower levels result in less # output, Full debugging (level 9) can result in a very large # log file, so be careful. The magic word "ALL" sets debugging # levels for all sections. We recommend normally running with # "ALL,1". # ... # TAG: dns_timeout # DNS Query timeout. If no response is received to a DNS query # within this time all DNS servers for the queried domain # are assumed to be unavailable. # #Default: # dns_timeout 2 minutes # TAG: dns_defnames on|off # Normally the RES_DEFNAMES resolver option is disabled # (see res_init(3)). This prevents caches in a hierarchy |
#ifconfig | less
|
#ifconfig | less
|
#ifconfig eth1 192.168.16.1
|
#vi /etc/bind/named.conf
|
#vi /etc/bind/named.conf.options
27a28 > 192.168.16.2/24; |
#/etc/init.d/bind9 restart
Stopping domain name service...:. Starting domain name service...:. |
#netstat -lnp | grep :53
tcp 0 0 192.168.15.4:53 0.0.0.0:* LISTEN 5380/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 5380/named udp 0 0 192.168.15.4:53 0.0.0.0:* 5380/named udp 0 0 127.0.0.1:53 0.0.0.0:* 5380/named |
#vi /etc/bind/named.conf.options
35a36 > 192.168.16.1; |
#/etc/init.d/bind9 restart
Stopping domain name service...:. Starting domain name service...:. |
#netstat -lnp | grep :53
tcp 0 0 192.168.16.1:53 0.0.0.0:* LISTEN 5443/named tcp 0 0 192.168.15.4:53 0.0.0.0:* LISTEN 5443/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 5443/named udp 0 0 192.168.16.1:53 0.0.0.0:* 5443/named udp 0 0 192.168.15.4:53 0.0.0.0:* 5443/named udp 0 0 127.0.0.1:53 0.0.0.0:* 5443/named |
#iptables -t nat -A PREROUTING -s 192.168.16.2/24 -j MASQUER
![]() DE iptables: Invalid argument |
#iptables -t nat -A PREROUTING -s 192.168.16.2
![]() |
#iptables -t nat -A PREROUTING -s 192.168.16.2
![]() iptables: Invalid argument |
#iptables -t nat -A PREROUTING -0 192.168.16.1 -j MASQUERADE
![]() iptables v1.2.11: Unknown arg `-0' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A PREROUTING -o 192.168.16.1 -j MASQUERADE
![]() iptables v1.2.11: Can't use -o with PREROUTING Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A POSTROUTING -o 192.168.16.1 -j MASQUERAD
![]() |
#iptables -t nat -A POSTROUTING -o 192.168.16.1 -j MASQUERAD
|
#iptables -t nat - POSTROUTING -o 192.168.16.1 -j MASQUERAD
![]() |
#iptables -t nat -D POSTROUTING -o 192.168.16.1 -j MASQUERAD
|
#iptables -t nat - POSTROUTING -o 192.168.16.1 -j MASQUERAD
![]() |
#iptables -t nat -A POSTROUTING -
![]() |
#iptables -t nat -A POSTROUTING -s 192.168.16.
![]() |
#iptables -t nat -A POSTROUTING -s 192.168.16.2 -j MASQUERAD
|
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- linux16-2.linux.nt anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#ntpdate ntp.psn.tu
![]() Error : Name or service not known 22 Sep 11:01:47 ntpdate[5586]: can't find host ntp.psn.tu 22 Sep 11:01:47 ntpdate[5586]: no servers can be used, exiting |
#ntpdate ntp.psn.ru
22 Sep 11:01:53 ntpdate[5592]: step time server 194.149.67.130 offset -0.848062 sec |
#vi /etc/hosts
|
#vi /etc/network/interfaces
|
#less /var/log/squid/access.log
|
#tar xvzfC /home/user/Desktop/redirector-3.2.1.tgz /usr/src
redirector-3.2.1/ redirector-3.2.1/tools/ redirector-3.2.1/tools/benchmark redirector-3.2.1/tools/IN.gz redirector-3.2.1/tools/kill-cache redirector-3.2.1/AUTHORS redirector-3.2.1/COPYING redirector-3.2.1/INSTALL redirector-3.2.1/Makefile redirector-3.2.1/VERSION ... redirector-3.2.1/prune_urls.c redirector-3.2.1/redirect.c redirector-3.2.1/redirector.c redirector-3.2.1/redirector.conf.dist redirector-3.2.1/run_make_cache.c redirector-3.2.1/vars.h redirector-3.2.1/write_cache.c redirector-3.2.1/raw_change.c redirector-3.2.1/pass.c redirector-3.2.1/Log |
#cd /usr/src/redirector-3.2.1/
|
#less
![]() |
#less INSTALL
|
#vi INSTALL
|
#vi Makefile
|
#id squid
![]() id: squid: Такого пользователя нет |
#ls -ld /var/spool/squid/
drwxr-x--- 18 proxy proxy 4096 2006-09-22 10:17 /var/spool/squid/ |
#id proxy
uid=13(proxy) gid=13(proxy) группы=13(proxy) |
#vi Makefile
3,4c3,4 < SQUID_USER=nobody < SQUID_GROUP=nogroup --- > SQUID_USER=proxy > SQUID_GROUP=proxy |
#make
![]() rm -f pass.o raw_change.o load_cache.o pcre.o parse_input.o init_vars.o check_urls.o run_make_cache.o new_url.o redirect.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o load_urls.o prune_urls.o write_cache.o need_cache_update.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o redirector make-cache OUT gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c pass.c In file included from pass.c:3: vars.h:2:18: pcre.h: No such file or directory In file included from pass.c:3: vars.h:142: error: parse error before "pcre" vars.h:142: warning: no semicolon at end of struct or union vars.h:143: warning: type defaults to `int' in declaration of `ban_pcre_s' vars.h:143: warning: data definition has no type or storage class vars.h:149: error: parse error before '}' token vars.h:149: warning: type defaults to `int' in declaration of `redir' vars.h:149: warning: data definition has no type or storage class make: *** [pass.o] Ошибка 1 |
#apt-cache search pcre
awffull - web server log analysis program cl-arnesi - small Common Lisp utilities cl-parenscript - JavaScript embedded in a Common Lisp host cl-ppcre - Portable Regular Express Library for Common Lisp libapache-mod-php5 - server-side, HTML-embedded scripting language (apache 1.3 module) libapache2-mod-php5 - server-side, HTML-embedded scripting language (apache 2.0 module) libpcre-ocaml - OCaml bindings for PCRE (Perl Compatible Regular Expression) libpcre-ocaml-dev - OCaml bindings for PCRE (Perl Compatible Regular Expression) libpcre3 - Perl 5 Compatible Regular Expression Library - runtime files libpcre3-dev - Perl 5 Compatible Regular Expression Library - development files ... pike7.6-pexts-pcre - Pike PCRE module postfix-pcre - PCRE map support for Postfix libapache-mod-php4 - server-side, HTML-embedded scripting language (apache 1.3 module) libapache2-mod-php4 - server-side, HTML-embedded scripting language (apache 2.0 module) php4-cgi - server-side, HTML-embedded scripting language (CGI binary) php4-cli - command-line interpreter for the php4 scripting language pike7.6-pcre - PCRE module for Pike pgrep - Dummy package for transition to pcregrep pike7.2-pexts-pcre - Pike PCRE module pike7.4-pexts-pcre - Pike PCRE module |
#apt-get install libpcre3-dev
Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libpcre3 libpcrecpp0 The following NEW packages will be installed: libpcre3-dev libpcrecpp0 The following packages will be upgraded: libpcre3 1 upgraded, 2 newly installed, 0 to remove and 944 not upgraded. Need to get 450kB of archives. ... (Чтение базы данных... на данный момент установлено 105506 файлов и каталогов.) Подготовка к замене пакета libpcre3 4.5-1.1 (используется файл .../libpcre3_6.4-2_i386.deb)... Распаковывается замена для пакета libpcre3... Выбор ранее не выбранного пакета libpcrecpp0. Распаковывается пакет libpcrecpp0 (из файла .../libpcrecpp0_6.4-2_i386.deb)... Выбор ранее не выбранного пакета libpcre3-dev. Распаковывается пакет libpcre3-dev (из файла .../libpcre3-dev_6.4-2_i386.deb)... Настраивается пакет libpcre3 (6.4-2) ... Настраивается пакет libpcrecpp0 (6.4-2) ... Настраивается пакет libpcre3-dev (6.4-2) ... |
#make
rm -f pass.o raw_change.o load_cache.o pcre.o parse_input.o init_vars.o check_urls.o run_make_cache.o new_url.o redirect.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o load_urls.o prune_urls.o write_cache.o need_cache_update.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o redirector make-cache OUT gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c pass.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c raw_change.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c load_cache.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c pcre.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c parse_input.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c init_vars.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c check_urls.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c run_make_cache.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c new_url.c ... gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c cache2url.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c ip.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c id.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c comparing.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c load_urls.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c prune_urls.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c write_cache.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -c need_cache_update.c gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -o redirector redirector.c -L/lib `pcre-config --libs` pass.o raw_change.o load_cache.o pcre.o parse_input.o init_vars.o check_urls.o run_make_cache.o new_url.o redirect.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o gcc -Wall -I/usr/include -I/usr/local/include -I/usr/include/pcre -o make-cache make-cache.c -L/lib `pcre-config --libs` load_urls.o prune_urls.o write_cache.o need_cache_update.o err_mes.o now.o get_opt.o parse_urls.o cache2url.o ip.o id.o comparing.o |
#make install
mkdir -p /usr/local/rejik3/tools cp make-cache /usr/local/rejik3 cp redirector /usr/local/rejik3 cp redirector.conf.dist /usr/local/rejik3 echo "#!/bin/sh" > /usr/local/rejik3/tools/check-redirector echo 'su proxy -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf;"' >> /usr/local/rejik3/tools/check-redirector chmod 755 /usr/local/rejik3/tools/check-redirector echo "#!/bin/sh" > /usr/local/rejik3/tools/set-permissions echo 'chown -R proxy:proxy /usr/local/rejik3' >> /usr/local/rejik3/tools/set-permissions chmod 755 /usr/local/rejik3/tools/set-permissions cp tools/kill-cache /usr/local/rejik3/tools chmod 755 /usr/local/rejik3/tools/kill-cache cp tools/benchmark /usr/local/rejik3/tools chmod 755 /usr/local/rejik3/tools/benchmark cp tools/IN.gz /usr/local/rejik3/tools chmod 644 /usr/local/rejik3/tools/IN.gz chown -R proxy:proxy /usr/local/rejik3 chmod 770 /usr/local/rejik3 chmod 644 /usr/local/rejik3/redirector.conf.dist chmod 755 /usr/local/rejik3/redirector chmod 755 /usr/local/rejik3/make-cache |
#cd ..
|
#cd /usr/local/rejik3/
|
#ls
make-cache redirector redirector.conf.dist tools |
#mv redirector.conf.dist redirector.conf
|
#vi redirector.conf
70,71c70,71 < error_log /usr/local/rejik3/redirector.err < change_log /usr/local/rejik3/redirector.log --- > error_log /var/log/squid/redirector.err > change_log /var/log/squid3/redirector.log |
#tar tvfz ~user/Desktop/banlists-2.x.x.tgz
drwxr-xr-x nobody/nogroup 0 2003-07-25 08:02:55 banlists/ drwxr-xr-x nobody/nogroup 0 2003-07-29 12:24:28 banlists/porno/ -rw-r--r-- nobody/nogroup 381351 2003-07-31 18:40:14 banlists/porno/urls drwxr-xr-x nobody/nogroup 0 2003-08-04 07:30:42 banlists/banners/ -rw-r--r-- nobody/nogroup 26059 2003-08-01 15:32:55 banlists/banners/urls -rw-r--r-- nobody/nogroup 206 2003-07-30 08:43:27 banlists/banners/pcre drwxr-xr-x nobody/nogroup 0 2003-08-04 07:30:52 banlists/js/ -rw-r--r-- root/root 19 2003-07-25 09:58:25 banlists/js/urls drwxr-xr-x nobody/nogroup 0 2003-07-30 12:11:00 banlists/mp3/ -rw-r--r-- nobody/nogroup 75 2002-12-25 10:37:44 banlists/mp3/pcre |
#apt-get install appache
![]() Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package appache |
#apt-get install apache
Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: apache-common apache2-utils libapr0 Suggested packages: apache-doc apache-ssl apache-perl The following NEW packages will be installed: apache apache-common apache2-utils libapr0 0 upgraded, 4 newly installed, 0 to remove and 944 not upgraded. Need to get 1470kB of archives. ... Распаковывается пакет apache (из файла .../apache_1.3.34-4_i386.deb)... Настраивается пакет libapr0 (2.0.55-4.2) ... Настраивается пакет apache2-utils (2.0.55-4.2) ... Настраивается пакет apache-common (1.3.34-4) ... Настраивается пакет apache (1.3.34-4) ... Creating config file /etc/apache/httpd.conf with new version Creating config file /etc/apache/srm.conf with new version Creating config file /etc/apache/access.conf with new version Creating config file /etc/apache/modules.conf with new version Starting apache 1.3 web server.... |
#tar tvfz ~user/Desktop/banlists-2.x.x.tgz
![]() |
#tar tvfz ~user/Desktop/banlists-2.x.x.tgz
![]() |
#tar tvfz ~user/Desktop/www.tgz
drwxr-xr-x root/root 0 2002-11-26 15:37:51 www/ -rw-r--r-- nobody/nobody 43 2002-11-13 07:13:25 www/1x1.gif -rw-r--r-- root/root 0 2002-11-26 15:02:34 www/js.js -rw-r--r-- nobody/nobody 624 2002-12-24 13:14:31 www/mp3.html -rw-r--r-- root/root 649 2002-12-24 13:13:26 www/porno.html |
#cat /usr/local/rejik3/*
![]() EôÇD$Eø$è¦ÿÿHEðEüH9Eôtsts: Is a directory Eô8.tëEøH9Eðu3t3t4t(ÇEìëlEüH9EôuEøH9EðtlinÇEìÿÿÿÿëQEüH9EôtEøH9Eðu ÇEìë6EôUð¶:u EôEðëEôUð¶:} ÇEìÿÿÿÿëÇEìEìÉÃUåì EüE EøEü8tEü8/t 6gb±W¸6ÉC$]¯í(æ:ç«!B½{od/¯ut1Eî£,9FØ*þÏ (=Ä>ÂV3$Ð4ß{ I Eü8?të TTP libpEø8të3ÇEôë6EüUø¶:uasses__gmon_start__pcre_compilepcre_studypcre_execlibc.so.6strerrorbsearchgetpidqsortfgetsmemcpyfeofmallocfprintfstrstrreallocfreadstrduplocaltimememsetstrcmpsprintffclosefwriteaccess__errno_locationexitfopenatoi_IO_stdin_used__libc_start_mainstrlenstrchrfree__xstatGLIBC_2.1GLIBC_2.0Sii EüÿEøÿë²EüUø¶:} ÇEôÿÿÿÿëÇEôEôÉÃUåì]ôè¿Ãz"uø}üè¥ÿÿ \ ÿÿÿ ... E u u E u u E $ |
#cd /var/www/
|
#tar xvzf ~user/Desktop/www.tgz
www/ www/1x1.gif www/js.js www/mp3.html www/porno.html |
#mv www rejik
|
#cd /usr/local/rejik3/
|
#vi redirector.conf
71c71 < change_log /var/log/squid3/redirector.log --- > change_log /var/log/squid/redirector.log 77c77 < url http://127.0.0.1/ban/1x1.gif --- > url http://127.0.0.1/rejik/1x1.gif 82c82 < url http://127.0.0.1/ban/porno.html --- > url http://127.0.0.1/rejik/porno.html 86c86 < url http://127.0.0.1/ban/mp3.html --- > url http://127.0.0.1/rejik/mp3.html 90c90 < url http://127.0.0.1/ban/js.js --- > url http://127.0.0.1/rejik/js.js |
#Default: # pid_filename /var/run/squid.pid # TAG: debug_options # Logging options are set as section,level where each source file # is assigned a unique section. Lower levels result in less # output, Full debugging (level 9) can result in a very large # log file, so be careful. The magic word "ALL" sets debugging # levels for all sections. We recommend normally running with # "ALL,1". # #Default: # debug_options ALL,1 # TAG: log_fqdn on|off # Turn this on if you wish to log fully qualified domain names # in the access.log. To do this Squid does a DNS lookup of all # IP's connecting to it. This can (in some situations) increase # latency, which makes your cache seem slower for interactive # browsing. # #Default: # log_fqdn off # TAG: client_netmask # A netmask for client addresses in logfiles and cachemgr output. # Change this to protect the privacy of your cache clients. # A netmask of 255.255.255.0 will log all IP's in that range with # the last digit set to '0'. # #Default: # client_netmask 255.255.255.255 # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS # ----------------------------------------------------------------------------- # TAG: ftp_user # If you want the anonymous login password to be more informative # (and enable the use of picky ftp servers), set this to something # reasonable for your domain, like wwwuser@somewhere.net # # The reason why this is domainless by default is the # request can be made on the behalf of a user in any domain, # depending on how the cache is used. # Some ftp server also validate the email address is valid # (for example perl.com). # #Default: # ftp_user Squid@ # TAG: ftp_list_width # Sets the width of ftp listings. This should be set to fit in # the width of a standard browser. Setting this too small # can cut off long filenames when browsing ftp sites. # #Default: # ftp_list_width 32 # TAG: ftp_passive # If your firewall does not allow Squid to use passive # connections, turn off this option. # #Default: # ftp_passive on # TAG: ftp_sanitycheck # For security and data integrity reasons Squid by default performs # sanity checks of the addresses of FTP data connections ensure the # data connection is to the requested server. If you need to allow # FTP connections to servers using another IP address for the data # connection turn this off. # #Default: # ftp_sanitycheck on # TAG: ftp_telnet_protocol # The FTP protocol is officially defined to use the telnet protocol # as transport channel for the control connection. However, many # implementations are broken and does not respect this aspect of # the FTP protocol. # # If you have trouble accessing files with ASCII code 255 in the # path or similar problems involving this ASCII code you can # try setting this directive to off. If that helps, report to the # operator of the FTP server in question that their FTP server # is broken and does not follow the FTP standard. # #Default: # ftp_telnet_protocol on # TAG: check_hostnames # For security and stability reasons Squid by default checks # hostnames for Internet standard RFC compliance. If you do not want # Squid to perform these checks then turn this directive off. # #Default: # check_hostnames on # TAG: allow_underscore # Underscore characters is not strictly allowed in Internet hostnames # but nevertheless used by many sites. Set this to off if you want # Squid to be strict about the standard. # #Default: # allow_underscore on # TAG: cache_dns_program # Note: This option is only available if Squid is rebuilt with the # --disable-internal-dns option # # Specify the location of the executable for dnslookup process. # #Default: # cache_dns_program /usr/lib/squid/dnsserver # TAG: dns_children # Note: This option is only available if Squid is rebuilt with the # --disable-internal-dns option # # The number of processes spawn to service DNS name lookups. # For heavily loaded caches on large servers, you should # probably increase this value to at least 10. The maximum # is 32. The default is 5. # # You must have at least one dnsserver process. # #Default: # dns_children 5 # TAG: dns_retransmit_interval # Initial retransmit interval for DNS queries. The interval is # doubled each time all configured DNS servers have been tried. # # #Default: # dns_retransmit_interval 5 seconds # TAG: dns_timeout # DNS Query timeout. If no response is received to a DNS query # within this time all DNS servers for the queried domain # are assumed to be unavailable. # #Default: # dns_timeout 2 minutes # TAG: dns_defnames on|off # Normally the RES_DEFNAMES resolver option is disabled # (see res_init(3)). This prevents caches in a hierarchy
Время первой команды журнала | 10:23:24 2006- 9-22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:02:47 2006- 9-22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 74 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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