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

Содержание

Журнал

Понедельник (03/13/06)

/dev/pts/7
14:20:32
$sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
14:20:35
$sudo /sbin/iptables -t nat -I OUTPUT -d 192.168.1.1 -p tcp --dport 110 -j DNAT --to 192.168.2.254:110

14:21:09
$telnet 192.168.1.1 110
Trying 192.168.1.1...
Connected to tbil.hq.tbih-sb.com.ua (192.168.1.1).
Escape character is '^]'.
+OK <7333.1142253189@region.tbih-sb.com.ua>
^]
telnet> q
Connection closed.
прошло 11 минут
/dev/pts/9
14:32:56
$sudo /sbin/iptables -L
Password:
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
...
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere
LOG        tcp  --  anywhere             anywhere            tcp spt:pop3 LOG level warning
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
прошло 18 минут
14:51:00
$sudo /sbin/iptables -L -n
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:25 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:110 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3022 flags:0x16/0x02
...
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:25 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:143 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:110 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 flags:0x16/0x02
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 flags:0x16/0x02
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
LOG        tcp  --  0.0.0.0/0            0.0.0.0/0           tcp spt:110 LOG flags 0 level 4
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
14:51:22
$history
  856  /sbin/inet_route add -net 192.168.1.0 netmask 255.255.255.0 qw 192.168.2.1
  857  net_route add -net 192.168.1.0 netmask 255.255.255.0 qw 192.168.2.1
  858  /sbin/route add -net 192.168.1.0 netmask 255.255.255.0 qw 192.168.2.1
  859  /sbin/route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
  860  sudo /sbin/route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
  861  sudo /sbin/route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.2.1
  862  sudo /sbin/route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
  863  history
  864  telnet 192.168.2.254 25
  865  ping 192.168.2.254
...
  995   sudo /etc/init.d/iptables restart
  996  w
  997  w
  998  ssh -p 3022 192.168.2.254
  999   telnet 192.168.1.1 110
 1000   telnet 192.168.1.1 25
 1001   telnet 192.168.1.1 25
 1002  sudo /sbin/iptables -L
 1003  sudo /sbin/iptables -L -n
 1004  history
14:53:28
$sudo /sbin/iptables -t nat -L -vv
Password:
Chain PREROUTING (policy ACCEPT 1850 packets, 334K bytes)
 pkts bytes target     prot opt in     out     source               destination
 1151 55248 REDIRECT   tcp  --  eth0   any     192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
   68  3264 DNAT       tcp  --  any    any     anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
  100  4812 DNAT       tcp  --  any    any     anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT 2069 packets, 124K bytes)
 pkts bytes target     prot opt in     out     source               destination
  502 87889 MASQUERADE  all  --  any    any     192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT 1914 packets, 125K bytes)
 pkts bytes target     prot opt in     out     source               destination
    1    60 DNAT       tcp  --  any    any     anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
