/l3/users/12-04-2010/nt-lnet/debian1.net.nt/root :1 |
|
#ping nt.ua -c 2
PING nt.ua (212.40.34.157) 56(84) bytes of data. 64 bytes from stream.tsua.net (212.40.34.157): icmp_seq=1 ttl=57 time=5.24 ms 64 bytes from stream.tsua.net (212.40.34.157): icmp_seq=2 ttl=57 time=4.82 ms --- nt.ua ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 4.828/5.036/5.244/0.208 ms |
#dd if=/dev/zero | ssh 192.168.16.2 'dd of=/dev/null'
The authenticity of host '192.168.16.2 (192.168.16.2)' can't be established. RSA key fingerprint is 39:83:3e:b7:8e:77:bd:45:4f:ce:10:33:df:0a:94:93. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.2' (RSA) to the list of known hosts. root@192.168.16.2's password: ^C506255118+0 записей считано 506255117+0 записей написано скопировано 259202619904 байта (259 GB), 19354,7 c, 13,4 MB/c |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:01 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6482437 errors:0 dropped:0 overruns:0 frame:0 TX packets:23754716 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:612567797 (584.1 MiB) TX bytes:3871630003 (3.6 GiB) 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:16:3e:00:01:01 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig -h
Usage: ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>] [add <address>[/<prefixlen>]] [del <address>[/<prefixlen>]] [[-]broadcast [<address>]] [[-]pointopoint [<address>]] [netmask <address>] [dstaddr <address>] [tunnel <address>] [outfill <NN>] [keepalive <NN>] [hw <HW> <address>] [metric <NN>] [mtu <NN>] [[-]trailers] [[-]arp] [[-]allmulti] [multicast] [[-]promisc] ... arcnet (ARCnet) dlci (Frame Relay DLCI) frad (Frame Relay Access Device) sit (IPv6-in-IPv4) fddi (Fiber Distributed Data Interface) hippi (HIPPI) irda (IrLAP) ec (Econet) x25 (generic X.25) eui64 (Generic EUI-64) <AF>=Address family. Default: inet List of possible address families: unix (UNIX Domain) inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE) ipx (Novell IPX) ddp (Appletalk DDP) ec (Econet) ash (Ash) x25 (CCITT X.25) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:01 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6492153 errors:0 dropped:0 overruns:0 frame:0 TX packets:23772437 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:613298497 (584.8 MiB) TX bytes:3877463541 (3.6 GiB) eth1 Link encap:Ethernet HWaddr 00:16:3e:00:01:01 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig -h
Usage: ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>] [add <address>[/<prefixlen>]] [del <address>[/<prefixlen>]] [[-]broadcast [<address>]] [[-]pointopoint [<address>]] [netmask <address>] [dstaddr <address>] [tunnel <address>] [outfill <NN>] [keepalive <NN>] [hw <HW> <address>] [metric <NN>] [mtu <NN>] [[-]trailers] [[-]arp] [[-]allmulti] [multicast] [[-]promisc] ... arcnet (ARCnet) dlci (Frame Relay DLCI) frad (Frame Relay Access Device) sit (IPv6-in-IPv4) fddi (Fiber Distributed Data Interface) hippi (HIPPI) irda (IrLAP) ec (Econet) x25 (generic X.25) eui64 (Generic EUI-64) <AF>=Address family. Default: inet List of possible address families: unix (UNIX Domain) inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE) ipx (Novell IPX) ddp (Appletalk DDP) ec (Econet) ash (Ash) x25 (CCITT X.25) |
#ifconfig a
a: error fetching interface information: Device not found |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:01 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6493175 errors:0 dropped:0 overruns:0 frame:0 TX packets:23773521 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:613372981 (584.9 MiB) TX bytes:3878177640 (3.6 GiB) eth1 Link encap:Ethernet HWaddr 00:16:3e:00:01:01 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig eth1 192.168.90.1 255.255.255.0
SIOCSIFADDR: Недопустимый аргумент |
#ifconfig eth1 192.168.90.1
|
#efconfig -a
l3script: efconfig: команда не найдена |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:01 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6495531 errors:0 dropped:0 overruns:0 frame:0 TX packets:23775850 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:613551217 (585.1 MiB) TX bytes:3878771354 (3.6 GiB) eth1 Link encap:Ethernet HWaddr 00:16:3e:00:01:01 inet addr:192.168.90.1 Bcast:192.168.90.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:01 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6495624 errors:0 dropped:0 overruns:0 frame:0 TX packets:23775996 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:613558165 (585.1 MiB) TX bytes:3878876115 (3.6 GiB) eth1 Link encap:Ethernet HWaddr 00:16:3e:00:01:01 inet addr:192.168.90.1 Bcast:192.168.90.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:1000 RX bytes:300 (300.0 B) TX bytes:468 (468.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ping 192.168.90.1
PING 192.168.90.1 (192.168.90.1) 56(84) bytes of data. 64 bytes from 192.168.90.1: icmp_seq=1 ttl=64 time=0.023 ms 64 bytes from 192.168.90.1: icmp_seq=2 ttl=64 time=0.017 ms 64 bytes from 192.168.90.1: icmp_seq=3 ttl=64 time=0.021 ms ^C --- 192.168.90.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1998ms rtt min/avg/max/mdev = 0.017/0.020/0.023/0.004 ms |
#ping 192.168.90.2
PING 192.168.90.2 (192.168.90.2) 56(84) bytes of data. 64 bytes from 192.168.90.2: icmp_seq=1 ttl=64 time=1.69 ms 64 bytes from 192.168.90.2: icmp_seq=2 ttl=64 time=0.301 ms 64 bytes from 192.168.90.2: icmp_seq=3 ttl=64 time=0.267 ms ^C --- 192.168.90.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 0.267/0.755/1.698/0.667 ms |
#ping 192.168.91.1
PING 192.168.91.1 (192.168.91.1) 56(84) bytes of data. ^C --- 192.168.91.1 ping statistics --- 7 packets transmitted, 0 received, 100% packet loss, time 6012ms |
#tcpdamp
l3script: tcpdamp: команда не найдена |
#apt -get install tcpdump
l3script: apt: команда не найдена |
#tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 08:04:22.045186 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [.], seq 3328709319:3328715111, ack 2981352276, win 409, options [nop,nop,TS val 7626277 ecr 32366712], length 5792 08:04:22.045651 IP 192.168.16.203.3864 > debian1.net.nt.5900: Flags [.], ack 2896, win 63712, options [nop,nop,TS val 32366738 ecr 7626277], length 0 08:04:22.045661 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [P.], seq 5792:7031, ack 1, win 409, options [nop,nop,TS val 7626277 ecr 32366738], length 1239 08:04:22.045788 IP debian1.net.nt.52038 > 192.168.16.254.domain: 31547+ PTR? 203.16.168.192.in-addr.arpa. (45) 08:04:22.046081 IP 192.168.16.203.3864 > debian1.net.nt.5900: Flags [.], ack 5792, win 63712, options [nop,nop,TS val 32366738 ecr 7626277], length 0 08:04:22.048419 IP 192.168.16.203.3864 > debian1.net.nt.5900: Flags [P.], seq 1:11, ack 7031, win 63712, options [nop,nop,TS val 32366738 ecr 7626277], length 10 08:04:22.048429 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [.], ack 11, win 409, options [nop,nop,TS val 7626278 ecr 32366738], length 0 08:04:22.249858 IP 192.168.16.254.domain > debian1.net.nt.52038: 31547 NXDomain 0/1/0 (122) ... 08:04:24.450035 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [P.], seq 3951021:3951477, ack 407, win 409, options [nop,nop,TS val 7626879 ecr 32366978], length 456 08:04:24.450753 IP 192.168.16.203.3864 > debian1.net.nt.5900: Flags [.], ack 3939437, win 30408, options [nop,nop,TS val 32366979 ecr 7626879], length 0 08:04:24.451633 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [.], seq 3951477:3967405, ack 407, win 409, options [nop,nop,TS val 7626879 ecr 32366979], length 15928 08:04:24.451638 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [P.], seq 3967405:3967861, ack 407, win 409, options [nop,nop,TS val 7626879 ecr 32366979], length 456 08:04:24.451863 IP debian1.net.nt.5900 > 192.168.16.203.3864: Flags [P.], seq 3967861:3969240, ack 407, win 409, options [nop,nop,TS val 7626879 ecr 32366979], length 1379 08:04:24.451906 IP 192.168.16.203.3864 > debian1.net.nt.5900: Flags [.], ack 3951477, win 24616, options [nop,nop,TS val 32366979 ecr 7626879], length 0 ^C 998 packets captured 999 packets received by filter 0 packets dropped by kernel |
#sysctl net.ipv4_forward=1
error: "net.ipv4_forward" is an unknown key |
#sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1 |
#route add -net 192.168.91.0/24 gw 192.168.90.2
|
#route add -net 192.168.92.0/24 gw 192.168.90.2
|
#route add -net 192.168.93.0/24 gw 192.168.90.2
|
#route add -net 192.168.94.0/24 gw 192.168.90.2
|
#tcpdump -i eth1 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 09:01:33.142419 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 36, length 64 09:01:34.143260 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 37, length 64 09:01:35.144107 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 38, length 64 09:01:36.144964 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 39, length 64 09:01:37.146988 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 40, length 64 09:01:38.147616 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 41, length 64 09:01:39.148474 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 42, length 64 09:01:40.149317 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 43, length 64 09:01:41.151174 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 44, length 64 09:01:42.152003 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 45, length 64 09:01:43.152864 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 46, length 64 09:01:44.154779 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 47, length 64 09:01:45.155576 IP 192.168.16.1 > 192.168.94.2: ICMP echo reply, id 2569, seq 48, length 64 ^C 13 packets captured 13 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 09:01:51.162599 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 54, length 64 09:01:52.163471 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 55, length 64 09:01:53.165313 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 56, length 64 09:01:54.166158 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 57, length 64 09:01:55.167059 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 58, length 64 09:01:56.167847 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 59, length 64 09:01:57.168774 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 60, length 64 09:01:58.169536 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 61, length 64 09:01:59.171382 IP 192.168.94.2 > 192.168.16.1: ICMP echo request, id 2569, seq 62, length 64 ^C 9 packets captured 9 packets received by filter 0 packets dropped by kernel |
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data. 64 bytes from ya.ru (77.88.21.8): icmp_seq=1 ttl=51 time=54.2 ms 64 bytes from ya.ru (77.88.21.8): icmp_seq=2 ttl=51 time=53.1 ms 64 bytes from ya.ru (77.88.21.8): icmp_seq=3 ttl=51 time=55.4 ms ^C --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2008ms rtt min/avg/max/mdev = 53.125/54.270/55.479/0.980 ms |
#iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- 192.168.90.2 !192.168.0.0/16 Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 8 packets, 476 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 12 packets, 1286 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 !192.168.0.0/16 Chain OUTPUT (policy ACCEPT 4 packets, 810 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE
|
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 4 packets, 260 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 2 packets, 112 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 2 packets, 148 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 6 packets, 372 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 3 packets, 212 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 7 packets, 436 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 3 packets, 212 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 7 packets, 436 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 3 packets, 212 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 7 packets, 436 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 3 packets, 212 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 7 packets, 436 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * * 192.168.90.2 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 4 packets, 224 bytes) pkts bytes target prot opt in out source destination |
#tcpdump -i eth1 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 09:23:22.494150 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 19, length 64 09:23:23.494144 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 20, length 64 09:23:24.494157 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 21, length 64 09:23:25.494168 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 22, length 64 09:23:26.494220 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 23, length 64 09:23:27.494250 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 24, length 64 09:23:28.494327 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 25, length 64 09:23:29.494180 IP 10.0.17.1 > 77.88.21.8: ICMP echo request, id 90, seq 26, length 64 ^C 8 packets captured 8 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth1 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 09:24:41.022288 IP 192.168.91.2 > 93.158.134.8: ICMP echo request, id 15367, seq 9, length 64 09:24:42.022283 IP 192.168.91.2 > 93.158.134.8: ICMP echo request, id 15367, seq 10, length 64 09:24:43.022238 IP 192.168.91.2 > 93.158.134.8: ICMP echo request, id 15367, seq 11, length 64 ^C 3 packets captured 3 packets received by filter 0 packets dropped by kernel |
#vim /etc/network/interfaces
--- /tmp/l3-saved-2005.27417.21998 2010-04-13 09:28:56.000000000 +0000 +++ /etc/network/interfaces 2010-04-13 09:30:50.000000000 +0000 @@ -1,7 +1,13 @@ -auto lo eth0 +auto lo eth0 eth1 + iface lo inet loopback + iface eth0 inet static address 192.168.16.1 netmask 255.255.255.0 gateway 192.168.16.254 +iface eth1 inet static + address 192.168.90.1 + netmask 255.255.255.0 + |
#history | grep iptables\ -t\ nat\ -A
61 iptables -t nat -A POSTROUTING -s 192.168.90.2 -d ! 192.168.0.0/16 -j MASQUERADE 66 iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE 89 iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE 91 iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE 93 iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE 95 iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE |
#vim /etc/network/interfaces
--- /tmp/l3-saved-2005.6711.7456 2010-04-13 09:31:34.000000000 +0000 +++ /etc/network/interfaces 2010-04-13 09:32:22.000000000 +0000 @@ -10,10 +10,8 @@ iface eth1 inet static address 192.168.90.1 netmask 255.255.255.0 - - 61 iptables -t nat -A POSTROUTING -s 192.168.90.2 -d ! 192.168.0.0/16 -j MASQUERADE - 66 iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE - 89 iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE - 91 iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE - 93 iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE - 95 iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE +post-up iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE +post-up iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE +post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE +post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE +post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.93.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.92.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.94.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.91.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.90.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 192.168.16.254 0.0.0.0 UG 0 0 0 eth0 |
#route -n | grep -v 0\.0\.0\.0
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.93.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.92.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.94.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.91.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 |
#route -n | grep -v 0\.0\.0\.0 | sed 1d
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.93.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.92.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.94.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.91.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 |
#route -n | grep -v 0\.0\.0\.0 | sed 1d | sed 1 d
sed: -e выражение #1, символ 1: отсутствует команда |
#route -n | grep -v 0\.0\.0\.0 | sed 1d | sed 1d
192.168.93.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.92.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.94.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 192.168.91.0 192.168.90.2 255.255.255.0 UG 0 0 0 eth1 |
#vim /etc/network/interfaces
--- /tmp/l3-saved-2005.20282.9490 2010-04-13 09:36:20.000000000 +0000 +++ /etc/network/interfaces 2010-04-13 09:36:51.000000000 +0000 @@ -15,7 +15,7 @@ post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE -post-up route add -net 192.168.93.0 gw 192.168.90.2 -post-up route add -net 192.168.92.0 gw 192.168.90.2 -post-up route add -net 192.168.94.0 gw 192.168.90.2 -post-up route add -net 192.168.91.0 gw 192.168.90.2 +post-up route add -net 192.168.93.0/24 gw 192.168.90.2 +post-up route add -net 192.168.92.0/24 gw 192.168.90.2 +post-up route add -net 192.168.94.0/24 gw 192.168.90.2 +post-up route add -net 192.168.91.0/24 gw 192.168.90.2 |
#sysctl -a | grep forward
error: permission denied on key 'net.ipv4.route.flush' net.ipv4.conf.all.forwarding = 1 net.ipv4.conf.all.mc_forwarding = 0 net.ipv4.conf.default.forwarding = 1 net.ipv4.conf.default.mc_forwarding = 0 net.ipv4.conf.lo.forwarding = 1 net.ipv4.conf.lo.mc_forwarding = 0 net.ipv4.conf.eth0.forwarding = 1 net.ipv4.conf.eth0.mc_forwarding = 0 net.ipv4.conf.eth1.forwarding = 1 ... net.ipv6.conf.default.mc_forwarding = 0 net.ipv6.conf.lo.forwarding = 0 net.ipv6.conf.lo.mc_forwarding = 0 net.ipv6.conf.eth0.forwarding = 0 net.ipv6.conf.eth0.mc_forwarding = 0 net.ipv6.conf.eth1.forwarding = 0 error: permission denied on key 'net.ipv6.route.flush' net.ipv6.conf.eth1.mc_forwarding = 0 net.ipv6.conf.eth2.forwarding = 0 net.ipv6.conf.eth2.mc_forwarding = 0 |
#sysctl -a | grep ip_forward
error: permission denied on key 'net.ipv4.route.flush' net.ipv4.ip_forward = 1 error: permission denied on key 'net.ipv6.route.flush' |
#sysctl -a | grep ip_forward >> /etc/sysctl.conf
error: permission denied on key 'net.ipv4.route.flush' error: permission denied on key 'net.ipv6.route.flush' |
#vim /etc/sysctl.conf
--- /tmp/l3-saved-2005.25136.16757 2010-04-13 09:37:20.000000000 +0000 +++ /etc/sysctl.conf 2010-04-13 09:37:56.000000000 +0000 @@ -58,4 +58,5 @@ # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # + net.ipv4.ip_forward = 1 |
#reboot
|
#cat /etc/network/interfaces
auto lo eth0 eth1 iface lo inet loopback iface eth0 inet static address 192.168.16.1 netmask 255.255.255.0 gateway 192.168.16.254 iface eth1 inet static address 192.168.90.1 netmask 255.255.255.0 post-up iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE post-up route add -net 192.168.93.0/24 gw 192.168.90.2 post-up route add -net 192.168.92.0/24 gw 192.168.90.2 post-up route add -net 192.168.94.0/24 gw 192.168.90.2 post-up route add -net 192.168.91.0/24 gw 192.168.90.2 |
#vim /etc/network/interfaces
--- /tmp/l3-saved-1359.18226.18689 2010-04-13 11:49:58.000000000 +0000 +++ /etc/network/interfaces 2010-04-13 11:50:36.000000000 +0000 @@ -1,4 +1,5 @@ -auto lo eth0 eth1 +auto lo eth0 +#eth1 iface lo inet loopback @@ -7,15 +8,15 @@ netmask 255.255.255.0 gateway 192.168.16.254 -iface eth1 inet static - address 192.168.90.1 - netmask 255.255.255.0 -post-up iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE -post-up iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE -post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE -post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE -post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE -post-up route add -net 192.168.93.0/24 gw 192.168.90.2 -post-up route add -net 192.168.92.0/24 gw 192.168.90.2 -post-up route add -net 192.168.94.0/24 gw 192.168.90.2 -post-up route add -net 192.168.91.0/24 gw 192.168.90.2 +#iface eth1 inet static +# address 192.168.90.1 +# netmask 255.255.255.0 +##post-up iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE +#post-up iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE +#post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE +#post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE +#post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE +#post-up route add -net 192.168.93.0/24 gw 192.168.90.2 +#post-up route add -net 192.168.92.0/24 gw 192.168.90.2 +#post-up route add -net 192.168.94.0/24 gw 192.168.90.2 +#post-up route add -net 192.168.91.0/24 gw 192.168.90.2 |
#Kerberos options
The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is 39:83:3e:b7:8e:77:bd:45:4f:ce:10:33:df:0a:94:93. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added 'localhost' (RSA) to the list of known hosts. user@localhost's password: Linux debian1 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Apr 14 11:11:36 2010 from 192.168.90.2 l3-agent is already running: pid=1307; pidfile=/home/user/.lilalo/l3-agent.pid user@debian1:~$ exit logout Connection to localhost closed. |
#logout
l3script: logout: оболочка не является запущенной после входа в систему: используйте `exit' |
#ps aux | grep named
bind 1838 0.0 1.7 44052 10548 ? Ssl 11:09 0:00 /usr/sbin/named -u bind root 1909 0.0 0.1 4824 752 pts/3 R+ 11:10 0:00 grep named |
#less /var/log/daemon.log
|
#vim /etc/bind
|
#vim /etc/bind/named.conf
|
#~
zone "cn.net.nt" { type master; { file "/etc/bind/db.cn.net.nt"; { } 32,1 60% }; 33,1 66% zone "16.168.192.in-adr.arpa" { type master; { file "/etc/bind/db.rev.net.nt"; } 37,1 93% |
#};
db.0 db.255 db.empty db.rev.net.nt db.127 db.cn.net.nt db.local db.root |
#vim /etc/bind/db.cn.net.nt
--- /tmp/l3-saved-1887.24911.12848 2010-04-15 11:11:46.000000000 +0000 +++ /etc/bind/db.cn.net.nt 2010-04-15 11:12:18.000000000 +0000 @@ -1,5 +1,5 @@ $TTL 604800 -@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua / ( +@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua ( 2 ; Serial 604800 ; Refresh 86400 ; Retry |
#vim /etc/bind/db.rev.net.nt
--- /tmp/l3-saved-1887.29954.5345 2010-04-15 11:12:27.000000000 +0000 +++ /etc/bind/db.rev.net.nt 2010-04-15 11:12:35.000000000 +0000 @@ -1,5 +1,5 @@ $TTL 604800 -@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua / ( +@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua ( 1 ; Serial 604800 ; Refresh 86400 ; Retry |
#rndc reload
server reload successful |
#vim /etc/bind/db.rev.net.nt
|
#12 PTR debian12.cn.net.nt.
|
#vim /etc/bind/db.rev.net.nt
|
#rndc flush
|
#vim /etc/bind/db.rev.net.nt
--- /tmp/l3-saved-1887.31506.24448 2010-04-15 11:19:13.000000000 +0000 +++ /etc/bind/db.rev.net.nt 2010-04-15 11:19:46.000000000 +0000 @@ -1,5 +1,5 @@ $TTL 604800 -@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua ( +@ IN SOA debian1.cn.net.nt. valera\.vpopov@mignews.com.ua. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry |
#vim /etc/bind/db.cn.net.nt
--- /tmp/l3-saved-1887.30706.14336 2010-04-15 11:19:49.000000000 +0000 +++ /etc/bind/db.cn.net.nt 2010-04-15 11:20:13.000000000 +0000 @@ -1,5 +1,5 @@ $TTL 604800 -@ IN SOA cn.net.nt. valera\.vpopov@mignews.com.ua ( +@ IN SOA debian1.cn.net.nt. valera\.vpopov@mignews.com.ua. ( 4 ; Serial 604800 ; Refresh 86400 ; Retry |
#rndc reload
server reload successful |
#vim /etc/bind/db.rev.net.nt
|
#vim /etc/bind/named.conf.default-zones
--- /tmp/l3-saved-1887.14392.6688 2010-04-15 11:21:55.000000000 +0000 +++ /etc/bind/named.conf.default-zones 2010-04-15 11:22:04.000000000 +0000 @@ -32,7 +32,7 @@ file "/etc/bind/db.cn.net.nt"; }; -zone "16.168.192.in-adr.arpa" { +zone "16.168.192.in-addr.arpa" { type master; file "/etc/bind/db.rev.net.nt"; }; |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#12 PTR debian12.cn.net.nt.
|
#tcpdump -i eth0 -n -p udp and port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#vim /etc/bind/db.cn.net.nt
--- /tmp/l3-saved-1887.13450.28007 2010-04-15 11:36:47.000000000 +0000 +++ /etc/bind/db.cn.net.nt 2010-04-15 11:37:00.000000000 +0000 @@ -1,5 +1,5 @@ $TTL 604800 -@ IN SOA debian1.cn.net.nt. valera\.vpopov@mignews.com.ua. ( +@ IN SOA debian1.cn.net.nt. valera\.vpopov.mignews.com.ua. ( 4 ; Serial 604800 ; Refresh 86400 ; Retry |
#hostname
debian1 |
#hostname -f
debian1.net.nt |
#dig @192.168.16.1 debian1.cn.net.nt. a
l3script: dig: команда не найдена |
#apt-get install dig
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово E: Не удалось найти пакет dig |
#apt-get install dnsutils
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: bind9-host Предлагаемые пакеты: rblcheck НОВЫЕ пакеты, которые будут установлены: bind9-host dnsutils обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. ... Получено:2 http://debian.org.ua squeeze/main dnsutils 1:9.7.0.dfsg.P1-1 [151kB] Получено 215kБ за 0с (508kБ/c) Выбор ранее не выбранного пакета bind9-host. (Чтение базы данных ... на данный момент установлено 54195 файлов и каталогов.) Распаковывается пакет bind9-host (из файла .../bind9-host_1%3a9.7.0.dfsg.P1-1_i386.deb)... Выбор ранее не выбранного пакета dnsutils. Распаковывается пакет dnsutils (из файла .../dnsutils_1%3a9.7.0.dfsg.P1-1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет bind9-host (1:9.7.0.dfsg.P1-1) ... Настраивается пакет dnsutils (1:9.7.0.dfsg.P1-1) ... |
auto lo eth0 eth1 iface lo inet loopback iface eth0 inet static address 192.168.16.1 netmask 255.255.255.0 gateway 192.168.16.254 iface eth1 inet static address 192.168.90.1 netmask 255.255.255.0 post-up iptables -t nat -A POSTROUTING -s 192.168.90.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.91.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.92.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.93.2 -j MASQUERADE post-up iptables -t nat -A POSTROUTING -s 192.168.94.2 -j MASQUERADE post-up route add -net 192.168.93.0/24 gw 192.168.90.2 post-up route add -net 192.168.92.0/24 gw 192.168.90.2 post-up route add -net 192.168.94.0/24 gw 192.168.90.2 post-up route add -net 192.168.91.0/24 gw 192.168.90.2
Время первой команды журнала | 20:14:55 2010- 4-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:39:40 2010- 4-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008