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

Содержание

Журнал

Среда (12/19/12)

/dev/pts/0
09:19:48
#nmap 192.168.13.2
Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-19 10:20 EET
Interesting ports on 192.168.13.2:
Not shown: 998 filtered ports
PORT   STATE  SERVICE
22/tcp open   ssh
80/tcp closed http
MAC Address: 00:16:3E:00:00:02 (Xensource)
Nmap done: 1 IP address (1 host up) scanned in 4.67 seconds
09:20:05
#nmap 192.168.13.1
Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-19 10:20 EET
Interesting ports on debian1.net.nt (192.168.13.1):
Not shown: 995 closed ports
PORT    STATE SERVICE
7/tcp   open  echo
19/tcp  open  chargen
22/tcp  open  ssh
80/tcp  open  http
111/tcp open  rpcbind
Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds
09:20:27
#telnet 192.168.13.1 7
Trying 192.168.13.1...
Connected to 192.168.13.1.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
09:20:42
#w
 10:21:31 up 1 day, 17:20,  1 user,  load average: 0,00, 0,01, 0,05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     pts/0    192.168.15.102   09:21    0.00s  0.45s  0.06s script -f -c l3script -q /home/user/.lilalo//635720660650531624-1355901707.script
09:21:31
#man w
09:23:40
#man iptables
09:25:15
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  anywhere             anywhere            tcp dpt:ssh
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.13.0/24      anywhere
09:34:20
#iptables -t nat -F

09:34:46
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
09:34:49
#iptables -t nat -I PREROUTING -p tcp --dport 22 -j REDIRECT

09:35:10
#w
 10:35:42 up 1 day, 17:34,  1 user,  load average: 0,05, 0,03, 0,05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     pts/0    192.168.15.102   09:21    0.00s  0.45s  0.06s script -f -c l3script -q /home/user/.lilalo//635720660650531624-1355901707.script
09:35:42
#ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_req=1 ttl=63 time=2.45 ms
64 bytes from 192.168.10.1: icmp_req=2 ttl=63 time=0.906 ms
^C
--- 192.168.10.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.906/1.678/2.451/0.773 ms
09:38:39
#nmap 192.168.10.1
Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-19 10:38 EET
Interesting ports on 192.168.10.1:
Not shown: 997 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
23/tcp open  telnet
80/tcp open  http
Nmap done: 1 IP address (1 host up) scanned in 1.81 seconds
09:38:50
#ping 10.0.0.8
PING 10.0.0.8 (10.0.0.8) 56(84) bytes of data.
^C
--- 10.0.0.8 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms
09:39:24
#ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
^C
--- 10.0.0.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1001ms
09:39:26
#traceroute 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 60 byte packets
 1  net.nt (192.168.13.253)  0.154 ms  0.133 ms  0.121 ms
 2  fobos.net.nt (192.168.13.253)  3003.787 ms !H  3003.775 ms !H  3003.761 ms !H
09:40:33
#ip r l
default via 192.168.13.253 dev eth0
192.168.13.0/24 dev eth0  proto kernel  scope link  src 192.168.13.1
09:40:44
#netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0    236 debian1.net.nt:ssh      192.168.15.102:50034    ESTABLISHED
tcp        0      0 debian1.net.nt:60005    xgu.ru:18030            TIME_WAIT
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ]         DGRAM                    2395     @/org/kernel/udev/udevd
unix  5      [ ]         DGRAM                    3570     /dev/log
unix  3      [ ]         STREAM     CONNECTED     14444
unix  3      [ ]         STREAM     CONNECTED     14443
unix  2      [ ]         DGRAM                    14442
unix  2      [ ]         DGRAM                    11904
unix  2      [ ]         DGRAM                    3591
unix  3      [ ]         DGRAM                    2400
unix  3      [ ]         DGRAM                    2399
09:41:42
#netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
      1 192.168.15.102
      1 Address
      1 servers)
09:43:30
#netstat -ntu
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.13.1:47381      178.63.229.230:18030    TIME_WAIT
tcp        0    236 192.168.13.1:22         192.168.15.102:50034    ESTABLISHED
09:43:45
#netstat -ntu|awk '{print $5}
> '
servers)
Address
178.63.229.230:18030
192.168.15.102:50034
178.63.229.230:18030
09:44:29
#netstat -ntu|awk '{print $5}
                                                 '
servers)
Address
178.63.229.230:18030
192.168.15.102:50034
178.63.229.230:18030
178.63.229.230:18030
09:44:34
#netstat -ntu|awk '{print $5}'|cut -d: f1
cut: вы должны задать список байт, символов или полей
Попробуйте `cut --help' для получения более подробного описания.
09:45:08
#netstat -ntu|awk '{print $5}'|cut -d: f1 | sort
cut: вы должны задать список байт, символов или полей
Попробуйте `cut --help' для получения более подробного описания.
09:45:17