прошло 12 минут
15:06:07
$!pi
ping mail.ru
PING mail.ru (194.67.57.26) 56(84) bytes of data.
64 bytes from mail.ru (194.67.57.26): icmp_seq=0 ttl=112 time=104 ms
64 bytes from mail.ru (194.67.57.26): icmp_seq=1 ttl=112 time=104 ms
--- mail.ru ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 104.022/104.268/104.514/0.246 ms, pipe 2
15:10:35
$ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.098 ms
--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.098/0.098/0.098/0.000 ms, pipe 2
15:10:42
$ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=0 ttl=64 time=0.093 ms
64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.062 ms
--- 192.168.2.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1013ms
rtt min/avg/max/mdev = 0.062/0.077/0.093/0.017 ms, pipe 2
15:10:47
$ping 192.168.2.254
PING 192.168.2.254 (192.168.2.254) 56(84) bytes of data.
64 bytes from 192.168.2.254: icmp_seq=0 ttl=64 time=0.168 ms
64 bytes from 192.168.2.254: icmp_seq=1 ttl=64 time=0.148 ms
--- 192.168.2.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1014ms
rtt min/avg/max/mdev = 0.148/0.158/0.168/0.010 ms, pipe 2
15:10:51
$ping 80.78.40.174
PING 80.78.40.174 (80.78.40.174) 56(84) bytes of data.
64 bytes from 80.78.40.174: icmp_seq=0 ttl=64 time=0.164 ms
64 bytes from 80.78.40.174: icmp_seq=1 ttl=64 time=0.148 ms
--- 80.78.40.174 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1013ms
rtt min/avg/max/mdev = 0.148/0.156/0.164/0.008 ms, pipe 2
15:12:10
$ sudo vi /etc/sysconfig/iptables
прошло 25 минут
/dev/pts/3
15:37:32
$ping mail.ru
PING mail.ru (194.67.57.26) 56(84) bytes of data.
64 bytes from mail.ru (194.67.57.26): icmp_seq=0 ttl=112 time=104 ms
--- mail.ru ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 104.000/104.000/104.000/0.000 ms, pipe 2
15:37:44
$ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from 64.233.167.99: icmp_seq=0 ttl=244 time=173 ms
--- google.com ping statistics ---
2 packets transmitted, 1 received, 50% packet loss, time 1005ms
rtt min/avg/max/mdev = 173.054/173.054/173.054/0.000 ms, pipe 2
15:37:48
$sudo /sbin/iptables -t nat -L
Password:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
15:38:00
$sudo /sbin/iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere
LOG        tcp  --  anywhere             anywhere            tcp spt:pop3 LOG level warning
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
15:38:04
$sudo vi /etc/sysconfig/iptables
15:39:19
$sudo /sbin/iptables -I FORWARD -j ACCEPT

прошло 30 минут
/dev/pts/9
16:09:31
$ sudo /etc/init.d/iptables restart
Password:
Сбрасываются правила брандмауэÑ[  ОК  ]
Политика цепочек брандмауэра ус[  ОК  ]ливается в ACCEPT: nat mangle filter
Выгружаются модули                        [  ОК  ]
Применяются правила брандмауэрÐ[  ОК  ]:
/dev/pts/3
16:16:23
$w
 16:16:27 up  5:39,  4 users,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    192.168.2.254    10:39    5:04m  0.06s  0.04s script -f -q /h
gabzya   pts/3    gabzya.hq.tbih-s 16:16    0.00s  0.03s  0.03s script -f -q /h
gabzya   pts/5    gabzya.hq.tbih-s 14:17    7:36   0.13s  0.04s script -f -q /h
gabzya   pts/9    gabzya.hq.tbih-s 14:18    1:59   0.04s  0.02s script -f -q /h
прошло 15 минут
/dev/pts/7
16:31:35
$w
exit
 16:48:45 up  6:11,  4 users,  load average: 0,01, 0,01, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    192.168.2.254    10:39    5:36m  0.06s  0.04s script -f -q /home/gabzya/.lilalo//660718662453329664-1142239164.script
gabzya   pts/3    gabzya.hq.tbih-s 16:16    4.00s  0.03s  0.03s script -f -q /home/gabzya/.lilalo//2918720132260707565-1142259383.script
gabzya   pts/5    gabzya.hq.tbih-s 14:17   39:54   0.13s  0.04s script -f -q /home/gabzya/.lilalo//58475094227566663-1142252262.script
gabzya   pts/7    gabzya.hq.tbih-s 16:31    0.00s  0.02s  0.02s script -f -q /home/gabzya/.lilalo//506117108519318535-1142260295.script
прошло 17 минут
16:48:45
$ sudo vi /etc/sysconfig/iptables
прошла 41 минута
/dev/pts/9
17:29:46
$sudo /sbin/iptables -t nat -L -vv
Password:
Chain PREROUTING (policy ACCEPT 1799 packets, 197K bytes)
 pkts bytes target     prot opt in     out     source               destination
  879 42192 REDIRECT   tcp  --  eth0   any     192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
   28  1344 DNAT       tcp  --  any    any     anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
  309 14832 DNAT       tcp  --  any    any     anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT 2364 packets, 139K bytes)
 pkts bytes target     prot opt in     out     source               destination
  767 45116 MASQUERADE  all  --  any    any     192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT 2030 packets, 124K bytes)
 pkts bytes target     prot opt in     out     source               destination
