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

Содержание

Журнал

Понедельник (03/15/10)

/dev/pts/1
14:49:58
#apt-get install dhcp3 server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package dhcp3
/dev/pts/3
14:49:58
#apt-get install dhcp3 server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package dhcp3
/dev/pts/1
14:50:06
#apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
dhcp3-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/dev/pts/3
14:50:06
#apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
dhcp3-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/dev/pts/1
14:50:10
#cat /etc/resolv.conf
search unix.nt
nameserver 10.0.35.1
/dev/pts/3
14:50:10
#cat /etc/resolv.conf
search unix.nt
nameserver 10.0.35.1
/dev/pts/1
14:50:25
#nano /etc/dhcp3/dhcpd.conf
/dev/pts/3
14:50:25
#nano /etc/dhcp3/dhcpd.conf
--- /tmp/l3-saved-5789.11601.21840	2010-03-15 15:52:41.000000000 +0200
+++ /etc/dhcp3/dhcpd.conf	2010-03-15 15:54:35.000000000 +0200
@@ -48,14 +48,14 @@
 #}
 
 # A slightly different configuration for an internal subnet.
-#subnet 10.5.5.0 netmask 255.255.255.224 {
-#  range 10.5.5.26 10.5.5.30;
+ subnet 192.168.16.0 netmask 255.255.255.0 {
+ range 192.168.16.10 192.168.16.70;
 #  option domain-name-servers ns1.internal.example.org;
-#  option domain-name "internal.example.org";
-#  option routers 10.5.5.1;
-#  option broadcast-address 10.5.5.31;
-#  default-lease-time 600;
-#  max-lease-time 7200;
+#  option domain-name "internal.example.org"; 
+ option routers 192.168.16.254;
+ option broadcast-address 192.168.16.255;
+ default-lease-time 600;
+ max-lease-time 7200;
 #}
 
 # Hosts which require special configuration options can be listed in
/dev/pts/1
14:54:48
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/3
14:54:48
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/1
14:54:51
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/3
14:54:51
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/1
14:54:52
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
14:54:52
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/3
14:54:52
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
14:54:52
#/etc/init.d/dhcp3-server start
dhcpd self-test failed. Please fix the config file.
The error was:
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 58: unexpected end of file
#}
  ^
Configuration file errors encountered -- exiting
/dev/pts/1
14:54:53
#vim /etc/dhcp3/dhcpd.conf
/dev/pts/3
14:54:53
#vim /etc/dhcp3/dhcpd.conf
/dev/pts/1
14:56:21
#tail /var/log/daemon.log
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
Mar 15 09:54:53 linux3 dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Mar 15 09:54:53 linux3 dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Mar 15 09:54:53 linux3 dhcpd: All rights reserved.
Mar 15 09:54:53 linux3 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Mar 15 09:54:53 linux3 dhcpd: /etc/dhcp3/dhcpd.conf line 58: unexpected end of file
Mar 15 09:54:53 linux3 dhcpd: #}
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
/dev/pts/3
14:56:21
#tail /var/log/daemon.log
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
Mar 15 09:54:53 linux3 dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Mar 15 09:54:53 linux3 dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Mar 15 09:54:53 linux3 dhcpd: All rights reserved.
Mar 15 09:54:53 linux3 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Mar 15 09:54:53 linux3 dhcpd: /etc/dhcp3/dhcpd.conf line 58: unexpected end of file
Mar 15 09:54:53 linux3 dhcpd: #}
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
/dev/pts/1
14:56:50
#ps aux | grep dhcp
root      6959  0.0  0.0   3528  1564 ?        Ss   15:56   0:00 /usr/sbin/dhcpd3 -q
/dev/pts/3
14:56:50
#ps aux | grep dhcp
root      6959  0.0  0.0   3528  1564 ?        Ss   15:56   0:00 /usr/sbin/dhcpd3 -q
/dev/pts/1
14:57:04
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20725 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:33140735 (31.6 MiB)  TX bytes:1645333 (1.5 MiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:98 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9209 (8.9 KiB)  TX bytes:9209 (8.9 KiB)
/dev/pts/3
14:57:04
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20725 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:33140735 (31.6 MiB)  TX bytes:1645333 (1.5 MiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:98 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9209 (8.9 KiB)  TX bytes:9209 (8.9 KiB)
/dev/pts/1
15:01:58
#tail /var/log/daemon.log
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
Mar 15 09:54:53 linux3 dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Mar 15 09:54:53 linux3 dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Mar 15 09:54:53 linux3 dhcpd: All rights reserved.
Mar 15 09:54:53 linux3 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Mar 15 09:54:53 linux3 dhcpd: /etc/dhcp3/dhcpd.conf line 58: unexpected end of file
Mar 15 09:54:53 linux3 dhcpd: #}
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
/dev/pts/3
15:01:58
#tail /var/log/daemon.log
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
Mar 15 09:54:53 linux3 dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Mar 15 09:54:53 linux3 dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Mar 15 09:54:53 linux3 dhcpd: All rights reserved.
Mar 15 09:54:53 linux3 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Mar 15 09:54:53 linux3 dhcpd: /etc/dhcp3/dhcpd.conf line 58: unexpected end of file
Mar 15 09:54:53 linux3 dhcpd: #}
Mar 15 09:54:53 linux3 dhcpd:   ^
Mar 15 09:54:53 linux3 dhcpd: Configuration file errors encountered -- exiting
/dev/pts/1
15:06:10
#ps aux | grep dhcp
root      6959  0.0  0.0   3656  2212 ?        Ss   15:56   0:00 /usr/sbin/dhcpd3 -q
root      7010  0.0  0.0   3116   720 pts/4    R+   16:06   0:00 grep dhcp
/dev/pts/3
15:06:10
#ps aux | grep dhcp
root      6959  0.0  0.0   3656  2212 ?        Ss   15:56   0:00 /usr/sbin/dhcpd3 -q
root      7010  0.0  0.0   3116   720 pts/4    R+   16:06   0:00 grep dhcp
/dev/pts/1
15:07:52
#ct /var/lib/dhcp3/dhcpd.leases
bash: ct: command not found
/dev/pts/3
15:07:52
#ct /var/lib/dhcp3/dhcpd.leases
bash: ct: command not found
/dev/pts/1
15:08:00
#cat /var/lib/dhcp3/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.1.1
lease 192.168.16.10 {
  starts 1 2010/03/15 14:01:33;
  ends 1 2010/03/15 14:11:33;
  cltt 1 2010/03/15 14:01:33;
  binding state active;
  next binding state free;
  hardware ethernet 00:0f:fe:7e:b9:7f;
  uid "\001\000\017\376~\271\177";
...
lease 192.168.16.10 {
  starts 1 2010/03/15 14:06:33;
  ends 1 2010/03/15 14:16:33;
  cltt 1 2010/03/15 14:06:33;
  binding state active;
  next binding state free;
  hardware ethernet 00:0f:fe:7e:b9:7f;
  uid "\001\000\017\376~\271\177";
  client-hostname "WIN-JBGR48APGOV";
}
/dev/pts/3
15:08:00
#cat /var/lib/dhcp3/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-V3.1.1
lease 192.168.16.10 {
  starts 1 2010/03/15 14:01:33;
  ends 1 2010/03/15 14:11:33;
  cltt 1 2010/03/15 14:01:33;
  binding state active;
  next binding state free;
  hardware ethernet 00:0f:fe:7e:b9:7f;
  uid "\001\000\017\376~\271\177";
...
lease 192.168.16.10 {
  starts 1 2010/03/15 14:06:33;
  ends 1 2010/03/15 14:16:33;
  cltt 1 2010/03/15 14:06:33;
  binding state active;
  next binding state free;
  hardware ethernet 00:0f:fe:7e:b9:7f;
  uid "\001\000\017\376~\271\177";
  client-hostname "WIN-JBGR48APGOV";
}
/dev/pts/1
15:08:06
#ping 192.168.16.11
PING 192.168.16.11 (192.168.16.11) 56(84) bytes of data.
64 bytes from 192.168.16.11: icmp_seq=1 ttl=64 time=0.605 ms
64 bytes from 192.168.16.11: icmp_seq=2 ttl=64 time=0.476 ms
64 bytes from 192.168.16.11: icmp_seq=3 ttl=64 time=0.477 ms
64 bytes from 192.168.16.11: icmp_seq=4 ttl=64 time=0.484 ms
^C
--- 192.168.16.11 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.476/0.510/0.605/0.059 ms
/dev/pts/3
15:08:06
#ping 192.168.16.11
PING 192.168.16.11 (192.168.16.11) 56(84) bytes of data.
64 bytes from 192.168.16.11: icmp_seq=1 ttl=64 time=0.605 ms
64 bytes from 192.168.16.11: icmp_seq=2 ttl=64 time=0.476 ms
64 bytes from 192.168.16.11: icmp_seq=3 ttl=64 time=0.477 ms
64 bytes from 192.168.16.11: icmp_seq=4 ttl=64 time=0.484 ms
^C
--- 192.168.16.11 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.476/0.510/0.605/0.059 ms
/dev/pts/1
15:08:21
#apt-g install nmap
bash: apt-g: command not found
/dev/pts/3
15:08:21
#apt-g install nmap
bash: apt-g: command not found
/dev/pts/1
15:09:10
#apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libpcap0.8
The following NEW packages will be installed:
  libpcap0.8 nmap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1143kB of archives.
After this operation, 3936kB of additional disk space will be used.
...
Get:2 http://ftp2.debian.org.ua lenny/main nmap 4.62-1 [1049kB]
Fetched 1143kB in 1s (784kB/s)
Selecting previously deselected package libpcap0.8.
(Reading database ... 90657 files and directories currently installed.)
Unpacking libpcap0.8 (from .../libpcap0.8_0.9.8-5_i386.deb) ...
Selecting previously deselected package nmap.
Unpacking nmap (from .../archives/nmap_4.62-1_i386.deb) ...
Processing triggers for man-db ...
Setting up libpcap0.8 (0.9.8-5) ...
Setting up nmap (4.62-1) ...
/dev/pts/3
15:09:10
#apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libpcap0.8
The following NEW packages will be installed:
  libpcap0.8 nmap
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1143kB of archives.
After this operation, 3936kB of additional disk space will be used.
...
Get:2 http://ftp2.debian.org.ua lenny/main nmap 4.62-1 [1049kB]
Fetched 1143kB in 1s (784kB/s)
Selecting previously deselected package libpcap0.8.
(Reading database ... 90657 files and directories currently installed.)
Unpacking libpcap0.8 (from .../libpcap0.8_0.9.8-5_i386.deb) ...
Selecting previously deselected package nmap.
Unpacking nmap (from .../archives/nmap_4.62-1_i386.deb) ...
Processing triggers for man-db ...
Setting up libpcap0.8 (0.9.8-5) ...
Setting up nmap (4.62-1) ...
/dev/pts/1
15:09:19
#nmap 192.168.16.0/24 -p 80
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-15 16:09 EET
Interesting ports on linux3.unix.nt (192.168.16.3):
PORT   STATE  SERVICE
80/tcp closed http
Interesting ports on 192.168.16.10:
PORT   STATE    SERVICE
80/tcp filtered http
MAC Address: 00:0F:FE:7E:B9:7F (G-pro Computer)
Interesting ports on 192.168.16.11:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:04:13:24:E5:7E (Snom Technology AG)
Interesting ports on 192.168.16.254:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:15:60:7A:63:80 (Hewlett Packard)
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.410 seconds
/dev/pts/3
15:09:19
#nmap 192.168.16.0/24 -p 80
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-15 16:09 EET
Interesting ports on linux3.unix.nt (192.168.16.3):
PORT   STATE  SERVICE
80/tcp closed http
Interesting ports on 192.168.16.10:
PORT   STATE    SERVICE
80/tcp filtered http
MAC Address: 00:0F:FE:7E:B9:7F (G-pro Computer)
Interesting ports on 192.168.16.11:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:04:13:24:E5:7E (Snom Technology AG)
Interesting ports on 192.168.16.254:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:15:60:7A:63:80 (Hewlett Packard)
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.410 seconds
/dev/pts/1
15:09:37
#apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  asterisk-config asterisk-sounds-main debhelper gettext html2text
  intltool-debian libc-client2007b libcompress-raw-zlib-perl
  libcompress-zlib-perl libdigest-hmac-perl libdigest-sha1-perl
  libfile-remove-perl libiksemel3 libio-compress-base-perl
  libio-compress-zlib-perl libio-stringy-perl libmail-box-perl
  libmail-sendmail-perl libmailtools-perl libmime-types-perl
...
Setting up libio-stringy-perl (2.110-4) ...
Setting up libmime-types-perl (1.24-1) ...
Setting up libmailtools-perl (2.03-1) ...
Setting up libobject-realize-later-perl (0.18-1) ...
Setting up libuser-identity-perl (0.92-2) ...
Setting up libmail-box-perl (2.082-2) ...
Setting up libsys-hostname-long-perl (1.4-2) ...
Setting up libmail-sendmail-perl (0.79-5) ...
Setting up module-assistant (0.10.11.0) ...
Setting up vpb-driver-source (4.2.38.1-1) ...
/dev/pts/3
15:09:37
#apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  asterisk-config asterisk-sounds-main debhelper gettext html2text
  intltool-debian libc-client2007b libcompress-raw-zlib-perl
  libcompress-zlib-perl libdigest-hmac-perl libdigest-sha1-perl
  libfile-remove-perl libiksemel3 libio-compress-base-perl
  libio-compress-zlib-perl libio-stringy-perl libmail-box-perl
  libmail-sendmail-perl libmailtools-perl libmime-types-perl
...
Setting up libio-stringy-perl (2.110-4) ...
Setting up libmime-types-perl (1.24-1) ...
Setting up libmailtools-perl (2.03-1) ...
Setting up libobject-realize-later-perl (0.18-1) ...
Setting up libuser-identity-perl (0.92-2) ...
Setting up libmail-box-perl (2.082-2) ...
Setting up libsys-hostname-long-perl (1.4-2) ...
Setting up libmail-sendmail-perl (0.79-5) ...
Setting up module-assistant (0.10.11.0) ...
Setting up vpb-driver-source (4.2.38.1-1) ...
/dev/pts/1
15:18:03
#apt-get install asterisk-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
asterisk-config is already the newest version.
asterisk-config set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/dev/pts/3
15:18:03
#apt-get install asterisk-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
asterisk-config is already the newest version.
asterisk-config set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
прошло 23 минуты
/dev/pts/1
15:41:12
#cp /etc/asterisk/sip.conf /etc/asterisk/sip.conf.backup

/dev/pts/3
15:41:12
#cp /etc/asterisk/sip.conf /etc/asterisk/sip.conf.backup

/dev/pts/1
15:45:17
#vi /etc/asterisk/sip.conf
/dev/pts/3
15:45:17
#vi /etc/asterisk/sip.conf
прошло 26 минут
/dev/pts/1
16:11:56
#bindport=5060 ; UDP Port to bind to (SIP standard port is 50

/dev/pts/3
16:11:56
#bindport=5060 ; UDP Port to bind to (SIP standard port is 50

/dev/pts/1
16:12:38
#vi /etc/asterisk/sip.conf
/dev/pts/3
16:12:38
#vi /etc/asterisk/sip.conf
/dev/pts/1
16:16:02
#[general]
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44594 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31168 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:48528856 (46.2 MiB)  TX bytes:2436089 (2.3 MiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:100 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9293 (9.0 KiB)  TX bytes:9293 (9.0 KiB)
/dev/pts/3
16:16:02
#[general]
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44594 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31168 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:48528856 (46.2 MiB)  TX bytes:2436089 (2.3 MiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:100 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9293 (9.0 KiB)  TX bytes:9293 (9.0 KiB)
/dev/pts/1
16:16:04
#nano /etc/asterisk/sip.conf
/dev/pts/3
16:16:04
#nano /etc/asterisk/sip.conf
/dev/pts/1
16:19:01
#[general]

/dev/pts/3
16:19:01
#[general]

/dev/pts/1
16:20:17
#[general]

/dev/pts/3
16:20:17
#[general]

/dev/pts/1
16:20:40
#[general]
[general]
context=default
allowoverlap=no                 ; Disable overlap dialing support. (Def
bindport=5060                   ; UDP Port to bind to (SIP standard por
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds
srvlookup=yes                   ; Enable DNS SRV lookups on outbound ca
[xlite1]
type=friend
regexten=301                   ; When they register, create extension
callerid="Mr Hide" <301>
...
type=friend
regexten=302                    ; When they register, create extension
callerid="Dr Jekil" <301>
host=dynamic                    ; This device needs to register
nat=yes                         ; X-Lite is behind a NAT router
canreinvite=no                  ; Typically set to NO if behind NAT
disallow=all
allow=gsm                       ; GSM consumes far less bandwidth than
allow=ulaw
allow=alaw
/dev/pts/3
16:20:40
#[general]
[general]
context=default
allowoverlap=no                 ; Disable overlap dialing support. (Def
bindport=5060                   ; UDP Port to bind to (SIP standard por
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds
srvlookup=yes                   ; Enable DNS SRV lookups on outbound ca
[xlite1]
type=friend
regexten=301                   ; When they register, create extension
callerid="Mr Hide" <301>
...
type=friend
regexten=302                    ; When they register, create extension
callerid="Dr Jekil" <301>
host=dynamic                    ; This device needs to register
nat=yes                         ; X-Lite is behind a NAT router
canreinvite=no                  ; Typically set to NO if behind NAT
disallow=all
allow=gsm                       ; GSM consumes far less bandwidth than
allow=ulaw
allow=alaw
/dev/pts/1
16:22:27
#asterisk -r
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
linux3*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
ipsnom/ipsnom              192.168.16.11    D   N      2048     Unmonitored
xlite1/xlite1              192.168.16.10    D   N      51692    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
[Mar 15 17:33:21] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:21] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:23] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:23] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
linux3*CLI> exit
/dev/pts/3
16:22:27
#asterisk -r
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
linux3*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
ipsnom/ipsnom              192.168.16.11    D   N      2048     Unmonitored
xlite1/xlite1              192.168.16.10    D   N      51692    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
[Mar 15 17:33:21] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:21] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:23] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
[Mar 15 17:33:23] NOTICE[9425]: chan_sip.c:15642 handle_request_register: Registration from '"Dr Jekyl" <sip:302@192.168.16.3>' failed for '192.168.16.11' - No matching peer found
linux3*CLI> exit
прошло 11 минут
/dev/pts/1
16:33:33
#!n
nano /etc/asterisk/sip.conf
/dev/pts/3
16:33:33
#!n
nano /etc/asterisk/sip.conf
/dev/pts/1
16:33:57
#[general]
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
/dev/pts/3
16:33:57
#[general]
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.

Вторник (03/16/10)

/dev/pts/1
08:30:11
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:69 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:9745 (9.5 KiB)  TX bytes:14013 (13.6 KiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
/dev/pts/2
08:30:11
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:69 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:9745 (9.5 KiB)  TX bytes:14013 (13.6 KiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
/dev/pts/1
08:30:15
#ping 192.168.16.254
PING 192.168.16.254 (192.168.16.254) 56(84) bytes of data.
64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.644 ms
64 bytes from 192.168.16.254: icmp_seq=2 ttl=64 time=0.655 ms
^C
--- 192.168.16.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.644/0.649/0.655/0.026 ms
/dev/pts/2
08:30:15
#ping 192.168.16.254
PING 192.168.16.254 (192.168.16.254) 56(84) bytes of data.
64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.644 ms
64 bytes from 192.168.16.254: icmp_seq=2 ttl=64 time=0.655 ms
^C
--- 192.168.16.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.644/0.649/0.655/0.026 ms
08:30:25
#ping 192.168.16.55
PING 192.168.16.55 (192.168.16.55) 56(84) bytes of data.
From 192.168.16.3 icmp_seq=2 Destination Host Unreachable
From 192.168.16.3 icmp_seq=3 Destination Host Unreachable
From 192.168.16.3 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.16.55 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4003ms
, pipe 3
/dev/pts/1
08:30:25
#ping 192.168.16.55
PING 192.168.16.55 (192.168.16.55) 56(84) bytes of data.
From 192.168.16.3 icmp_seq=2 Destination Host Unreachable
From 192.168.16.3 icmp_seq=3 Destination Host Unreachable
From 192.168.16.3 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.16.55 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4003ms
, pipe 3
08:30:32
#netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.16.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.16.254  0.0.0.0         UG        0 0          0 eth0
/dev/pts/2
08:30:32
#netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.16.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.16.254  0.0.0.0         UG        0 0          0 eth0
/dev/pts/1
08:38:48
#ssh root@192.168.15.2
root@192.168.15.2's password:
Linux linux2 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 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.
Last login: Tue Mar 16 09:46:22 2010 from linux8.unix.nt
l3-agent is already running: pid=3687; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/2
08:38:48
#ssh root@192.168.15.2
root@192.168.15.2's password:
Linux linux2 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 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.
Last login: Tue Mar 16 09:46:22 2010 from linux8.unix.nt
l3-agent is already running: pid=3687; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/1
08:47:30
#screen -x
/dev/pts/2
08:47:30
#screen -x
/dev/pts/1
08:48:19
#screen -x
/dev/pts/2
08:48:19
#screen -x
/dev/pts/6
08:49:02
#vi /etc/asterisk/sip.conf
08:52:06
#:q
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
linux3*CLI> voicemail show users
Context    Mbox  User                      Zone       NewMsg
default    general New User                                  0
default    1234  Example Mailbox                           0
other      1234  Company2 User                             0
    -- Remote UNIX connection
Executing last minute cleanups
  == Destroying musiconhold processes
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/8
08:55:23
#ls /var/lib/dhcp3/
dhclient.leases  dhcpd.leases  dhcpd.leases~
08:55:32
#less /var/lib/dhcp3/dhcpd.leases
08:55:50
#nmap -p 80 '192.168.16.*'
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-16 09:56 EET
Interesting ports on linux3.unix.nt (192.168.16.3):
PORT   STATE  SERVICE
80/tcp closed http
Interesting ports on 192.168.16.254:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:15:60:7A:63:80 (Hewlett Packard)
Nmap done: 256 IP addresses (2 hosts up) scanned in 5.786 seconds
08:56:08
#nmap -p 80 '192.168.16.*'
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-16 09:56 EET
Interesting ports on linux3.unix.nt (192.168.16.3):
PORT   STATE  SERVICE
80/tcp closed http
Interesting ports on 192.168.16.254:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:15:60:7A:63:80 (Hewlett Packard)
Nmap done: 256 IP addresses (2 hosts up) scanned in 5.555 seconds
08:56:56
#nmap -p 80 '192.168.16.*'
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-16 09:57 EET
Interesting ports on linux3.unix.nt (192.168.16.3):
PORT   STATE  SERVICE
80/tcp closed http
Interesting ports on 192.168.16.254:
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:15:60:7A:63:80 (Hewlett Packard)
Nmap done: 256 IP addresses (2 hosts up) scanned in 5.546 seconds
/dev/pts/10
09:03:47
#apt-cache search asterisk
asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX
asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly)
asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack)
asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk
asterisk-oh323 - H.323 protocol support for Asterisk
asterisk-prompt-de - German voice prompts for the Asterisk PBX
asterisk-prompt-es-co - Colombian Spanish voice prompts for Asterisk
asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins
asterisk-prompt-fr-proformatique - French voice prompts for Asterisk
asterisk-prompt-fr - French voice prompts for Asterisk
...
asterisk-dev - Development files for Asterisk
asterisk-doc - Source code documentation for Asterisk
asterisk-h323 - H.323 protocol support for Asterisk
asterisk-sounds-main - Core Sound files for Asterisk (English)
asterisk - Open Source Private Branch Exchange (PBX)
libiax-dev - implementation of the Inter-Asterisk eXchange protocol (devel)
libiax0 - implementation of the Inter-Asterisk eXchange protocol
iaxmodem - software modem with IAX2 connectivity
libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI
python-asterisk - Asterisk Manager API interface module for Python
09:04:05
#xlite
bash: xlite: command not found
09:05:34
#whereis xlite
xlite:
09:05:40
#apt-cache search xlite

09:05:46
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bc:f0
          inet addr:192.168.16.3  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3791 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5604 errors:0 dropped:0 overruns:0 carrier:6
          collisions:0 txqueuelen:1000
          RX bytes:1516589 (1.4 MiB)  TX bytes:417093 (407.3 KiB)
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:4f:9d
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
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:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3040 (2.9 KiB)  TX bytes:3040 (2.9 KiB)
/dev/pts/12
09:08:47
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- SIP/khm-0818b690 answered SIP/302-08180ae8
    -- Packet2Packet bridging SIP/302-08180ae8 and SIP/khm-0818b690
  == Spawn extension (demo1, 380672346329, 2) exited non-zero on 'SIP/302-08180ae8'
[Mar 16 15:43:24] NOTICE[2814]: chan_sip.c:14441 handle_request_invite: Call from '302' to extension '3806725' rejected because extension not found.
linux3*CLI>
linux3*CLI>
linux3*CLI>
linux3*CLI>
linux3*CLI> quit
Executing last minute cleanups
прошло 16 минут
/dev/pts/10
09:25:33
#ping 192.168.16.254
PING 192.168.16.254 (192.168.16.254) 56(84) bytes of data.
64 bytes from 192.168.16.254: icmp_seq=1 ttl=64 time=0.581 ms
64 bytes from 192.168.16.254: icmp_seq=2 ttl=64 time=0.581 ms
64 bytes from 192.168.16.254: icmp_seq=3 ttl=64 time=0.730 ms
64 bytes from 192.168.16.254: icmp_seq=4 ttl=64 time=0.598 ms
^C
--- 192.168.16.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 0.581/0.622/0.730/0.067 ms
09:25:49
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.16.254  0.0.0.0         UG    0      0        0 eth0
09:32:53
#vim /etc/asterisk/extensions.conf
09:33:56
#vim /etc/asterisk/extensions.conf
--- /dev/null	2010-03-16 09:27:13.505377065 +0200
+++ /etc/asterisk/extensions.conf	2010-03-16 10:36:06.000000000 +0200
@@ -0,0 +1,7 @@
+[demo1]
+
+exten => 4000,1,Answer
+exten => 4000,n,Wait(1)
+exten => 4000,n,Playback(demo-congrats)
+exten => 4000,n,Hangup
+
09:36:06
#cat /etc/asterisk/extensions.conf
[demo1]
exten => 4000,1,Answer
exten => 4000,n,Wait(1)
exten => 4000,n,Playback(demo-congrats)
exten => 4000,n,Hangup
09:44:50
#cat /etc/asterisk/extensions.conf
[demo1]
exten => 4000,1,Answer
exten => 4000,n,Wait(1)
exten => 4000,n,Playback(demo-congrats)
exten => 4000,n,Hangup
exten => 301,1,Dial(SIP/301)

Файлы

  • /etc/asterisk/extensions.conf
  • /etc/resolv.conf
  • /var/lib/dhcp3/dhcpd.leases
  • /etc/asterisk/extensions.conf
    >
    [demo1]
    exten => 4000,1,Answer
    exten => 4000,n,Wait(1)
    exten => 4000,n,Playback(demo-congrats)
    exten => 4000,n,Hangup
    exten => 301,1,Dial(SIP/301)
    
    /etc/resolv.conf
    >
    search unix.nt
    nameserver 10.0.35.1
    
    /var/lib/dhcp3/dhcpd.leases
    >
    # The format of this file is documented in the dhcpd.leases(5) manual page.
    # This lease file was written by isc-dhcp-V3.1.1
    lease 192.168.16.10 {
      starts 1 2010/03/15 14:01:33;
      ends 1 2010/03/15 14:11:33;
      cltt 1 2010/03/15 14:01:33;
      binding state active;
      next binding state free;
      hardware ethernet 00:0f:fe:7e:b9:7f;
      uid "\001\000\017\376~\271\177";
      client-hostname "WIN-JBGR48APGOV";
    }
    lease 192.168.16.11 {
      starts 1 2010/03/15 14:03:08;
      ends 1 2010/03/15 14:13:08;
      cltt 1 2010/03/15 14:03:08;
      binding state active;
      next binding state free;
      hardware ethernet 00:04:13:24:e5:7e;
      uid "\001\000\004\023$\345~";
    }
    lease 192.168.16.10 {
      starts 1 2010/03/15 14:06:33;
      ends 1 2010/03/15 14:16:33;
      cltt 1 2010/03/15 14:06:33;
      binding state active;
      next binding state free;
      hardware ethernet 00:0f:fe:7e:b9:7f;
      uid "\001\000\017\376~\271\177";
      client-hostname "WIN-JBGR48APGOV";
    }
    

    Статистика

    Время первой команды журнала14:49:58 2010- 3-15
    Время последней команды журнала09:44:50 2010- 3-16
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %14.85
    Процент синтаксически неверно набранных команд, % 4.95
    Суммарное время работы с терминалом *, час 2.98
    Количество командных строк в единицу времени, команда/мин 0.57
    Частота использования команд
    [general]10|=========| 9.35%
    apt-get10|=========| 9.35%
    /etc/init.d/dhcp3-server8|=======| 7.48%
    ping7|======| 6.54%
    cat6|=====| 5.61%
    ifconfig5|====| 4.67%
    nmap5|====| 4.67%
    vi5|====| 4.67%
    ps4|===| 3.74%
    screen4|===| 3.74%
    vim4|===| 3.74%
    nano4|===| 3.74%
    tail4|===| 3.74%
    grep4|===| 3.74%
    asterisk3|==| 2.80%
    bindport=50602|=| 1.87%
    apt-g2|=| 1.87%
    UDP2|=| 1.87%
    cp2|=| 1.87%
    netstat2|=| 1.87%
    ct2|=| 1.87%
    ssh2|=| 1.87%
    apt-cache2|=| 1.87%
    !n2|=| 1.87%
    route1|| 0.93%
    xlite1|| 0.93%
    :q1|| 0.93%
    whereis1|| 0.93%
    less1|| 0.93%
    ls1|| 0.93%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$