/l3/users/andrey-f4/sl-voip-2016-03/asterick8.unix.sl/user :1 |
|
$sudo apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: isc-dhcp-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 381 kB of archives. After this operation, 864 kB of additional disk space will be used. ... (Reading database ... 135376 files and directories currently installed.) Preparing to unpack .../isc-dhcp-server_4.3.1-6+deb8u2_amd64.deb ... Unpacking isc-dhcp-server (4.3.1-6+deb8u2) ... Processing triggers for systemd (215-17+deb8u3) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up isc-dhcp-server (4.3.1-6+deb8u2) ... Generating /etc/default/isc-dhcp-server... Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Processing triggers for systemd (215-17+deb8u3) ... |
#vim /root/.l3rc
--- /tmp/l3-saved-3030.22324.20161 2016-03-29 11:37:57.102782637 +0300 +++ .l3rc 2016-03-29 11:38:00.454782696 +0300 @@ -1 +1 @@ -l3cd=/users/andrey_f4/sl-voip-2016-03/asterick8.unix.sl/user +l3cd=/users/andrey-f4/sl-voip-2016-03/asterick8.unix.sl/user |
#pkill -1 l3-agent
|
#exit
exit |
$vim .l3rc
|
$pkill -1 l3-agent
|
$ps aux | grep l3
user 2994 77.6 0.3 66668 27688 ? Rs 11:37 0:30 l3-agent user 3191 0.0 0.0 12728 2168 pts/5 S+ 11:38 0:00 grep l3 |
$su
Password: |
#l3-agent
|
#exit
exit |
$pkill -1 l3-agent
pkill: killing pid 3254 failed: Operation not permitted |
$dpkg -L isc-dhcp-server | gre
grep gresource greytiff |
$dpkg -L isc-dhcp-server | gre
grep gresource greytiff |
$dpkg -L isc-dhcp-server | grep /etc
/etc /etc/init.d /etc/init.d/isc-dhcp-server /etc/dhcp /etc/dhcp/dhcpd.conf |
$vim /etc/dhcp/dhc
|
$vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$fg
# Hosts which require special configuration options can be listed in # host statements. If no address is specified, the address will be # allocated dynamically (if possible), but the host-specific information # will still come from the host declaration. #host passacaglia { # hardware ethernet 0:0:c0:5d:bd:95; # filename "vmuni{.passacaglia"; # server-name "toccata.fugue.com"; #} 69,2 54% ... range 192.168.80.200 192.168.80.250; option routers 192.168.80.1; } { # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. } #subnet 10.254.239.32 netmask 255.255.255.224 { # range dynamic-bootp 10.254.239.40 10.254.239.60; "/etc/dhcp/dhcpd.conf" 107L, 3447C written |
$sudo serv
servertool service |
$sudo service isc-dhcp-server
force-reload restart start status stop |
$sudo service isc-dhcp-server sta
start status |
$sudo service isc-dhcp-server status
● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server) Active: failed (Result: exit-code) since Tue 2016-03-29 11:39:24 MSK; 15min ago Mar 29 11:39:22 asterick8 dhcpd[3692]: in your dhcpd.conf file for the netw...nt Mar 29 11:39:22 asterick8 dhcpd[3692]: to which interface eth0 is attached. ** Mar 29 11:39:22 asterick8 dhcpd[3692]: Mar 29 11:39:22 asterick8 dhcpd[3692]: Mar 29 11:39:22 asterick8 dhcpd[3692]: Not configured to listen on any inte...s! Mar 29 11:39:24 asterick8 isc-dhcp-server[3685]: Starting ISC DHCP server: d...! Mar 29 11:39:24 asterick8 isc-dhcp-server[3685]: failed! Mar 29 11:39:24 asterick8 systemd[1]: isc-dhcp-server.service: control proc...=1 Mar 29 11:39:24 asterick8 systemd[1]: Failed to start LSB: DHCP server. Mar 29 11:39:24 asterick8 systemd[1]: Unit isc-dhcp-server.service entered ...e. Hint: Some lines were ellipsized, use -l to show in full. |
$sudo service isc-dhcp-server restart
|
$ps aux | grep dhcp
root 3973 0.0 0.1 28488 9496 ? Ss 11:55 0:00 /usr/sbin/dhcpd -q -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid user 3996 0.0 0.0 12728 2116 pts/3 S+ 11:56 0:00 grep dhcp |
$cat /var/lib/dhcp/dhc
dhclient.leases dhcpd.leases dhcpd.leases~ |
$cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\225lbmz\304\255"; lease 192.168.80.200 { starts 2 2016/03/29 08:57:12; ends 2 2016/03/29 09:07:12; cltt 2 2016/03/29 08:57:12; binding state active; next binding state free; rewind binding state free; hardware ethernet 34:e6:d7:57:b1:95; uid "\0014\346\327W\261\225"; client-hostname "BLR-CPCCQ32"; } |
$cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\225lbmz\304\255"; lease 192.168.80.200 { starts 2 2016/03/29 08:57:12; ends 2 2016/03/29 09:07:12; cltt 2 2016/03/29 08:57:12; binding state active; next binding state free; rewind binding state free; ... starts 2 2016/03/29 09:02:12; ends 2 2016/03/29 09:12:12; cltt 2 2016/03/29 09:02:12; binding state active; next binding state free; rewind binding state free; hardware ethernet 34:e6:d7:57:b1:95; uid "\0014\346\327W\261\225"; client-hostname "BLR-CPCCQ32"; } |
$cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\225lbmz\304\255"; lease 192.168.80.200 { starts 2 2016/03/29 08:57:12; ends 2 2016/03/29 09:07:12; cltt 2 2016/03/29 08:57:12; binding state active; next binding state free; rewind binding state free; ... starts 2 2016/03/29 09:02:12; ends 2 2016/03/29 09:12:12; cltt 2 2016/03/29 09:02:12; binding state active; next binding state free; rewind binding state free; hardware ethernet 34:e6:d7:57:b1:95; uid "\0014\346\327W\261\225"; client-hostname "BLR-CPCCQ32"; } |
$sudo apt-get install nmap
Reading package lists... Done Building dependency tree Reading state information... Done nmap is already the newest version. nmap set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#vim /etc/ssh/sshd_config
|
$nmap
Nmap 6.47 ( http://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: ... --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged --unprivileged: Assume the user lacks raw socket privileges -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sn 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -Pn -p 80 SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES |
$nmap 192.168.80.0/24 -p 22
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:04 MSK Nmap scan report for 192.168.80.1 Host is up (0.00037s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for asterick8.unix.sl (192.168.80.2) Host is up (0.00019s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for 192.168.80.200 Host is up (0.0012s latency). PORT STATE SERVICE 22/tcp filtered ssh Nmap scan report for 192.168.80.201 Host is up (0.0032s latency). PORT STATE SERVICE 22/tcp closed ssh Nmap done: 256 IP addresses (4 hosts up) scanned in 2.67 seconds |
$nmap 192.168.80.0/24 -p 22
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK Nmap scan report for 192.168.80.1 Host is up (0.00030s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for asterick8.unix.sl (192.168.80.2) Host is up (0.00016s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for 192.168.80.200 Host is up (0.00049s latency). PORT STATE SERVICE 22/tcp filtered ssh Nmap scan report for 192.168.80.201 Host is up (0.0021s latency). PORT STATE SERVICE 22/tcp closed ssh Nmap done: 256 IP addresses (4 hosts up) scanned in 3.00 seconds |
$nmap 192.168.80.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:06 MSK Nmap scan report for 192.168.80.1 Host is up (0.00021s latency). Not shown: 995 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 111/tcp open rpcbind 6000/tcp open X11 9999/tcp open abyss ... 80/tcp open http 443/tcp open https 1947/tcp open sentinelsrm 4445/tcp open upnotifyp Nmap scan report for 192.168.80.201 Host is up (0.021s latency). Not shown: 999 closed ports PORT STATE SERVICE 80/tcp open http Nmap done: 256 IP addresses (4 hosts up) scanned in 6.41 seconds |
$man nm
|
$man nmap
|
$arp -an
bash: arp: command not found |
$sudo arp -an
? (192.168.80.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.80.200) at 34:e6:d7:57:b1:95 [ether] on eth0 ? (192.168.80.201) at 00:0e:08:d0:0e:dd [ether] on eth0 |
$sudo time arp -an
sudo: time: command not found |
$time arp -an
bash: arp: command not found real 0m0.001s user 0m0.000s sys 0m0.000s |
$time arp -an
bash: arp: command not found real 0m0.003s user 0m0.000s sys 0m0.000s |
$su
Password: |
#time arp -an
? (192.168.80.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.80.200) at 34:e6:d7:57:b1:95 [ether] on eth0 ? (192.168.80.201) at 00:0e:08:d0:0e:dd [ether] on eth0 real 0m0.002s user 0m0.000s sys 0m0.000s |
#time
real 0m0.000s user 0m0.000s sys 0m0.000s |
#man time
|
#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-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm asterisk-voicemail freetds-common libcfg4 libcoroipcc4 libcpg4 libcurl3 libfreeradius-client2 libiksemel3 libodbc1 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia-codec2 libpjmedia-videodev2 libpjmedia2 libpjnath2 libpjsip-simple2 libpjsip-ua2 libpjsip2 libpjsua2 libpq5 libresample1 libsensors4 libsnmp-base libsnmp30 ... Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Setting up asterisk-voicemail (1:11.13.1~dfsg-2+b1) ... Setting up libsox-fmt-alsa:amd64 (14.4.1-5) ... Setting up libsox-fmt-base:amd64 (14.4.1-5) ... Setting up sox (14.4.1-5) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... Processing triggers for systemd (215-17+deb8u3) ... |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 110768 5084 ? Ss 10:19 0:00 /sbin/init root 2 0.0 0.0 0 0 ? S 10:19 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 10:19 0:00 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< 10:19 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S 10:19 0:02 [rcu_sched] root 8 0.0 0.0 0 0 ? S 10:19 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S 10:19 0:00 [migration/0] root 10 0.0 0.0 0 0 ? S 10:19 0:00 [watchdog/0] root 11 0.0 0.0 0 0 ? S 10:19 0:00 [watchdog/1] ... root 4163 0.0 0.0 22092 3996 pts/6 Ss+ 12:04 0:00 bash root 4204 0.0 0.0 0 0 ? S 12:04 0:00 [kworker/1:1] root 4339 0.0 0.0 56936 3460 pts/3 S+ 12:08 0:00 su root 4340 0.0 0.0 16268 2068 pts/3 S+ 12:08 0:00 script -f -c ba root 4371 0.0 0.0 16272 156 pts/3 S+ 12:08 0:00 script -f -c ba root 4372 0.0 0.0 22100 4032 pts/7 Ss 12:08 0:00 bash root 4401 0.0 0.0 0 0 ? S 12:09 0:00 [kworker/1:0] asterisk 6084 1.3 0.5 1741936 43408 ? Ssl 12:12 0:00 /usr/sbin/aster asterisk 6085 0.0 0.0 14588 1492 ? S 12:12 0:00 astcanary /var/ root 6160 0.0 0.0 19100 2452 pts/7 R+ 12:13 0:00 ps aux |
#ps aux | grep aster*
avahi 427 0.0 0.0 32232 2780 ? Ss 10:19 0:00 avahi-daemon: running [asterick8.local] asterisk 6084 1.1 0.5 1741936 43408 ? Ssl 12:12 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 6085 0.0 0.0 14588 1492 ? S 12:12 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 6084 root 6169 0.0 0.0 12732 2244 pts/7 S+ 12:13 0:00 grep aster* |
#dpkg -L asterisk
/. /var /var/lib /var/lib/asterisk /var/lib/asterisk/moh /var/lib/asterisk/sounds /var/lib/asterisk/sounds/custom /var/spool /var/spool/asterisk /var/spool/asterisk/dictate ... /usr/sbin/astgenkey /usr/sbin/smsq /usr/sbin/aelparse /usr/sbin/autosupport /usr/sbin/astdb2sqlite3 /usr/sbin/astdb2bdb /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
#dpkg -L asterisk | grep /etc
/etc /etc/logrotate.d /etc/logrotate.d/asterisk /etc/asterisk /etc/init.d /etc/init.d/asterisk /etc/default /etc/default/asterisk |
$ls
acl.conf config_test.conf ooh323.conf adsi.conf console.conf osp.conf agents.conf dbsep.conf oss.conf alarmreceiver.conf dnsmgr.conf phone.conf alsa.conf dsp.conf phoneprov.conf amd.conf dundi.conf queuerules.conf app_mysql.conf enum.conf queues.conf app_skel.conf extconfig.conf res_config_mysql.conf asterisk.adsi extensions.ael res_config_sqlite3.conf asterisk.conf extensions.conf res_config_sqlite.conf ... cel_pgsql.conf manager.conf smdi.conf cel_sqlite3_custom.conf manager.d telcordia-1.adsi cel_tds.conf meetme.conf udptl.conf chan_dahdi.conf mgcp.conf unistim.conf chan_mobile.conf minivm.conf users.conf cli_aliases.conf misdn.conf voicemail.conf cli.conf modules.conf vpb.conf cli_permissions.conf motif.conf xmpp.conf codecs.conf musiconhold.conf confbridge.conf muted.conf |
$dpkg -L mc
/. /etc /etc/mc /etc/mc/mc.menu.sr /etc/mc/mc.keymap /etc/mc/mcedit.menu /etc/mc/mc.emacs.keymap /etc/mc/filehighlight.ini /etc/mc/mc.menu /etc/mc/edit.indent.rc ... /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/mc /usr/bin/mcview /usr/bin/mcdiff /usr/bin/mcedit /usr/share/mc/bin/mc-wrapper.csh /usr/share/mc/bin/mc.csh /usr/share/mc/bin/mc-wrapper.sh /usr/share/mc/bin/mc.sh |
$dpkg -L asterisk | less
|
$sudo apt-get install asterisk-dahdi
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi dahdi-linux fxload libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 The following NEW packages will be installed: asterisk-dahdi dahdi dahdi-linux fxload libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. ... Processing triggers for systemd (215-17+deb8u3) ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.10.0.1~dfsg-1) ... Setting up dahdi (1:2.10.0.1-1) ... Setting up libopenr2-3 (1.3.3-1) ... Setting up libpri1.4 (1.4.15-1) ... Setting up libss7-1 (1.0.2-5) ... Setting up libtonezone2.0:amd64 (1:2.10.0.1-1) ... Setting up asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... |
$sudo mv /etc/asterisk/sip
sip.conf sip_notify.conf |
$sudo mv /etc/asterisk/sip
sip.conf sip_notify.conf |
$sudo vim /etc/asterisk/sip.conf
|
$asterisk -r
bash: asterisk: command not found |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 6084) asterick8*CLI> sip show peer peers peer asterick8*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] asterick8*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo asterisk -vvvr
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 6084) asterick8*CLI> sip show peer peers peer ... 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] -- Registered SIP '2401' at 192.168.80.201:5060 asterick8*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 2401/2401 192.168.80.201 D Auto (No) No 5060 Unmonitored 2402 (Unspecified) D Auto (No) No 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] asterick8*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo vim /etc/is
|
$sudo vim /etc/is
|
$sudo vim /etc/is
|
$sudo vim /etc/dhcp/dhc
|
$sudo vim /etc/dhcp/dhc
|
$sudo vim /etc/dhcp/dhcpd.conf
|
$sudo serv
servertool service |
$sudo serv
servertool service |
$sudo service isc-dhcp-server restart
|
$sudo asterisk -vvvr
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 6084) asterick8*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 2401/2401 192.168.80.201 D Auto (No) No 5060 Unmonitored 2402/2402 192.168.80.200 D Auto (No) No 50189 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] -- Remote UNIX connection -- Remote UNIX connection disconnected == Using SIP RTP CoS mark 5 [Mar 29 14:56:27] NOTICE[6114][C-00000000]: chan_sip.c:25628 handle_request_invite: Call from '2402' (192.168.80.200:50189) to extension '2401' rejected because extension not found in context 'default'. asterick8*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$;
|
$su
Password: su: Authentication failure |
$sudo asterisk -vvvr
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 6084) asterick8*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 2401/2401 192.168.80.201 D Auto (No) No 5060 Unmonitored 2402/2402 192.168.80.200 D Auto (No) No 50189 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] == Using SIP RTP CoS mark 5 [Mar 29 15:02:18] NOTICE[6114][C-00000001]: chan_sip.c:25628 handle_request_invite: Call from '2402' (192.168.80.200:50189) to extension '4000' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Mar 29 15:02:53] NOTICE[6114][C-00000002]: chan_sip.c:25628 handle_request_invite: Call from '2401' (192.168.80.201:5060) to extension '4000' rejected because extension not found in context 'default'. asterick8*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo vim /etc/asterisk/sip
|
$sudo vim /etc/asterisk/sip
|
$sudo vim /etc/asterisk/sip.conf
|
$host=dynamic
[default] exten => 4000,1,Playback(demo-thanks) "/etc/asterisk/extensions.conf" 4L, 50C |
$[ ]
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 6084) asterick8*CLI> dialplan reload Dialplan reloaded. ... -- Time to restore hints and swap in new dialplan: 0.000005 sec -- Time to delete the old dialplan: 0.000067 sec -- Total time merge_contexts_delete: 0.001208 sec == Using SIP RTP CoS mark 5 -- Executing [4001@default:1] Record("SIP/2401-00000005", "/var/tmp/asterisk/message01:gsm") in new stack -- <SIP/2401-00000005> Playing 'beep.gsm' (language 'en') -- Auto fallthrough, channel 'SIP/2401-00000005' status is 'UNKNOWN' asterick8*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo mkdir -p /var/tmp/asterisk/
|
$sudo chown asterisk:asterisk /var/tmp/asterisk/
|
$sudo ls /var/tmp/asterisk/
|
$sudo ls -l /var/tmp/asterisk/
total 0 |
$sudo ls -l /var/tmp/asterisk/
total 0 |
$sudo ls -l /var/tmp/asterisk/
total 0 |
$sudo ls -l /var/tmp/asterisk/
total 0 |
$ls -l /var/tmp/asterisk/
total 0 |
$sudo ls /var/tmp/asterisk/
|
$sudo ls /var/tmp/asterisk/
|
$sudo ls -l /var/tmp/asterisk/
total 0 |
$sudo ls -l /var/tmp/asterisk/
total 0 |
$sudo ls -l /var/tmp/asterisk/
total 0 |
dhclient.leases dhcpd.leases dhcpd.leases~
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\225lbmz\304\255"; lease 192.168.80.200 { starts 2 2016/03/29 08:57:12; ends 2 2016/03/29 09:07:12; cltt 2 2016/03/29 08:57:12; binding state active; next binding state free; rewind binding state free; hardware ethernet 34:e6:d7:57:b1:95; uid "\0014\346\327W\261\225"; client-hostname "BLR-CPCCQ32"; } lease 192.168.80.201 { starts 2 2016/03/29 08:59:45; ends 2 2016/03/29 09:09:45; cltt 2 2016/03/29 08:59:45; binding state active; next binding state free; rewind binding state free; hardware ethernet 00:0e:08:d0:0e:dd; uid "\001\000\016\010\320\016\335"; client-hostname "SipuraSPA"; } lease 192.168.80.200 { starts 2 2016/03/29 09:02:12; ends 2 2016/03/29 09:12:12; cltt 2 2016/03/29 09:02:12; binding state active; next binding state free; rewind binding state free; hardware ethernet 34:e6:d7:57:b1:95; uid "\0014\346\327W\261\225"; client-hostname "BLR-CPCCQ32"; }
Время первой команды журнала | 10:35:27 2016- 3-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:18:27 2016- 3-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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