17:29:58
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 70 packets, 10997 bytes)
 pkts bytes target     prot opt in     out     source               destination
21670   12M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
17400 2217K ACCEPT     all  --  eth0   any     anywhere             anywhere
10810 1265K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    2   108 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 53275 packets, 18M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:30:05
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 70 packets, 10997 bytes)
 pkts bytes target     prot opt in     out     source               destination
21712   12M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
17426 2219K ACCEPT     all  --  eth0   any     anywhere             anywhere
10839 1269K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    2   108 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 53347 packets, 18M bytes)
 pkts bytes target     prot opt in     out     source               destination
/dev/pts/9
17:33:23
$sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:33:29
$telnet 192.168.2.254 110
Trying 192.168.2.254...
Connected to 192.168.2.254 (192.168.2.254).
Escape character is '^]'.
+OK <11434.1142264733@region.tbih-sb.com.ua>
^]
telnet> q
Connection closed.
17:33:43
$telnet 192.168.2.254 25
Trying 192.168.2.254...
Connected to 192.168.2.254 (192.168.2.254).
Escape character is '^]'.
220 region.tbih-sb.com.ua ESMTP
^]
telnet> q
Connection closed.
17:33:53
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23033   13M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18032 2262K ACCEPT     all  --  eth0   any     anywhere             anywhere
11008 1288K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 55431 packets, 19M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:34:05
$sudo ifconfig
sudo: ifconfig: command not found
17:34:20
$sudo /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:8F:6D:4B:AB
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:8fff:fe6d:4bab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:206993 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1633 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29016360 (27.6 MiB)  TX bytes:983922 (960.8 KiB)
          Interrupt:10 Base address:0x8c00
eth1      Link encap:Ethernet  HWaddr 00:0E:2E:32:46:15
...
          RX bytes:356152788 (339.6 MiB)  TX bytes:390147527 (372.0 MiB)
          Interrupt:5 Base address:0x6400
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:67325 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67325 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10330207 (9.8 MiB)  TX bytes:10330207 (9.8 MiB)
17:34:23
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23591   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18285 2277K ACCEPT     all  --  eth0   any     anywhere             anywhere
11067 1296K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56324 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:34:34
$sudo /sbin/iptables -I FORWARD -o eth0 -j ACCEPT

17:35:38
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23848   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18380 2285K ACCEPT     all  --  eth0   any     anywhere             anywhere
11135 1304K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56670 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:39
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23892   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18389 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11167 1309K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56749 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:43
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23935   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18390 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11193 1313K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56816 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:44
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23970   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18390 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11219 1317K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56875 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:44
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
23994   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18390 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11245 1321K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56923 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:45
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24028   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18390 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11271 1325K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 56981 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:46
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24064   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18390 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11297 1328K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57040 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:47
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24107   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18393 2286K ACCEPT     all  --  eth0   any     anywhere             anywhere
11326 1333K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    3   168 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57112 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:35:51
$sudo /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:8F:6D:4B:AB
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:8fff:fe6d:4bab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:207707 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1636 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29411860 (28.0 MiB)  TX bytes:984060 (960.9 KiB)
          Interrupt:10 Base address:0x8c00
eth1      Link encap:Ethernet  HWaddr 00:0E:2E:32:46:15
...
          RX bytes:357056942 (340.5 MiB)  TX bytes:391468523 (373.3 MiB)
          Interrupt:5 Base address:0x6400
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:67637 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10373976 (9.8 MiB)  TX bytes:10373976 (9.8 MiB)
/dev/pts/9
17:36:32
$sudo /sbin/iptables -L -vv
exit
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24385   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18488 2292K ACCEPT     all  --  eth0   any     anywhere             anywhere
11389 1341K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57552 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:36:34
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24475   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18544 2297K ACCEPT     all  --  eth0   any     anywhere             anywhere
11436 1347K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    4   228 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57697 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:37:44
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24513   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18553 2298K ACCEPT     all  --  eth0   any     anywhere             anywhere
11462 1351K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    4   228 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57759 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:37:55
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24626   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
18579 2300K ACCEPT     all  --  eth0   any     anywhere             anywhere
11527 1359K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    4   228 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 57948 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
17:38:38
$sudo /sbin/iptables -L -vv
Password:
Chain INPUT (policy DROP 71 packets, 11081 bytes)
 pkts bytes target     prot opt in     out     source               destination
