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

Содержание

Журнал

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

/dev/ttyp0
18:16:52
#[root@fbsd4:~]# dig @127.0.0.1 max.net.nt ns
; <<>> DiG 9.3.4-P1 <<>> @127.0.0.1 max.net.nt ns
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54386
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;max.net.nt.                    IN      NS
;; ANSWER SECTION:
max.net.nt.             604800  IN      NS      host1.max.net.nt.
;; ADDITIONAL SECTION:
host1.max.net.nt.       604800  IN      A       192.168.16.24
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 10 19:16:56 2009
;; MSG SIZE  rcvd: 64
18:16:56
#[root@fbsd4:~]# dig @127.0.0.1 max.net.nt axfr
; <<>> DiG 9.3.4-P1 <<>> @127.0.0.1 max.net.nt axfr
; (1 server found)
;; global options:  printcmd
max.net.nt.             604800  IN      SOA     host1.max.net.nt. root.max.net.nt. 14 604800 86400 2419200 604800
max.net.nt.             604800  IN      NS      host1.max.net.nt.
max.net.nt.             604800  IN      MX      5 host1.max.net.nt.
host1.max.net.nt.       604800  IN      A       192.168.16.24
host2.max.net.nt.       604800  IN      A       192.168.16.244
host3.max.net.nt.       604800  IN      A       192.168.16.144
max.net.nt.             604800  IN      SOA     host1.max.net.nt. root.max.net.nt. 14 604800 86400 2419200 604800
;; Query time: 14 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 10 19:16:59 2009
;; XFR size: 7 records (messages 1)
18:16:59
#[root@fbsd4:~]# vim /etc/resolv.conf
search max.net.nt max.unix.nt
nameserver 192.168.16.24
    Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/resolv.conf"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/.resolv.conf.swp"
    to avoid this message.
Swap file "/etc/.resolv.conf.swp" already exists!
"/etc/resolv.conf" [readonly] 6 lines, 126 characters
18:17:19
#[root@fbsd4:~]# vim .vimrc

18:17:27
#[root@fbsd4:~]# vim ~/imrc
~
~
~
~
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
".vimrc" [New File] 2 lines, 18 characters written
18:17:37
#[root@fbsd4:~]# vim /etc/resolv.conf
  2 nameserver 192.168.16.24
~
~
~
  4 nameserver 10.0.17.1
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"/etc/resolv.conf" 3L, 77C written
18:17:53
#[root@fbsd4:~]# vim /etc/host
host.conf    hosts        hosts.allow  hosts.equiv  hosts.lpd
18:17:53
#[root@fbsd4:~]# vim /etc/host
host.conf    hosts        hosts.allow  hosts.equiv  hosts.lpd
18:17:53
#[root@fbsd4:~]# vim /etc/hosts
  1 ::1                     localhost.net.nt localhost
  2 127.0.0.1               localhost.net.nt localhost
  3 192.168.16.24          fbsd4.net.nt fbsd4
  4 192.168.16.24          fbsd4.net.nt.
"/etc/hosts" 4L, 181C
18:18:06
#[root@fbsd4:~]# vim /etc/hosts
  2 192.168.16.24          host1.max.net.nt host1
                           host1.max.net.nt.
  3 192.168.16.24          fbsd4.net.nt fbsd4
~
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"/etc/hosts" 4L, 189C written
18:18:39
#[root@fbsd4:~]#

18:18:39
#[root@fbsd4:~]#

18:18:39
#[root@fbsd4:~]#

18:18:40
#[root@fbsd4:~]# vim /etc/rc.conf
 10 saver="fire"
 11 scrnmap="koi8-r2cp866"
 12 usbd_enable="YES"
 13 inetd_enable="YES"
 14 defaultrouter="192.168.16.254"
 15 ifconfig_re0="inet 192.168.16.24  netmask 255.255.255.0"
 16 ifconfig_re1="inet 192.168.54.1 netmask 255.255.255.224"
 17 hostname="host1.max.net.nt"
 18 static_routes="54_32 54_64 54_96 54_128"
 19 route_54_32="-net 192.168.54.32/27 192.168.54.30"
 20 route_54_64="-net 192.168.54.64/27 192.168.54.30"
 21 route_54_96="-net 192.168.54.96/27 192.168.54.30"
 22 route_54_128="-net 192.168.54.128/27 192.168.54.30"
 23 xinetd_enable="NO"
 24 #
 25 ### Basic network and firewall/security options: ###
 26 firewall_enable="YES"           # Set to YES to enable firewall functionalitt
    y
 34 natd_flags=""                   # Additional flags for natd.
 35 sshd_enable="YES"
"/etc/rc.conf" 36L, 1415C written
18:19:25
#[root@fbsd4:~]#

18:19:25
#[root@fbsd4:~]#

