/l3/users/Sergey-Bondarenko/asterisk/linux3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 |
|
#vim /etc/bind/named.conf.local
|
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#dig linux3.unix.nt
; <<>> DiG 9.5.1-P3 <<>> linux3.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37481 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;linux3.unix.nt. IN A ;; ANSWER SECTION: linux3.unix.nt. 3600 IN A 192.168.15.3 ;; AUTHORITY SECTION: unix.nt. 3600 IN NS sky.unix.nt. ;; ADDITIONAL SECTION: sky.unix.nt. 3600 IN A 10.0.35.1 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:41:54 2010 ;; MSG SIZE rcvd: 82 |
#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:112944 errors:0 dropped:0 overruns:0 frame:0 TX packets:107353 errors:0 dropped:0 overruns:0 carrier:6 collisions:0 txqueuelen:1000 RX bytes:31223948 (29.7 MiB) TX bytes:19648655 (18.7 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:380 errors:0 dropped:0 overruns:0 frame:0 TX packets:380 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:53026 (51.7 KiB) TX bytes:53026 (51.7 KiB) |
#ping 192.168.15.3
PING 192.168.15.3 (192.168.15.3) 56(84) bytes of data. ^C --- 192.168.15.3 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1013ms |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9 waiting for pid 7549 to die. Starting domain name service...: bind9. |
#ping 192.168.16.3
PING 192.168.16.3 (192.168.16.3) 56(84) bytes of data. 64 bytes from 192.168.16.3: icmp_seq=1 ttl=64 time=0.022 ms 64 bytes from 192.168.16.3: icmp_seq=2 ttl=64 time=0.021 ms ^C --- 192.168.16.3 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.021/0.021/0.022/0.004 ms |
#ping linux3.unix.nt
PING linux3.unix.nt (192.168.16.3) 56(84) bytes of data. 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.023 ms 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.022 ms 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.018 ms 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=4 ttl=64 time=0.023 ms ^C --- linux3.unix.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2997ms rtt min/avg/max/mdev = 0.018/0.021/0.023/0.005 ms |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#dig khr.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43967 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN A ;; ANSWER SECTION: khr.unix.nt. 604800 IN A 192.168.16.3 ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt.khr.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:46:56 2010 ;; MSG SIZE rcvd: 74 |
#dig khr.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26117 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN MX ;; ANSWER SECTION: khr.unix.nt. 604800 IN MX 10 linux3.unix.nt.khr.unix.nt. ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt.khr.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:46:59 2010 ;; MSG SIZE rcvd: 74 |
#l3-agent
l3-agent is already running: pid=3253; pidfile=/root/.lilalo/l3-agent.pid |
#dig khr.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4253 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN MX ;; ANSWER SECTION: khr.unix.nt. 604800 IN MX 10 linux3.unix.nt.khr.unix.nt. ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt.khr.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:50:44 2010 ;; MSG SIZE rcvd: 74 |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#dig khm.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> khm.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11375 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;khm.unix.nt. IN MX ;; ANSWER SECTION: khm.unix.nt. 10752 IN MX 10 linux2.unix.nt. ;; AUTHORITY SECTION: khm.unix.nt. 10752 IN NS linux2.unix.nt. ;; ADDITIONAL SECTION: linux2.unix.nt. 3600 IN A 192.168.15.2 ;; Query time: 14 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:51:39 2010 ;; MSG SIZE rcvd: 82 |
#ping khm.unix.nt
ping: unknown host khm.unix.nt |
#ping kv.unix.nt
ping: unknown host kv.unix.nt |
#ping odessa.unix.nt
ping: unknown host odessa.unix.nt |
#ping khr.unix.nt
PING khr.unix.nt (192.168.16.3) 56(84) bytes of data. 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.018 ms 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.022 ms 64 bytes from linux3.unix.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.022 ms ^C --- khr.unix.nt ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.018/0.020/0.022/0.005 ms |
#dig khr.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14633 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN A ;; ANSWER SECTION: khr.unix.nt. 604800 IN A 192.168.16.3 ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:52:44 2010 ;; MSG SIZE rcvd: 66 |
#dig khm.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khm.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30219 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khm.unix.nt. IN A ;; AUTHORITY SECTION: khm.unix.nt. 3533 IN SOA linux2.unix.nt. root.khm.unix.nt. 2010031701 3600 3600 3600 3600 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:52:57 2010 ;; MSG SIZE rcvd: 77 |
#host
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time] [-R number] [-m flag] hostname [server] -a is equivalent to -v -t ANY -c specifies query class for non-IN data -C compares SOA records on authoritative nameservers -d is equivalent to -v -l lists all hosts in a domain, using AXFR -i IP6.INT reverse lookups -N changes the number of dots allowed before root lookup is done -r disables recursive processing -R specifies number of retries for UDP packets -s a SERVFAIL response should stop query -t specifies the query type -T enables TCP/IP mode -v enables verbose output -w specifies to wait forever for a reply -W specifies how long to wait for a reply -4 use IPv4 query transport only -6 use IPv6 query transport only -m set memory debugging flag (trace|record|usage) |
#dig khr.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16795 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN A ;; ANSWER SECTION: khr.unix.nt. 604800 IN A 192.168.16.3 ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:53:55 2010 ;; MSG SIZE rcvd: 66 |
#dig odessa.unix.nt
; <<>> DiG 9.5.1-P3 <<>> odessa.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 38770 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;odessa.unix.nt. IN A ;; AUTHORITY SECTION: . 10683 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2010031601 1800 900 604800 86400 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:54:03 2010 ;; MSG SIZE rcvd: 107 |
#dig khr.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41251 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN A ;; ANSWER SECTION: khr.unix.nt. 604800 IN A 192.168.16.3 ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:54:20 2010 ;; MSG SIZE rcvd: 66 |
#ping odessa.unix.nt
ping: unknown host odessa.unix.nt |
#dig khr.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> khr.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1463 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khr.unix.nt. IN MX ;; ANSWER SECTION: khr.unix.nt. 604800 IN MX 10 linux3.unix.nt. ;; AUTHORITY SECTION: khr.unix.nt. 604800 IN NS linux3.unix.nt. ;; Query time: 14 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:56:47 2010 ;; MSG SIZE rcvd: 66 |
#dig odessa.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> odessa.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44977 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;odessa.unix.nt. IN MX ;; AUTHORITY SECTION: . 10482 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2010031601 1800 900 604800 86400 ;; Query time: 4 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:57:24 2010 ;; MSG SIZE rcvd: 107 |
#dig odessa.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> odessa.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 19521 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;odessa.unix.nt. IN MX ;; AUTHORITY SECTION: . 10436 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2010031601 1800 900 604800 86400 ;; Query time: 14 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:58:10 2010 ;; MSG SIZE rcvd: 107 |
#rndc flush
|
#dig odessa.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> odessa.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61575 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;odessa.unix.nt. IN MX ;; ANSWER SECTION: odessa.unix.nt. 10782 IN MX 10 linux1.unix.nt. ;; AUTHORITY SECTION: odessa.unix.nt. 10782 IN NS linux1.unit.nt. ;; ADDITIONAL SECTION: linux1.unix.nt. 3600 IN A 192.168.14.1 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 10:58:19 2010 ;; MSG SIZE rcvd: 97 |
#apt-get install sendmail sensible-mda sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc rmail logcheck resolvconf sasl2-bin The following packages will be REMOVED: exim4 exim4-base exim4-config exim4-daemon-light The following NEW packages will be installed: ... please investigate. Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.3-5+lenny1) ... Setting up sendmail (8.14.3-5+lenny1) ... |
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-8065.29937.16633 2010-03-17 11:37:36.000000000 +0200 +++ /etc/mail/sendmail.mc 2010-03-17 11:41:13.000000000 +0200 @@ -54,7 +54,7 @@ dnl # FEATURE(`no_default_msa')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl -DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl +DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl dnl # @@ -104,6 +104,6 @@ dnl # Masquerading options FEATURE(`always_add_domain')dnl -MASQUERADE_AS(`linux3.unix.nt.unix.nt')dnl +MASQUERADE_AS(`khm.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl |
#vim /etc/mail/se
|
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-9926.29361.25083 2010-03-17 11:40:22.000000000 +0200 +++ /etc/mail/sendmail.mc 2010-03-17 11:41:24.000000000 +0200 @@ -97,13 +97,15 @@ include(`/etc/mail/m4/dialup.m4')dnl include(`/etc/mail/m4/provider.m4')dnl dnl # -dnl # Default Mailer setup -MAILER_DEFINITIONS -MAILER(`local')dnl -MAILER(`smtp')dnl dnl # Masquerading options FEATURE(`always_add_domain')dnl MASQUERADE_AS(`linux3.unix.nt.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl + +dnl # Default Mailer setup +MAILER_DEFINITIONS +MAILER(`local')dnl +MAILER(`smtp')dnl + |
#define(`_USE_ETC_MAIL_')dnl
divert(-1)dnl #----------------------------------------------------------------------------- # $Sendmail: debproto.mc,v 8.14.3 2010-01-29 14:02:50 cowboy Exp $ # # Copyright (c) 1998-2008 Richard Nelson. All Rights Reserved. # # cf/debian/sendmail.mc. Generated from sendmail.mc.in by configure. # user name: root host name: linux3.unix.nt process ID: 9892 (still running) ... FEATURE(`conncontrol', `nodelay', `terminate')dnl FEATURE(`ratecontrol', `nodelay', `terminate')dnl dnl # dnl # If you're on a dialup link, you should enable this - so sendmail dnl # will not bring up the link (it will queue mail for later) dnl define(`confCON_EXPENSIVE',`True')dnl dnl # dnl # Dialup/LAN connection overrides dnl # include(`/etc/mail/m4/dialup.m4')dnl |
#include(`/etc/mail/m4/provider.m4')dnl
E325: ATTENTION Found a swap file by the name "/etc/mail/.sendmail.mc.swp" owned by: root dated: Wed Mar 17 11:38:55 2010 file name: /etc/mail/sendmail.mc modified: YES user name: root host name: linux3.unix.nt process ID: 9892 (still running) While opening file "/etc/mail/sendmail.mc" dnl # dnl # The greet_pause feature stops some automail bots - but check the ... "/etc/mail/sendmail.mc" 111L, 4231C written MAILER_DEFINITIONS MAILER(`local')dnl MAILER(`smtp')dnl dnl # Masquerading options FEATURE(`always_add_domain')dnl MASQUERADE_AS(`linux3.unix.nt.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl -- INSERT -- |
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-9926.23695.23245 2010-03-17 11:41:29.000000000 +0200 +++ /etc/mail/sendmail.mc 2010-03-17 11:42:03.000000000 +0200 @@ -54,7 +54,7 @@ dnl # FEATURE(`no_default_msa')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl -DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl +DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl dnl # @@ -100,7 +100,7 @@ dnl # Masquerading options FEATURE(`always_add_domain')dnl -MASQUERADE_AS(`linux3.unix.nt.unix.nt')dnl +MASQUERADE_AS(`linux3.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9 waiting for pid 8157 to die. Starting domain name service...: bind9. |
#netstat -lnp |grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10135/sendmail: MTA |
#telnet 127.0.0.1 25
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 linux3.unix.nt ESMTP Sendmail 8.14.3/8.14.3/Debian-5+lenny1; Wed, 17 Mar 2010 11:46:46 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1] HELLO pupkin.ua 500 5.5.1 Command unrecognized: "HELLO pupkin.ua" mail to:root@khr.unix.nt 503 5.0.0 Polite people say HELO first helo pupkin 250 linux3.unix.nt Hello localhost [127.0.0.1], pleased to meet you ... data 354 Enter mail, end with "." on a line by itself bla-bla . 250 2.0.0 o2H9kkPc010320 Message accepted for delivery ^] telnet> exit ?Invalid command telnet> quit Connection closed. |
#/etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd. |
#netstat -lnp | grep 110
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10469/inetd |
#cat /etc/aliases
# /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: user3 |
#su -c user3
bash: user3: command not found |
#su - user3
Password: su: Authentication failure |
#su user3
|
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user3": 2 messages 2 new >N 1 user3@linux3.unix Mon Mar 15 06:17 18/779 *** SECURITY information for linux3.unix.nt.unix.nt *** N 2 root@linux3.unix. Wed Mar 17 11:49 11/404 & exit |
$su
Password: su: Authentication failure |
$su
Password: su: Authentication failure You have mail in /var/mail/user3 |
#passwd user3
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#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:123353 errors:0 dropped:0 overruns:0 frame:0 TX packets:117042 errors:0 dropped:0 overruns:0 carrier:6 collisions:0 txqueuelen:1000 RX bytes:36705135 (35.0 MiB) TX bytes:20923424 (19.9 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:1649 errors:0 dropped:0 overruns:0 frame:0 TX packets:1649 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:179328 (175.1 KiB) TX bytes:179328 (175.1 KiB) |
#~
access databases peers/ service.switch tls/ access.db helpfile sasl/ service.switch-nodns trusted-users address.resolve local-host-names sendmail.cf smrsh/ aliases m4/ sendmail.conf submit.cf aliases.db Makefile sendmail.mc submit.mc |
#vim /etc/mail/access
--- /tmp/l3-saved-10526.5097.1675 2010-03-17 12:01:23.000000000 +0200 +++ /etc/mail/access 2010-03-17 12:02:19.000000000 +0200 @@ -97,6 +97,7 @@ #Connect:172.29 RELAY #Connect:172.30 RELAY #Connect:172.31 RELAY +Connect::192.168.1.16 RELAY Connect:192.168 RELAY #GreetPause:192.168 0 #ClientRate:192.168 0 |
#vim /etc/mail/access
|
#vim /etc/asterisk/voicemail.conf
|
#vim /etc/asterisk/d
|
#vim /etc/asterisk/voicemail.conf
|
#;externnotify=/usr/bin/myapp
;externnotify=/usr/bin/myapp ;smdiport=/dev/ttyS0 ; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>,<pager_email>,<options> ; if the e-mail is specified, a message will be sent when a message is ; received, to the given mailbox. If pager is specified, a message will be ; sent there as well. If the password is prefixed by '-', then it is ; considered to be unchangeable. ; military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM ... ; ; Mailboxes may be organized into multiple contexts for ~ "/etc/asterisk/voicemail.conf" 252L, 11791C written ; [other] ;The intro can be customized on a per-context basis ;directoryintro=dir-company2 1234 => 5678,Company2 User,root@localhost ~ |
#asterisk -rvvv
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 ========================================================================= ... -- Executing [301@group3:1] Dial("SIP/302-0818e9e0", "SIP/301|10") in new stack -- Called 301 -- SIP/301-08194618 is ringing -- Nobody picked up in 10000 ms == Auto fallthrough, channel 'SIP/302-0818e9e0' status is 'NOANSWER' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#apt-get install ejabberd
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: erlang-base erlang-nox libsctp1 lksctp-tools Suggested packages: libunix-syslog-perl erlang-x11 erlang erlang-manpages erlang-doc-html The following NEW packages will be installed: ejabberd erlang-base erlang-nox libsctp1 lksctp-tools 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 28.4MB of archives. After this operation, 47.1MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp2.debian.org.ua lenny/main libsctp1 1.0.9.dfsg-1 [27.7kB] Get:2 http://ftp2.debian.org.ua lenny/main erlang-base 1:12.b.3-dfsg-4 [6668kB] Get:3 http://ftp2.debian.org.ua lenny/main erlang-nox 1:12.b.3-dfsg-4 [20.5MB] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-9926.17405.27038 2010-03-17 12:31:57.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-17 12:32:17.000000000 +0200 @@ -8,6 +8,8 @@ ;exten => 301,1,Dial(SIP/301) +exten => 4800,1,VoicemailMain() + exten => _3XX,1,Dial(SIP/${EXTEN},10) exten => _3XX,n,Voicemail(${EXTEN}@default) exten => _3XX,n,Playback(vm-isunavail) |
#date
Wed Mar 17 12:46:51 EET 2010 |
#vim /etc/asterisk/
|
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-9926.21980.26090 2010-03-17 12:51:57.000000000 +0200 +++ /etc/asterisk/voicemail.conf 2010-03-17 12:52:44.000000000 +0200 @@ -72,7 +72,7 @@ ; For the directory, you can override the intro file if you want ;directoryintro=dir-intro ; The character set for voicemail messages can be specified here -;charset=ISO-8859-1 +charset=UTF-8 ; The ADSI feature descriptor number to download to ;adsifdn=0000000F ; The ADSI security lock code |
#vim /etc/asterisk/voicemail.conf
|
#ping khm.unix.nt
ping: unknown host khm.unix.nt |
#top
top - 14:54:50 up 1 day, 5:27, 11 users, load average: 1.87, 1.74, 1.67 Tasks: 165 total, 2 running, 162 sleeping, 1 stopped, 0 zombie Cpu(s): 87.4%us, 0.2%sy, 0.0%ni, 12.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3099904k total, 992232k used, 2107672k free, 139632k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 5855684k total, 0k used, 5855684k free, 392296k cached 3253 root 20 0 23232 19m 1564 R 99 0.6 650:56.90 l3-agent 10587 user3 20 0 13792 10m 1516 S 71 0.3 146:42.93 l3-agent 2898 root 20 0 369m 28m 9460 S 5 0.9 40:50.24 Xorg 3388 user3 20 0 178m 87m 23m S 0 2.9 4:52.25 xulrunner-stub ... 917 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1 918 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_2 919 root 15 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_3 1010 root 15 -5 0 0 0 S 0 0.0 0:03.72 kjournald 1086 root 16 -4 3092 1696 488 S 0 0.1 0:00.16 udevd 2021 daemon 20 0 1892 512 416 S 0 0.0 0:00.00 portmap 2032 statd 20 0 1956 724 624 S 0 0.0 0:00.00 rpc.statd 2309 root 15 -5 0 0 0 S 0 0.0 0:09.64 kondemand/0 2310 root 15 -5 0 0 0 S 0 0.0 0:00.00 kondemand/1 2360 root 20 0 28268 1416 960 S 0 0.0 0:00.18 rsyslogd |
#dig khm.unix.nt
; <<>> DiG 9.5.1-P3 <<>> khm.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46488 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khm.unix.nt. IN A ;; AUTHORITY SECTION: khm.unix.nt. 3595 IN SOA linux2.unix.nt. root.khm.unix.nt. 2010031701 3600 3600 3600 3600 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 14:26:49 2010 ;; MSG SIZE rcvd: 77 |
#dig khm.unix.nt -a
Invalid option: -a Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt} {global-d-opt} host [@local-server] {local-d-opt} [ host [@local-server] {local-d-opt} [...]] Use "dig -h" (or "dig -h | more") for complete list of options |
#dig khm.unix.nt a
; <<>> DiG 9.5.1-P3 <<>> khm.unix.nt a ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24119 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;khm.unix.nt. IN A ;; AUTHORITY SECTION: khm.unix.nt. 3581 IN SOA linux2.unix.nt. root.khm.unix.nt. 2010031701 3600 3600 3600 3600 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Mar 17 14:27:03 2010 ;; MSG SIZE rcvd: 77 |
#linux2.unix.nt
bash: linux2.unix.nt: command not found |
#ping linux2.unix.nt
PING linux2.unix.nt (192.168.15.2) 56(84) bytes of data. 64 bytes from linux2.unix.nt (192.168.15.2): icmp_seq=1 ttl=63 time=0.223 ms 64 bytes from linux2.unix.nt (192.168.15.2): icmp_seq=2 ttl=63 time=0.234 ms 64 bytes from linux2.unix.nt (192.168.15.2): icmp_seq=3 ttl=63 time=0.237 ms ^C --- linux2.unix.nt ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 0.223/0.231/0.237/0.013 ms |
#ejabberdctl
Usage: ejabberdctl [--node nodename] command [options] Available commands in this ejabberd node: status get ejabberd status stop stop ejabberd restart restart ejabberd reopen-log reopen log file register user server password register a user unregister user server unregister a user backup file store a database backup to file restore file restore a database backup from file ... rem-rosteritem user1 server1 user2 server2 Remove user2@server2 from user1@server1's roster compile file recompile and reload file status-num status number of logged users with status push-alltoall server group adds all the users to all the users in Group srg-user-del user server group host delete user@server from group on host connected-users list all established sessions Examples: ejabberdctl restart ejabberdctl --node ejabberd@host restart ejabberdctl vhost jabber.example.org ... |
#ejabberdctl status
Node ejabberd@linux3 is started. Status: started ejabberd is running |
#ejabberdctl register
Usage: ejabberdctl [--node nodename] command [options] Available commands in this ejabberd node: status get ejabberd status stop stop ejabberd restart restart ejabberd reopen-log reopen log file register user server password register a user unregister user server unregister a user backup file store a database backup to file restore file restore a database backup from file ... rem-rosteritem user1 server1 user2 server2 Remove user2@server2 from user1@server1's roster compile file recompile and reload file status-num status number of logged users with status push-alltoall server group adds all the users to all the users in Group srg-user-del user server group host delete user@server from group on host connected-users list all established sessions Examples: ejabberdctl restart ejabberdctl --node ejabberd@host restart ejabberdctl vhost jabber.example.org ... |
#ejabberdctl register admin linux3.unix.nt admin
Can't register user "admin@linux3.unix.nt" at node ejabberd@linux3: not_allowed |
#ejabberdctl register admin khr.unix.nt admin
Can't register user "admin@khr.unix.nt" at node ejabberd@linux3: not_allowed |
#ejabberdctl register admin linux3.unix.nt admin
Can't register user "admin@linux3.unix.nt" at node ejabberd@linux3: not_allowed |
#ejabberdctl register user linux3.unix.nt user
Can't register user "user@linux3.unix.nt" at node ejabberd@linux3: not_allowed |
#ejabberdctl register user linux3.unix.nt user
Can't register user "user@linux3.unix.nt" at node ejabberd@linux3: not_allowed |
#ejabberdctl set-password admin linux2.unix.nt rootpass
|
#ejabberdctl set-password user linux3.unix.nt user
|
#ejabberdctl set-password admin linux3.unix.nt admin
|
#dpkg-reconfigure ejabberd
Package configuration âââââââââââââââââââââââââââ⤠Configuring ejabberd ââââââââââââââââââââââââââââ â Please reenter the password for the administrative user for verification. â â â â The password for the admin account again for verification: â â â â*****_______________________________________________________________________ â â â â <Ok> â â â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Replacing config file /etc/ejabberd/ejabberd.cfg with new version Starting jabber server: ejabberd. Waiting for ejabberd to register admin user. Admin user "admin@linux3.unix.nt" is registered successfully. |
#apt-get install gajim
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: nautilus-sendto python-avahi aspell-en The following NEW packages will be installed: gajim 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 3437kB of archives. After this operation, 11.6MB of additional disk space will be used. Get:1 http://ftp2.debian.org.ua lenny/main gajim 0.11.4-3 [3437kB] Fetched 3437kB in 4s (770kB/s) Selecting previously deselected package gajim. (Reading database ... 95538 files and directories currently installed.) Unpacking gajim (from .../gajim_0.11.4-3_i386.deb) ... Processing triggers for menu ... Processing triggers for man-db ... Setting up gajim (0.11.4-3) ... Processing triggers for menu ... |
#gajim
You must not launch Gajim as root, it is INSECURE libnotify-Message: Unable to get session bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Requires docutils 0.4 for set_classes to be available creating /root/.gajim directory (gajim.py:13446): GnomeUI-WARNING **: While connecting to session manager: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed. creating /root/.gajim/vcards directory creating /root/.gajim/avatars directory creating logs database ^Z [1]+ Stopped gajim |
# /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: user3
localhost linux3.unix.nt
Время первой команды журнала | 09:29:29 2010- 3-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:50:06 2010- 3-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.78 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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