24977   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
19025 2341K ACCEPT     all  --  eth0   any     anywhere             anywhere
11656 1374K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 58521 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
/dev/pts/9
17:46:45
$sudo iptables -t nat -L
sudo: iptables: command not found
17:46:49
$sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:46:53
$sudo /sbin/iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:47:05
$sudo /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:8F:6D:4B:AB
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:8fff:fe6d:4bab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:210236 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1659 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:30048980 (28.6 MiB)  TX bytes:985086 (961.9 KiB)
          Interrupt:10 Base address:0x8c00
eth1      Link encap:Ethernet  HWaddr 00:0E:2E:32:46:15
...
          RX bytes:362485478 (345.6 MiB)  TX bytes:397403625 (378.9 MiB)
          Interrupt:5 Base address:0x6400
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:68034 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68034 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10425533 (9.9 MiB)  TX bytes:10425533 (9.9 MiB)
17:47:21
$sudo /sbin/iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
ACCEPT     all  --  anywhere             anywhere
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:47:27
$sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:47:30
$sudo /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:8F:6D:4B:AB
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:8fff:fe6d:4bab/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:210373 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1662 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:30061535 (28.6 MiB)  TX bytes:985224 (962.1 KiB)
          Interrupt:10 Base address:0x8c00
eth1      Link encap:Ethernet  HWaddr 00:0E:2E:32:46:15
...
          RX bytes:362570962 (345.7 MiB)  TX bytes:397500658 (379.0 MiB)
          Interrupt:5 Base address:0x6400
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:68082 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68082 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10432539 (9.9 MiB)  TX bytes:10432539 (9.9 MiB)
17:48:13
$sudo /sbin/iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.1.0/24       anywhere            tcp dpt:http redir ports 3128
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:smtp to:192.168.2.254
DNAT       tcp  --  anywhere             tbil.hq.tbih-sb.com.ua tcp dpt:pop3 to:192.168.2.254:110
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24      !192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
17:48:25
$sudo /sbin/iptables -L -vv
Chain INPUT (policy DROP 72 packets, 11165 bytes)
 pkts bytes target     prot opt in     out     source               destination
25565   14M ACCEPT     all  --  eth1   any     anywhere             anywhere            state RELATED,ESTABLISHED
19240 2363K ACCEPT     all  --  eth0   any     anywhere             anywhere
11831 1400K ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    1    48 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    5   288 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:3022 flags:SYN,RST,ACK/SYN
...
    0     0 ACCEPT     all  --  eth0   eth1    anywhere             anywhere
    0     0 ACCEPT     all  --  eth1   eth0    anywhere             anywhere            state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:smtp flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:imap flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:pop3 flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:http flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:https flags:SYN,RST,ACK/SYN
    0     0 ACCEPT     all  --  eth0   eth0    anywhere             anywhere
