Журнал лабораторных работ

Содержание

Журнал

Пятница (07/31/09)

/dev/ttyp1
21:24:22
#xconv < /etc/inetd.conf > /etc/xinetd.conf
bash: xconv: command not found
21:24:25
#apt-get install xconv
Чтение списков пакетов... Готово
Построение дерева зависимостей... Готово
E: Не могу найти пакет xconv
21:24:35
#xconv < /etc/inetd.conf > /etc/xinetd.conf
bash: xconv: command not found
21:26:35
#xconv
bash: xconv: command not found
21:26:42
#apt-cache search xconv
xconvers - Hamradio convers client for X/GTK
21:26:53
#route del default

21:27:11
#route add default gw 192.168.16.254

21:27:37
#apt-get install xconvers
Чтение списков пакетов... Готово
Построение дерева зависимостей... Готово
Будут установлены следующие дополнительные пакеты:
  libglib1.2 libgtk1.2 libgtk1.2-common
НОВЫЕ пакеты, которые будут установлены:
  libglib1.2 libgtk1.2 libgtk1.2-common xconvers
обновлено 0, установлено 4 новых пакетов, для удаления отмечено 0 пакетов, и 55 пакетов не обновлено.
Необходимо скачать 1226kБ архивов.
После распаковки объем занятого дискового пространства возрастёт на 3256kB.
Хотите продолжить [Д/н]? y
...
Выбор ранее не выбранного пакета libglib1.2.
Распаковывается пакет libglib1.2 (из файла .../libglib1.2_1.2.10-17_i386.deb)...
Выбор ранее не выбранного пакета libgtk1.2.
Распаковывается пакет libgtk1.2 (из файла .../libgtk1.2_1.2.10-18_i386.deb)...
Выбор ранее не выбранного пакета xconvers.
Распаковывается пакет xconvers (из файла .../xconvers_0.8.4-1_i386.deb)...
Настраивается пакет libgtk1.2-common (1.2.10-18) ...
Настраивается пакет libglib1.2 (1.2.10-17) ...
Настраивается пакет libgtk1.2 (1.2.10-18) ...
Настраивается пакет xconvers (0.8.4-1) ...
21:27:57
#route del default

21:28:01
#route add default gw 192.168.54.33

21:28:13
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data.
64 bytes from ya.ru (77.88.21.8): icmp_seq=1 ttl=48 time=51.9 ms
64 bytes from ya.ru (77.88.21.8): icmp_seq=2 ttl=49 time=58.4 ms
--- ya.ru ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 51.912/55.203/58.494/3.291 ms
21:28:18
#xconv < /etc/inetd.conf > /etc/xinetd.conf
bash: xconv: command not found
21:28:24
#ps aux | grep inetd
root      2485  0.0  0.1   2280   804 ?        Ss   22:11   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive
root      2904  0.0  0.1   4624   744 ttyp4    R+   22:29   0:00 grep inetd
21:29:08
#killall inetd
inetd: no process killed
21:29:23
#/etc/init.d/inetd stop

21:29:54
#/etc/init.d/x
Starting internet superserver: xinetd.
21:30:03
#xconv < /etc/inetd.conf > /etc/xinetd.conf
bash: xconv: command not found
21:30:10
#xconv < /etc/inetd.conf > /etc/xinetd.conf
bash: xconv: command not found
21:30:21
#ps aux | grep inetd
root      2485  0.0  0.1   2280   804 ?        Ss   22:11   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive
root      2956  0.0  0.1   4624   744 ttyp4    R+   22:30   0:00 grep inetd

Понедельник (08/03/09)

/dev/ttyp1
19:10:56
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
прошла 21 минута
19:32:42
#iptables -A INPUT -d 127.0.0.1 -p icmp -j DROP

19:33:45
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       icmp --  anywhere             localhost.localdomain
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:33:47
#ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
--- 127.0.0.1 ping statistics ---
36 packets transmitted, 0 received, 100% packet loss, time 35008ms
19:35:18
#iptables -l --line-number
iptables v1.3.6: Unknown arg `-l'
Try `iptables -h' or 'iptables --help' for more information.
19:35:46
#iptables -l --line-numbers
iptables v1.3.6: Unknown arg `-l'
Try `iptables -h' or 'iptables --help' for more information.
19:35:53
#iptables -l --line-numbers -v
iptables v1.3.6: Unknown arg `-l'
Try `iptables -h' or 'iptables --help' for more information.
19:36:12
#iptables -h
iptables v1.3.6
Usage: iptables -[AD] chain rule-specification [options]
       iptables -[RI] chain rulenum rule-specification [options]
       iptables -D chain rulenum [options]
       iptables -[LFZ] [chain] [options]
       iptables -[NX] chain
       iptables -E old-chain-name new-chain-name
       iptables -P chain target [options]
       iptables -h (print this help information)
Commands:
...
  --out-interface -o [!] output name[+]
                                network interface name ([+] for wildcard)
  --table       -t table        table to manipulate (default: `filter')
  --verbose     -v              verbose mode
  --line-numbers                print line numbers when listing
  --exact       -x              expand numbers (display exact values)
[!] --fragment  -f              match second or further fragments only
  --modprobe=<command>          try to insert modules using this command
  --set-counters PKTS BYTES     set the counter during insert/append
[!] --version   -V              print package version.
19:36:19
#iptables -h|less
19:37:00
#iptables --line-numbers
iptables v1.3.6: no command specified
Try `iptables -h' or 'iptables --help' for more information.
19:37:09
#iptables -L
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    DROP       icmp --  anywhere             localhost.localdomain
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
19:37:28
#iptables -D INUPT 1
iptables: No chain/target/match by that name
19:37:54
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       icmp --  anywhere             localhost.localdomain
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:38:10
#iptables -l
iptables v1.3.6: Unknown arg `-l'
Try `iptables -h' or 'iptables --help' for more information.
19:38:12
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       icmp --  anywhere             localhost.localdomain
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:38:18
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       icmp --  anywhere             localhost.localdomain
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:38:36
#iptables -D INPUT 1

19:38:54
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:39:05
#pint 127.0.0.1
bash: pint: command not found
19:39:12
#ping
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.017 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.014 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.018 ms
--- 127.0.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.014/0.016/0.018/0.001 ms
19:39:20
#iptables -A INPUT -p tcp --dport 80 -j ACCEPT

19:41:44
#iptables -A INPUT -p tcp -j DROP
[root@debian5:~]# iptables -A INPUT -p tcp --dport 22
19:42:07
#iptables -F

/dev/ttyp7
19:43:19
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
DROP       tcp  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:44:03
#iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
2    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
3    DROP       tcp  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
19:44:55
#iptables -D INPUT 3

прошло 15 минут
/dev/ttyp1
20:00:41
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
20:00:50
#iptables -A INPUT -p tcp --dport 5900

20:04:13
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5900
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
20:04:19
#iptables -A INPUT -p tcp --dport 80 -j ACCEPT

20:05:33
#iptables -A INPUT -p tcp --dport 22 -j ACCEPT

20:05:36
#iptables -A INPUT -p tcp --syn -j DROP

20:06:04
#iptables -F

20:08:45
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
20:08:58
#iptables -A INPUT -p tcp --dport 5900 -j ACCEPT

20:09:05
#iptab