18:19:25
#[root@fbsd4:~]#

18:19:26
#[root@fbsd4:~]# hostname
fbsd4.net.nt
18:19:28
#[root@fbsd4:~]# hostname host1.max.net.nt

18:19:39
#[root@fbsd4:~]# hostname
host1.max.net.nt
18:19:40
#[root@fbsd4:~]# . .bashrc

18:19:50
#[root@fbsd4:~]# . .bash
.bash_history  .bash_profile  .bashrc
18:19:50
#[root@fbsd4:~]# . .bash_profile
Removing stale pidfile
18:19:55
#[root@fbsd4:~]#

18:19:55
#[root@fbsd4:~]#

18:19:56
#[root@fbsd4:~]# exit
exit
Connection to 192.168.16.24 closed.
18:20:08
$ssh 192.168.16.
The authenticity of host '192.168.16.4 (192.168.16.4)' can't be established.
RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.4' (RSA) to the list of known hosts.
root@192.168.16.4's password:
Last login: Wed Aug  5 21:23:00 2009 from fbsd25.net.nt
Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 UTC 2007 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.
l3-agent is already running: pid=1811; pidfile=/root/.lilalo/l3-agent.pid
18:20:26
#vim /etc/resolv.conf
18:20:48
#vim /etc/hosts
18:21:25
#hostname
debian4
18:21:27
#vim /etc/hostname
18:21:36
#hostname
debian4
18:21:37
#hostname -F /etc/hostname

18:21:40
#hostname
host1
18:21:41
#hostname -f
host1.yuriy.net.nt
18:21:42
#ps aux | grep named
bind      1216  0.0  0.7  31596  4240 ?        Ssl  18:02   0:00 /usr/sbin/named -u bind
root      2265  0.0  0.1   4620   740 ttyp1    R+   19:21   0:00 grep named
18:21:51
#dig yuriy.net.nt axfr
; <<>> DiG 9.3.4-P1.1 <<>> yuriy.net.nt axfr
;; global options:  printcmd
; Transfer failed.
18:22:03
#less /var/log/daemon.log
18:22:25
#dig yuriy.net.nt axfr
; <<>> DiG 9.3.4-P1.1 <<>> yuriy.net.nt axfr
;; global options:  printcmd
; Transfer failed.
18:22:26
#less /var/log/daemon.log
18:22:32
#/etc/init.d/bind9 restart
Stopping domain name service...: bind.
Starting domain name service...: bind.
18:23:01
#less /var/log/daemon.log
18:23:12
#ls -l /etc/bind/
итого 48
-rw-r--r-- 1 root root  237 2009-01-06 21:02 db.0
-rw-r--r-- 1 root root  271 2009-01-06 21:02 db.127
-rw-r--r-- 1 root root  237 2009-01-06 21:02 db.255
-rw-r--r-- 1 root root  353 2009-01-06 21:02 db.empty
-rw-r--r-- 1 root root  256 2009-01-06 21:02 db.local
-rw-r--r-- 1 root root 1506 2009-01-06 21:02 db.root
-rwxrwxrwx 1 root bind  494 2009-08-10 18:27 db.yuriy.net.ua
-rw-r--r-- 1 root bind 1766 2009-08-10 18:31 named.conf
-rw-r--r-- 1 root bind  165 2009-01-06 21:02 named.conf.local
-rw-r--r-- 1 root bind  695 2009-01-06 21:02 named.conf.options
-rw-r----- 1 bind bind   77 2009-08-07 20:33 rndc.key
-rw-r--r-- 1 root root 1317 2009-01-06 21:02 zones.rfc1918
18:23:22
#mv /etc/bind/db.yuriy.net.ua /etc/bind/db.yuriy.net.nt

18:23:41
#/etc/init.d/bind9 restart
Stopping domain name service...: bind.
Starting domain name service...: bind.
18:23:45
#less /var/log/daemon.log
18:23:55
#vim /etc/hostname
18:24:02
#vim /etc/bind/db.yuriy.net.nt
18:26:56
#/etc/init.d/bind9 restart
Stopping domain name service...: bind.
Starting domain name service...: bind.
18:26:59
#less /var/log/daemon.log
18:27:05
#dig yuriy.net.nt axfr
; <<>> DiG 9.3.4-P1.1 <<>> yuriy.net.nt axfr
;; global options:  printcmd
; Transfer failed.
18:27:08
#vim /etc/bind/named.conf
18:27:36
#/etc/init.d/bind9 restart
Stopping domain name service...: bind.
Starting domain name service...: bind.
18:27:40
#less /var/log/daemon.log
18:27:48
#dig yuri
; <<>> DiG 9.3.4-P1.1 <<>> yuriy.net.nt axfr
;; global options:  printcmd
; Transfer failed.
18:28:00