Chain OUTPUT (policy ACCEPT 59261 packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
прошло 24 минуты
/dev/pts/7
18:13:14
$iptables -save
bash: iptables: command not found
18:13:33
$/sbin/iptables -save
iptables v1.3.3: no command specified
Try `iptables -h' or 'iptables --help' for more information.
18:13:41
$iptables-save
bash: iptables-save: command not found
18:13:58
$/sbin/iptables-save
iptables-save v1.3.3: Can't initialize: Permission denied (you must be root)
18:14:05
$sudo /sbin/iptables-save
Password:
# Generated by iptables-save v1.3.3 on Mon Mar 13 18:14:16 2006
*nat
:PREROUTING ACCEPT [2960:327172]
:POSTROUTING ACCEPT [3232:189293]
:OUTPUT ACCEPT [2697:164763]
-A PREROUTING -s 192.168.1.0/255.255.255.0 -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 25 -j DNAT --to-destination 192.168.2.254
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 110 -j DNAT --to-destination 192.168.2.254:110
-A POSTROUTING -s 192.168.1.0/255.255.255.0 -d ! 192.168.2.0/255.255.255.0 -j MASQUERADE
...
-A FORWARD -i eth0 -o eth1 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 25 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 143 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 110 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 443 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -i eth0 -o eth0 -j ACCEPT
COMMIT
# Completed on Mon Mar 13 18:14:16 2006
18:14:16
$dig tbih-sb.com.ua n
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua ns
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36370
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      NS
;; ANSWER SECTION:
tbih-sb.com.ua.         70471   IN      NS      ns.nbi.com.ua.
tbih-sb.com.ua.         70471   IN      NS      ns2.kievweb.com.ua.
;; ADDITIONAL SECTION:
ns.nbi.com.ua.          70471   IN      A       80.78.35.1
ns2.kievweb.com.ua.     70471   IN      A       195.177.68.72
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Mar 13 18:18:35 2006
;; MSG SIZE  rcvd: 111
18:18:35
$dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29593
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         86400   IN      MX      10 mail.tbih-sb.com.ua.
;; AUTHORITY SECTION:
tbih-sb.com.ua.         70445   IN      NS      ns2.kievweb.com.ua.
tbih-sb.com.ua.         70445   IN      NS      ns.nbi.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    70445   IN      A       80.78.40.174
ns.nbi.com.ua.          70445   IN      A       80.78.35.1
ns2.kievweb.com.ua.     70445   IN      A       195.177.68.72
;; Query time: 132 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Mar 13 18:19:01 2006
;; MSG SIZE  rcvd: 148
18:19:01
$dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9877
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         86230   IN      MX      10 mail.tbih-sb.com.ua.
;; AUTHORITY SECTION:
tbih-sb.com.ua.         70275   IN      NS      ns2.kievweb.com.ua.
tbih-sb.com.ua.         70275   IN      NS      ns.nbi.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    70275   IN      A       80.78.40.174
ns.nbi.com.ua.          70275   IN      A       80.78.35.1
ns2.kievweb.com.ua.     70275   IN      A       195.177.68.72
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Mar 13 18:21:51 2006
;; MSG SIZE  rcvd: 148
18:21:51
$sudo /sbin/iptables-save
Password:
# Generated by iptables-save v1.3.3 on Mon Mar 13 18:21:58 2006
*nat
:PREROUTING ACCEPT [3199:346190]
:POSTROUTING ACCEPT [3375:197461]
:OUTPUT ACCEPT [2802:171107]
-A PREROUTING -s 192.168.1.0/255.255.255.0 -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 25 -j DNAT --to-destination 192.168.2.254
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 110 -j DNAT --to-destination 192.168.2.254:110
-A POSTROUTING -s 192.168.1.0/255.255.255.0 -d ! 192.168.2.0/255.255.255.0 -j MASQUERADE
...
-A FORWARD -i eth0 -o eth1 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 25 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 143 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 110 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 443 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -i eth0 -o eth0 -j ACCEPT
COMMIT
# Completed on Mon Mar 13 18:21:58 2006
18:21:58
$prin to file sudo /sbin/iptables-save
bash: prin: command not found
18:22:14
$/sbin/prin to file sudo /sbin/iptables-save
bash: /sbin/prin: Нет такого файла или каталога
18:22:21
$print
bash: print: command not found
18:22:32
$/sbin/print to file sudo /sbin/iptables-save
bash: /sbin/print: Нет такого файла или каталога
18:22:38
$print
bash: print: command not found
18:22:45
$print --help
bash: print: command not found
18:22:50
$man print
18:22:59
$sudo /sbin/iptables-save
# Generated by iptables-save v1.3.3 on Mon Mar 13 18:23:05 2006
*nat
:PREROUTING ACCEPT [3231:349086]
:POSTROUTING ACCEPT [3405:199129]
:OUTPUT ACCEPT [2821:172247]
-A PREROUTING -s 192.168.1.0/255.255.255.0 -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 25 -j DNAT --to-destination 192.168.2.254
-A PREROUTING -d 192.168.1.1 -p tcp -m tcp --dport 110 -j DNAT --to-destination 192.168.2.254:110
-A POSTROUTING -s 192.168.1.0/255.255.255.0 -d ! 192.168.2.0/255.255.255.0 -j MASQUERADE
COMMIT
...
-A FORWARD -i eth0 -o eth1 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 25 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 143 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 110 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -p tcp -m tcp --dport 443 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -i eth0 -o eth0 -j ACCEPT
COMMIT
# Completed on Mon Mar 13 18:23:05 2006
18:23:05
$w
 18:32:25 up  7:55,  3 users,  load average: 0,03, 0,01, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    192.168.2.254    10:39    7:19m  0.06s  0.04s script -f -q /home/gabzya/.lilalo//660718662453329664-1142239164.script
gabzya   pts/3    gabzya.hq.tbih-s 16:16   15:59   0.06s  0.04s script -f -q /home/gabzya/.lilalo//2918720132260707565-1142259383.script
gabzya   pts/7    gabzya.hq.tbih-s 16:31    0.00s  0.05s  0.03s script -f -q /home/gabzya/.lilalo//506117108519318535-1142260295.script

Вторник (03/14/06)

09:14:03
$!dig
dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7232
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         32011   IN      MX      10 mail.tbih-sb.com.ua.
;; AUTHORITY SECTION:
tbih-sb.com.ua.         16056   IN      NS      ns2.kievweb.com.ua.
tbih-sb.com.ua.         16056   IN      NS      ns.nbi.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    16056   IN      A       80.78.40.174
ns.nbi.com.ua.          16056   IN      A       80.78.35.1
ns2.kievweb.com.ua.     16056   IN      A       195.177.68.72
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 14 09:25:30 2006
;; MSG SIZE  rcvd: 148
прошло 11 минут
09:25:30
$w
 09:52:30 up 23:15,  2 users,  load average: 0,01, 0,01, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/3    gabzya.hq.tbih-s Mon16    4.00s  0.07s  0.04s script -f -q /home/gabzya/.lilalo//2918720132260707565-1142259383.script
gabzya   pts/7    gabzya.hq.tbih-s Mon16    0.00s  0.05s  0.03s script -f -q /home/gabzya/.lilalo//506117108519318535-1142260295.script
прошло >3 часов
12:49:59
$dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21654
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         13551   IN      MX      10 mail.tbih-sb.com.ua.
;; AUTHORITY SECTION:
tbih-sb.com.ua.         84440   IN      NS      ns2.kievweb.com.ua.
tbih-sb.com.ua.         84440   IN      NS      ns.nbi.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    84440   IN      A       80.78.40.174
ns.nbi.com.ua.          84440   IN      A       80.78.35.1
ns2.kievweb.com.ua.     84440   IN      A       195.177.68.72
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 14 14:33:10 2006
;; MSG SIZE  rcvd: 148
прошло 103 минуты
14:33:10
$sudo rndc flushs
Password:
Sorry, try again.
Password:
sudo: rndc: command not found
14:33:48
$sudo rndc flush
sudo: rndc: command not found
14:34:04
$sudo /sbin/rndc flush
sudo: /sbin/rndc: command not found
14:34:17
$wget ftp://ftp.nbi.com.ua/incoming/01-Queen.wav
--15:16:18--  ftp://ftp.nbi.com.ua/incoming/01-Queen.wav
           => `01-Queen.wav'
Распознаётся ftp.nbi.com.ua... 80.78.35.8
Устанавливается соединение с ftp.nbi.com.ua|80.78.35.8|:21... соединение установлено.
Выполняется вход под именем anonymous ... Выполнен вход в систему!
==> SYST ... готово.  ==> PWD ... готово.
==> TYPE I ... готово.   ==> CWD /incoming ... готово.
==> PASV ... готово.  ==> RETR 01-Queen.wav ... готово.
Длина: 1.300.992 (1.2M) (не достоверно)
100%[==================================================================================================================>] 1.300.992     50.90K/s    ETA 00:00
15:16:47 (44.51 KB/s) - `01-Queen.wav' сохранён [1300992]
прошло 42 минуты
15:16:47
$sudo /usr/sbin/rnd flush
Password:
Sorry, try again.
Password:
sudo: /usr/sbin/rnd: command not found
15:20:14
$dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29656
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         10723   IN      MX      10 mail.tbih-sb.com.ua.
;; AUTHORITY SECTION:
tbih-sb.com.ua.         81612   IN      NS      ns.nbi.com.ua.
tbih-sb.com.ua.         81612   IN      NS      ns2.kievweb.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    81612   IN      A       80.78.40.174
ns.nbi.com.ua.          81612   IN      A       80.78.35.1
ns2.kievweb.com.ua.     81612   IN      A       195.177.68.72
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 14 15:20:18 2006
;; MSG SIZE  rcvd: 148
15:20:18
$sudo /usr/sbin/rndc flush
Password:
15:25:33
$dig tbih-sb.com.ua mx
; <<>> DiG 9.3.1 <<>> tbih-sb.com.ua mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17062
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 4
;; QUESTION SECTION:
;tbih-sb.com.ua.                        IN      MX
;; ANSWER SECTION:
tbih-sb.com.ua.         86400   IN      MX      10 mail.tbih-sb.com.ua.
tbih-sb.com.ua.         86400   IN      MX      20 relay.nbi.com.ua.
...
tbih-sb.com.ua.         86400   IN      NS      ns2.kievweb.com.ua.
;; ADDITIONAL SECTION:
mail.tbih-sb.com.ua.    86400   IN      A       80.78.40.174
relay.nbi.com.ua.       86400   IN      A       80.78.35.19
ns.nbi.com.ua.          86400   IN      A       80.78.35.1
ns2.kievweb.com.ua.     86400   IN      A       195.177.68.72
;; Query time: 21 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 14 15:25:35 2006
;; MSG SIZE  rcvd: 186

Среда (03/22/06)

/dev/pts/1
09:48:45
$w
 09:48:47 up 8 days, 23:11,  1 user,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    gabzya.hq.tbih-s 09:48    0.00s  0.04s  0.04s script -f -q /h
09:48:47
$w
 09:48:52 up 8 days, 23:11,  1 user,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    gabzya.hq.tbih-s 09:48    0.00s  0.04s  0.04s script -f -q /home/gabzya/.lilalo//28434165611692412299-1143013725.script
09:48:52
$md
bash: md: command not found
прошло >2 часов
12:38:27
$wd
bash: wd: command not found
12:38:30
$history
  855  sudo /sbin/iptables -L
  856  w
  857   sudo /etc/init.d/iptables restart
  858  w
  859  w
  860  ssh -p 3022 192.168.2.254
  861  sudo iptables -1 FORWARD -p tcp --sport 110 -j LOG
  862  sudo iptables -A FORWARD -p tcp --sport 110 -j LOG
  863  sudo /sbin/iptables -A FORWARD -p tcp --sport 110 -j LOG
  864  sudo tail /var/log/messages
...
  994  dig tbih-sb.com.ua mx
  995  sudo /usr/sbin/rndc flush
  996  dig tbih-sb.com.ua mx
  997  w
  998  ssh -p 3022 192.168.2.254
  999  w
 1000  w
 1001  md
 1002  wd
 1003  history
12:38:49
$history |less
прошло >2 часов
/dev/pts/1
15:04:58
$w
exit
 15:06:25 up 9 days,  4:29,  1 user,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
gabzya   pts/1    gabzya.hq.tbih-s 15:04    0.00s  0.03s  0.03s script -f -q /h
15:06:25
$df
Файловая система     1K-блоков      Исп  Доступно  Исп% смонтирована на
/dev/hda1              1032056    189432    790188  20% /
/dev/hda6              1032056     34164    945456   4% /tmp
/dev/hda7              3096240   1073996   1864948  37% /var
/dev/hda9              5160416   3618924   1279340  74% /usr
/dev/hda8              2064144     83984   1875280   5% /home
none                    225380         0    225380   0% /dev/shm
15:06:34
$ping 192.168.1.21
PING 192.168.1.21 (192.168.1.21) 56(84) bytes of data.
64 bytes from 192.168.1.21: icmp_seq=0 ttl=128 time=0.215 ms
64 bytes from 192.168.1.21: icmp_seq=1 ttl=128 time=0.227 ms
--- 192.168.1.21 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1014ms
rtt min/avg/max/mdev = 0.215/0.221/0.227/0.006 ms, pipe 2
15:06:47
$ping 192.168.1.21
PING 192.168.1.21 (192.168.1.21) 56(84) bytes of data.
64 bytes from 192.168.1.21: icmp_seq=0 ttl=128 time=0.234 ms
64 bytes from 192.168.1.21: icmp_seq=1 ttl=128 time=0.246 ms
64 bytes from 192.168.1.21: icmp_seq=2 ttl=128 time=0.207 ms
64 bytes from 192.168.1.21: icmp_seq=3 ttl=128 time=0.247 ms
64 bytes from 192.168.1.21: icmp_seq=4 ttl=128 time=0.228 ms
64 bytes from 192.168.1.21: icmp_seq=5 ttl=128 time=0.245 ms
64 bytes from 192.168.1.21: icmp_seq=6 ttl=128 time=0.243 ms
64 bytes from 192.168.1.21: icmp_seq=7 ttl=128 time=0.382 ms
64 bytes from 192.168.1.21: icmp_seq=8 ttl=128 time=0.262 ms
...
64 bytes from 192.168.1.21: icmp_seq=58 ttl=128 time=0.255 ms
64 bytes from 192.168.1.21: icmp_seq=59 ttl=128 time=0.211 ms
64 bytes from 192.168.1.21: icmp_seq=60 ttl=128 time=0.239 ms
64 bytes from 192.168.1.21: icmp_seq=61 ttl=128 time=0.250 ms
64 bytes from 192.168.1.21: icmp_seq=62 ttl=128 time=0.245 ms
64 bytes from 192.168.1.21: icmp_seq=63 ttl=128 time=0.235 ms
64 bytes from 192.168.1.21: icmp_seq=64 ttl=128 time=0.386 ms
--- 192.168.1.21 ping statistics ---
65 packets transmitted, 65 received, 0% packet loss, time 64021ms
rtt min/avg/max/mdev = 0.207/0.241/0.386/0.031 ms, pipe 2
15:08:00
$ping mail.ru
ping: unknown host mail.ru
15:08:16
$ping ukr.net

15:08:29
$ping ukr.net

15:08:33
$ping 80.78.40.174
PING 80.78.40.174 (80.78.40.174) 56(84) bytes of data.
64 bytes from 80.78.40.174: icmp_seq=0 ttl=64 time=0.181 ms
64 bytes from 80.78.40.174: icmp_seq=1 ttl=64 time=0.120 ms
--- 80.78.40.174 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.120/0.150/0.181/0.032 ms, pipe 2
15:08:40
$ping 192.168.2.254
PING 192.168.2.254 (192.168.2.254) 56(84) bytes of data.
64 bytes from 192.168.2.254: icmp_seq=0 ttl=64 time=0.175 ms
64 bytes from 192.168.2.254: icmp_seq=1 ttl=64 time=0.156 ms
--- 192.168.2.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.156/0.165/0.175/0.016 ms, pipe 2

Статистика

Время первой команды журнала14:20:32 2006- 3-13
Время последней команды журнала15:08:40 2006- 3-22
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, % 9.90
Процент синтаксически неверно набранных команд, % 9.90
Суммарное время работы с терминалом *, час 3.28
Количество командных строк в единицу времени, команда/мин 0.51
Частота использования команд
sudo52|=================================| 33.77%
iptables37|========================| 24.03%
ping13|========| 8.44%
w7|====| 4.55%
dig6|===| 3.90%
ifconfig5|===| 3.25%
iptables-save5|===| 3.25%
rndc4|==| 2.60%
print4|==| 2.60%
telnet3|=| 1.95%
history3|=| 1.95%
vi3|=| 1.95%
prin2|=| 1.30%
!pi1|| 0.65%
rnd1|| 0.65%
!dig1|| 0.65%
wget1|| 0.65%
wd1|| 0.65%
man1|| 0.65%
/etc/init.d/iptables1|| 0.65%
less1|| 0.65%
df1|| 0.65%
md1|| 0.65%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ 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
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$