/l3/users/mvi/asterisk/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#apt-get install cowsay
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: filters The following NEW packages will be installed: cowsay 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 19.8kB of archives. After this operation, 295kB of additional disk space will be used. Get:1 http://ftp.ua.debian.org lenny/main cowsay 3.03-9.2 [19.8kB] Fetched 19.8kB in 0s (29.7kB/s) Selecting previously deselected package cowsay. (Reading database ... 22148 files and directories currently installed.) Unpacking cowsay (from .../cowsay_3.03-9.2_all.deb) ... Processing triggers for man-db ... Setting up cowsay (3.03-9.2) ... |
#echo fuck | /usr/games/cowsay
______ < fuck > ------ \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#vim ~/.bashrc
--- /tmp/l3-saved-3915.18579.6813 2010-03-15 08:44:52.000000000 -0400 +++ /root/.bashrc 2010-03-15 08:45:07.000000000 -0400 @@ -14,4 +14,4 @@ # alias rm='rm -i' # alias cp='cp -i' # alias mv='mv -i' -. /root/.lilalo/l3bashrc && _l3_start +#. /root/.lilalo/l3bashrc && _l3_start |
#ssh 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: Mon Mar 15 15:20:51 2010 from 192.168.16.3 l3-agent is already running: pid=6059; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#ls -la /tmp/
total 16 drwxrwxrwt 4 root root 4096 2010-03-15 09:27 . drwxr-xr-x 21 root root 4096 2010-03-15 05:57 .. drwxrwxrwt 2 root root 4096 2010-03-15 09:23 .ICE-unix drwxrwxrwt 2 root root 4096 2010-03-15 09:23 .X11-unix |
#kill 2496
|
#ps axw | grep l3
2496 ? Ss 0:00 l3-agent 2668 pts/1 S+ 0:00 grep l3 |
#kill -9 2496
bash: kill: (2496) - No such process |
#ps axw | grep l3
2684 pts/1 S+ 0:00 grep l3 |
#ls -l
total 0 |
#pwd
/root |
#cd /tmp/; wget http://xgu.ru/lilalo/install
--2010-03-15 09:31:24-- http://xgu.ru/lilalo/install Resolving xgu.ru... 212.26.146.51 Connecting to xgu.ru|212.26.146.51|:80... ^C |
#wget http://xgu.ru/lilalo/install
--2010-03-15 09:32:05-- http://xgu.ru/lilalo/install Resolving xgu.ru... 212.26.146.51 Connecting to xgu.ru|212.26.146.51|:80... ^C |
#зштп нфюкг
bash: зштп: command not found |
#ping ya.ru
PING ya.ru (93.158.134.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1014ms |
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping ya.ru
PING ya.ru (93.158.134.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ps axw | grep 3l
2814 pts/1 S+ 0:00 grep 3l |
#vim ~/.bashrc
|
# 2 [ 0.0%] Load average: 0.06 0.03 0.01
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: Mon Mar 15 15:25:47 2010 from 192.168.14.1 l3-agent is already running: pid=6059; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#apt-get install dhcp3
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package dhcp3 |
#apt-get install dhcp3-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: dhcp3-server-ldap The following NEW packages will be installed: dhcp3-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 333kB of archives. After this operation, 782kB of additional disk space will be used. 0% [Connecting to ftp.ua.debian.org (62.149.27.59)]^C |
#cat /etc/resolv.conf
search unix.nt nameserver 10.0.35.1 |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 3999ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.14.0 * 255.255.255.0 U 0 0 0 eth0 default 192.168.14.254 0.0.0.0 UG 0 0 0 eth0 |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_seq=1 ttl=63 time=0.182 ms 64 bytes from 10.0.35.1: icmp_seq=2 ttl=63 time=0.184 ms ^C --- 10.0.35.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.182/0.183/0.184/0.001 ms |
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1012ms |
#ping ya.ru
PING ya.ru (93.158.134.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 13 packets transmitted, 0 received, 100% packet loss, time 12013ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=49 time=53.5 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=49 time=54.2 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 53.511/53.877/54.244/0.433 ms |
#apt-get install dhcp3-server
│ │ │ Non-authoritative version of DHCP server │ │ │ │ The version 3 DHCP server is non-authoritative by default. │ │ │ │ This means that if a client requests an address that the server knows nothing about and the address is incorrect for │ │ that network segment, the server will _not_ send a DHCPNAK (which tells the client it should stop using the address). If │ │ you want to change this behavior, you must explicitly state in dhcpd.conf what network segments your server is │ │ authoritative for using the 'authoritative' statement. │ │ │ ... └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Selecting previously deselected package dhcp3-server. (Reading database ... 22213 files and directories currently installed.) Unpacking dhcp3-server (from .../dhcp3-server_3.1.1-6+lenny4_i386.deb) ... Processing triggers for man-db ... Setting up dhcp3-server (3.1.1-6+lenny4) ... Generating /etc/default/dhcp3-server... Starting DHCP server: dhcpd3check syslog for diagnostics. failed! failed! invoke-rc.d: initscript dhcp3-server, action "start" failed. |
#vim /etc/dhcp3/dhcpd.conf
--- /tmp/l3-saved-2599.2187.32184 2010-03-15 09:47:12.000000000 -0400 +++ /etc/dhcp3/dhcpd.conf 2010-03-15 09:50:29.000000000 -0400 @@ -41,11 +41,11 @@ # 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; +subnet 192.168.14.0 netmask 255.255.255.0 { + range 192.168.14.100 192.168.14.200; # option broadcast-address 10.254.239.31; # option routers rtr-239-32-1.example.org; -#} +} # A slightly different configuration for an internal subnet. #subnet 10.5.5.0 netmask 255.255.255.224 { |
#/etc/init.d/dhcp3-server start\
> |
#/etc/init.d/dhcp3-server start
Starting DHCP server: dhcpd3. |
#/etc/init.d/dhcp3-server stop
Stopping DHCP server: dhcpd3 failed! |
#/etc/init.d/dhcp3-server start
Starting DHCP server: dhcpd3. |
#netstat -l
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:sunrpc *:* LISTEN tcp 0 0 *:57619 *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 localhost:smtp *:* LISTEN tcp6 0 0 [::]:ssh [::]:* LISTEN udp 0 0 *:799 *:* udp 0 0 *:46240 *:* udp 0 0 *:bootps *:* udp 0 0 *:sunrpc *:* raw 0 0 *:icmp *:* 7 Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 5618 /var/run/acpid.socket |
#netstat -ln
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:57619 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN udp 0 0 0.0.0.0:799 0.0.0.0:* udp 0 0 0.0.0.0:46240 0.0.0.0:* udp 0 0 0.0.0.0:67 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* raw 0 0 0.0.0.0:1 0.0.0.0:* 7 Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 5618 /var/run/acpid.socket |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1884/portmap tcp 0 0 0.0.0.0:57619 0.0.0.0:* LISTEN 1895/rpc.statd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2149/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2416/exim4 tcp6 0 0 :::22 :::* LISTEN 2149/sshd udp 0 0 0.0.0.0:799 0.0.0.0:* 1895/rpc.statd udp 0 0 0.0.0.0:46240 0.0.0.0:* 1895/rpc.statd udp 0 0 0.0.0.0:67 0.0.0.0:* 2934/dhcpd3 udp 0 0 0.0.0.0:111 0.0.0.0:* 1884/portmap raw 0 0 0.0.0.0:1 0.0.0.0:* 7 2934/dhcpd3 Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 5618 2138/acpid /var/run/acpid.socket |
#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://ftp.ua.debian.org lenny/main nmap 4.62-1 [1049kB] Fetched 1143kB in 2s (560kB/s) Selecting previously deselected package libpcap0.8. (Reading database ... 22226 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) ... |
#nmap
Nmap 4.62 ( 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 -sP 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -PN -p 80 SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES |
#nmap 192.168.14.0
Starting Nmap 4.62 ( http://nmap.org ) at 2010-03-15 10:06 EDT Note: Host seems down. If it is really up, but blocking our ping probes, try -PN Nmap done: 1 IP address (0 hosts up) scanned in 0.258 seconds |
#ping 192.168.14.101
PING 192.168.14.101 (192.168.14.101) 56(84) bytes of data. ^C --- 192.168.14.101 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1014ms |
#ping 192.168.14.100
PING 192.168.14.100 (192.168.14.100) 56(84) bytes of data. 64 bytes from 192.168.14.100: icmp_seq=1 ttl=128 time=0.130 ms ^C --- 192.168.14.100 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.130/0.130/0.130/0.000 ms |
#ping 192.168.14.101
PING 192.168.14.101 (192.168.14.101) 56(84) bytes of data. ^C --- 192.168.14.101 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#cat /var/lib/
apt/ dpkg/ libuuid/ nfs/ usbutils/ aptitude/ exim4/ logrotate/ tex-common/ vim/ dhcp3/ initramfs-tools/ misc/ ucf/ x11/ dictionaries-common/ initscripts/ mlocate/ urandom/ |
#cat /var/lib/dhcp3/dhc
dhclient.leases dhcpd.leases dhcpd.leases~ |
#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.14.100 { starts 1 2010/03/15 14:01:29; ends 1 2010/03/15 14:11:29; cltt 1 2010/03/15 14:01:29; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; ... lease 192.168.14.100 { starts 1 2010/03/15 14:05:03; ends 1 2010/03/15 14:15:03; cltt 1 2010/03/15 14:05:03; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; } |
#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 |
#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.14.100 { starts 1 2010/03/15 14:01:29; ends 1 2010/03/15 14:11:29; cltt 1 2010/03/15 14:01:29; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; ... lease 192.168.14.100 { starts 1 2010/03/15 14:05:03; ends 1 2010/03/15 14:15:03; cltt 1 2010/03/15 14:05:03; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; } |
#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.14.100 { starts 1 2010/03/15 14:01:29; ends 1 2010/03/15 14:11:29; cltt 1 2010/03/15 14:01:29; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; ... lease 192.168.14.100 { starts 1 2010/03/15 14:05:03; ends 1 2010/03/15 14:15:03; cltt 1 2010/03/15 14:05:03; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; } |
#apt-get install asterisk asterisk-config
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-sounds-main ca-certificates debhelper gettext html2text intltool-debian libasound2 libc-client2007b libcompress-raw-zlib-perl libcompress-zlib-perl libcurl3 libdigest-hmac-perl libdigest-sha1-perl libfile-remove-perl libgsm1 libiksemel3 libio-compress-base-perl libio-compress-zlib-perl libio-stringy-perl libltdl3 libmail-box-perl libmail-sendmail-perl libmailtools-perl libmime-types-perl libobject-realize-later-perl libogg0 libperl5.10 libpq5 libpri1.0 libradiusclient-ng2 libsensors3 libsnmp-base libsnmp15 libspeex1 libspeexdsp1 libsqlite0 libssh2-1 libsys-hostname-long-perl libsysfs2 libtonezone1 liburi-perl libuser-identity-perl libvorbis0a libvorbisenc2 libvpb0 mlock module-assistant ... 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 liburi-perl (1.35.dfsg.1-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) ... |
#mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.SAVE
|
#vim /etc/asterisk/sip.conf.SAVE
|
#cat /etc/asterisk/sip.conf.SAVE | grep xlite
;[xlite1] |
#cat /etc/asterisk/sip.conf.SAVE | grep -x xlite
|
#cat /etc/asterisk/sip.conf.SAVE | grep -p xlite
grep: invalid option -- p Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. |
#cat /etc/asterisk/sip.conf.SAVE | grep -x xlite
|
#cat /etc/asterisk/sip.conf.SAVE | grep gene
[general] ;progressinband=never ; If we should generate in-band ringing always ; You can turn it off on a per peer basis if the general ; one peer only without enabling in the general section. ;callevents=no ; generate manager events when sip ua ; This setting is available in the [general] section as well as in device configurations. ; This has to be enabled in the general section for all devices to work. You can then |
#egrep ^'[a-z]'|^'[gen' /etc/asterisk/sip.conf.SAVE
bash: ^[gen: command not found ^C |
#egrep ^'[a-z]'|^[gen /etc/asterisk/sip.conf.SAVE
bash: ^[gen: command not found ^C |
#egrep ^'[a-z]'|^\[gen /etc/asterisk/sip.conf.SAVE
bash: ^[gen: command not found ^C |
#egrep ^'[a-z]'|^\'[gen' /etc/asterisk/sip.conf.SAVE
> |
#egrep ^'[a-z]'|^\'[gen' /etc/asterisk/sip.conf.SAVE
> |
#egrep ^'[a-z]|^\[gen' /etc/asterisk/sip.conf.SAVE
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls |
#egrep ^'[a-z]|^\[gen' /etc/asterisk/sip.conf.SAVE > /etc/asterisk/sip.conf
|
#cat /etc/asterisk/sip.conf
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls |
#cat /etc/asterisk/sip.conf.SAVE | sed '/xlite/,/p;d'
sed: -e expression #1, char 12: unterminated address regex |
#cat /etc/asterisk/sip.conf.SAVE | sed '/xlite//p;d'
sed: -e expression #1, char 8: unknown command: `/' |
#cat /etc/asterisk/sip.conf.SAVE | sed '/xlite/p;d'
;[xlite1] |
#cat /etc/asterisk/sip.conf.SAVE | sed '/xlite/,/mailbox/p;d'
;[xlite1] ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed ;type=friend ;regexten=1234 ; When they register, create extension 1234 ;callerid="Jane Smith" <5678> ;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 ulaw ;allow=ulaw ;allow=alaw ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes |
#cat /etc/asterisk/sip.conf.SAVE | sed '/xlite/,/mailbox/p;d' >> /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2599.14609.19742 2010-03-15 11:19:03.000000000 -0400 +++ /etc/asterisk/sip.conf 2010-03-15 11:20:14.000000000 -0400 @@ -4,17 +4,16 @@ bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls -;[xlite1] -; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! -; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed -;type=friend -;regexten=1234 ; When they register, create extension 1234 -;callerid="Jane Smith" <5678> -;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 ulaw -;allow=ulaw -;allow=alaw -;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes + +[xlite1] +type=friend +regexten=101 ; When they register, create extension 1234 +callerid="Vlad Myravka" <101> +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 ulaw +allow=ulaw +allow=alaw +#mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes |
#ps axuw | grep aster
asterisk 7237 0.0 0.2 31156 10112 ? Ssl 10:41 0:00 /usr/sbin/asterisk -p -U asterisk root 7580 0.0 0.0 3116 724 pts/1 S+ 11:22 0:00 grep aster |
#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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux1 (pid = 7237) linux1*CLI> sip reload [Mar 15 11:22:22] WARNING[7269]: config.c:768 process_text_line: Unknown directive 'nat=yes' at line 13 of /etc/asterisk/sip.conf [Mar 15 11:22:22] WARNING[7269]: config.c:768 process_text_line: Unknown directive 'canreinvite=no' at line 14 of /etc/asterisk/sip.conf [Mar 15 11:22:22] WARNING[7269]: config.c:768 process_text_line: Unknown directive 'mailbox=1234@default,1233@default' at line 19 of /etc/asterisk/sip.conf linux1*CLI> quit |
#asterisk -rvv
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 ========================================================================= ... Def. Username: SIP Options : (none) Codecs : 0xe (gsm|ulaw|alaw) Codec Order : (gsm:20,ulaw:20,alaw:20) Auto-Framing: No Status : Unmonitored Useragent : Reg. Contact : linux1*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#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 ========================================================================= ... Name/username Host Dyn Nat ACL Port Status NOKIA (Unspecified) D 0 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 1 offline] linux1*CLI> sip show registry Host Username Refresh State Reg.Time linux1*CLI> sip show registry Host Username Refresh State Reg.Time linux1*CLI> sip show registry Host Username Refresh State Reg.Time linux1*CLI> quit |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-7746.1151.1167 2010-03-15 11:33:23.000000000 -0400 +++ /etc/asterisk/sip.conf 2010-03-15 11:33:53.000000000 -0400 @@ -5,7 +5,7 @@ bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls -[NOKIA] +[101] type=friend regexten=101 ; When they register, create extension 1234 secret=101 |
#;secret=101
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 ========================================================================= ... linux1*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 101/101 192.168.14.101 D 5060 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline] linux1*CLI> linux1*CLI> linux1*CLI> linux1*CLI> linux1*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-7746.31562.14276 2010-03-15 11:34:53.000000000 -0400 +++ /etc/asterisk/sip.conf 2010-03-15 11:35:45.000000000 -0400 @@ -5,7 +5,7 @@ bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls -[101] +[NOKIA] type=friend regexten=101 ; When they register, create extension 1234 secret=101 |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-7746.8035.17344 2010-03-15 11:36:20.000000000 -0400 +++ /etc/asterisk/sip.conf 2010-03-15 11:36:28.000000000 -0400 @@ -5,7 +5,7 @@ bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls -[NOKIA] +[101] type=friend regexten=101 ; When they register, create extension 1234 secret=101 |
#exit
exit linux2:~# exit exit |
#exit
exit Connection to 192.168.15.2 closed. |
#vim ~/.bashrc
--- /tmp/l3-saved-2530.11794.1749 2010-03-15 11:40:02.000000000 -0400 +++ /root/.bashrc 2010-03-15 11:40:34.000000000 -0400 @@ -14,4 +14,4 @@ # alias rm='rm -i' # alias cp='cp -i' # alias mv='mv -i' -. /root/.lilalo/l3bashrc && _l3_start +[ $0 == 3lscript ] && . /root/.lilalo/l3bashrc && _l3_start |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5049.26482.3669 2010-03-16 04:57:16.000000000 -0400 +++ /etc/asterisk/extensions.conf 2010-03-16 04:58:07.000000000 -0400 @@ -5,4 +5,5 @@ exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup -exten => _1XX,1,Dial(SIP/${EXTEN}) +exten => _1XX,1,Dial(SIP/${EXTEN},30) +exten => _1XX,n,Playback(vm-isunavail) |
#vim /etc/asterisk/extensions.conf
|
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls
search unix.nt nameserver 10.0.35.1
# 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.14.100 { starts 1 2010/03/15 14:01:29; ends 1 2010/03/15 14:11:29; cltt 1 2010/03/15 14:01:29; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; } lease 192.168.14.100 { starts 1 2010/03/15 14:01:31; ends 1 2010/03/15 14:11:31; cltt 1 2010/03/15 14:01:31; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; } lease 192.168.14.100 { starts 1 2010/03/15 14:05:03; ends 1 2010/03/15 14:15:03; cltt 1 2010/03/15 14:05:03; binding state active; next binding state free; hardware ethernet 00:07:e9:0c:45:65; uid "\001\000\007\351\014Ee"; client-hostname "comp1"; }
# 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
Время первой команды журнала | 13:38:50 2010- 3-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:58:07 2010- 3-16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 26.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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