/l3/users/eb/2009/linux13/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 :41 :42 :43 :44 :45 :46 :47 :48 :49 :50 :51 :52 :53 :54 :55 :56 :57 :58 :59 :60 :61 :62 :63 :64 :65 :66 :67 :68 :69 :70 :71 :72 :73 :74 :75 :76 |
|
#dmesg
[ 4.010559] usb usb5: SerialNumber: 0000:00:1d.0 [ 4.010647] usb usb5: configuration #1 chosen from 1 choice [ 4.010718] hub 5-0:1.0: USB hub found [ 4.010765] hub 5-0:1.0: 2 ports detected [ 4.010913] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 20 (level, low) -> IRQ 20 [ 4.010969] uhci_hcd 0000:00:1d.1: setting latency timer to 64 [ 4.010972] uhci_hcd 0000:00:1d.1: UHCI Host Controller [ 4.011038] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 6 [ 4.011129] uhci_hcd 0000:00:1d.1: irq 20, io base 0x0000d400 [ 4.011203] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001 ... [10104.693945] tun0: Disabled Privacy Extensions [10150.046021] tun0: Disabled Privacy Extensions [10196.410281] tun0: Disabled Privacy Extensions [10242.658087] tun0: Disabled Privacy Extensions [10288.122865] tun0: Disabled Privacy Extensions [10334.069989] tun0: Disabled Privacy Extensions [10380.858029] tun0: Disabled Privacy Extensions [10426.202956] tun0: Disabled Privacy Extensions [10440.779168] tun0: Disabled Privacy Extensions [10500.236604] ip_tables: tcp match: only valid for protocol 6 |
#iptables -A POSTROUTING -t nat -p tcp -j MASQUERADE
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:10:11 2009 *nat :PREROUTING ACCEPT [58:3524] :POSTROUTING ACCEPT [70:4062] :OUTPUT ACCEPT [17:1021] -A POSTROUTING -p tcp -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:10:11 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:10:11 2009 *filter :INPUT ACCEPT [994:99862] :FORWARD ACCEPT [469:36560] :OUTPUT ACCEPT [1030:156523] COMMIT # Completed on Wed Jun 3 19:10:11 2009 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:32 2009 *nat :PREROUTING ACCEPT [85:5245] :POSTROUTING ACCEPT [101:5848] :OUTPUT ACCEPT [24:1446] -A POSTROUTING -p tcp -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:32 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:32 2009 *filter :INPUT ACCEPT [1225:129380] :FORWARD ACCEPT [682:53104] :OUTPUT ACCEPT [1228:170350] COMMIT # Completed on Wed Jun 3 19:11:32 2009 |
#history
477 lvs -a 478 lvremove vol1 479 lvdisplay 480 lvremove /dev/TURBO/vol1 481 vgdisplay 482 pvdisplay 483 cat /proc/mdstat 484 cd 485 ssh quiz@10.0.35.100 486 init 6 ... 616 ping 192.168.15.254 617 ls 618 /etc/init.d/openvpn status 619 vim server.conf 620 tail -F /var/log/daemon.log 621 vim server.conf 622 /etc/init.d/openvpn restart 623 tail -F /var/log/daemon.log 624 iptables-save 625 history |
#vi 1
--- /tmp/l3-saved-8391.11759.15686 2009-06-03 19:11:59.000000000 +0300 +++ 1 2009-06-03 19:12:07.000000000 +0300 @@ -3,7 +3,7 @@ :PREROUTING ACCEPT [91:5573] :POSTROUTING ACCEPT [108:6228] :OUTPUT ACCEPT [26:1558] --A POSTROUTING -p tcp -j MASQUERADE +-A POSTROUTING -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:57 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 |
#iptables-restore<1
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:12:19 2009 *nat :PREROUTING ACCEPT [6:336] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:12:19 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:12:19 2009 *filter :INPUT ACCEPT [46:4604] :FORWARD ACCEPT [23:1858] :OUTPUT ACCEPT [39:3892] COMMIT # Completed on Wed Jun 3 19:12:19 2009 |
#vi 1
--- /tmp/l3-saved-8391.27770.6219 2009-06-03 19:12:56.000000000 +0300 +++ 1 2009-06-03 19:14:48.000000000 +0300 @@ -3,7 +3,7 @@ :PREROUTING ACCEPT [91:5573] :POSTROUTING ACCEPT [108:6228] :OUTPUT ACCEPT [26:1558] --A POSTROUTING -j MASQUERADE +-A POSTROUTING -d 10.0.35.0/32 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:57 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 |
#history|less
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:14:52 2009 *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -d 10.0.35.0/32 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:14:52 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:14:52 2009 *filter :INPUT ACCEPT [11:890] :FORWARD ACCEPT [3:252] :OUTPUT ACCEPT [12:1488] COMMIT # Completed on Wed Jun 3 19:14:52 2009 |
#vi 1
|
#~
6 -A POSTROUTING -d 10.0.35.0/32 -j MASQUERADE 7 COMMIT -o eth0.207 -j MASQUERADE 8 # Completed on Wed Jun 3 19:11:57 2009 9 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 10 *filter 11 :INPUT ACCEPT [1336:141434] 12 :FORWARD ACCEPT [747:58140] ~ ~ ~ ~ ~ ~ ~ "1" 15L, 467C written |
#iptables-restore<1
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:16:35 2009 *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -d 10.0.35.0/32 -o eth0.207 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:16:35 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:16:35 2009 *filter :INPUT ACCEPT [13:1168] :FORWARD ACCEPT [4:336] :OUTPUT ACCEPT [15:1644] COMMIT # Completed on Wed Jun 3 19:16:35 2009 |
#vi 1
--- /tmp/l3-saved-8391.24033.21573 2009-06-03 19:16:55.000000000 +0300 +++ 1 2009-06-03 19:18:06.000000000 +0300 @@ -3,7 +3,7 @@ :PREROUTING ACCEPT [91:5573] :POSTROUTING ACCEPT [108:6228] :OUTPUT ACCEPT [26:1558] --A POSTROUTING -d 10.0.35.0/32 -o eth0.207 -j MASQUERADE +-A POSTROUTING -d 10.0.35.0/32 -s 192.168.107/24 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:57 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 |
#iptables-restore<1
|
#vi 1
--- /tmp/l3-saved-8391.18016.2069 2009-06-03 19:18:13.000000000 +0300 +++ 1 2009-06-03 19:18:23.000000000 +0300 @@ -3,7 +3,7 @@ :PREROUTING ACCEPT [91:5573] :POSTROUTING ACCEPT [108:6228] :OUTPUT ACCEPT [26:1558] --A POSTROUTING -d 10.0.35.0/32 -s 192.168.107/24 -j MASQUERADE +-A POSTROUTING -d 10.0.35.0/32 -s 192.168.107.0/24 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:57 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 |
#iptables-restore<1
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:18:31 2009 *nat :PREROUTING ACCEPT [1:61] :POSTROUTING ACCEPT [1:61] :OUTPUT ACCEPT [0:0] -A POSTROUTING -s 192.168.107.0/24 -d 10.0.35.0/32 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:18:31 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:18:31 2009 *filter :INPUT ACCEPT [19:1676] :FORWARD ACCEPT [10:739] :OUTPUT ACCEPT [18:2014] COMMIT # Completed on Wed Jun 3 19:18:31 2009 |
#vi 1
--- /tmp/l3-saved-8391.5524.18768 2009-06-03 19:19:08.000000000 +0300 +++ 1 2009-06-03 19:19:48.000000000 +0300 @@ -3,7 +3,7 @@ :PREROUTING ACCEPT [91:5573] :POSTROUTING ACCEPT [108:6228] :OUTPUT ACCEPT [26:1558] --A POSTROUTING -d 10.0.35.0/32 -s 192.168.107.0/24 -j MASQUERADE +-A POSTROUTING -o eth0.207 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:11:57 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:11:57 2009 |
#iptables-restore<1
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:19:52 2009 *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -o eth0.207 -j MASQUERADE COMMIT # Completed on Wed Jun 3 19:19:52 2009 # Generated by iptables-save v1.4.3.2 on Wed Jun 3 19:19:52 2009 *filter :INPUT ACCEPT [13:1222] :FORWARD ACCEPT [5:396] :OUTPUT ACCEPT [15:1636] COMMIT # Completed on Wed Jun 3 19:19:52 2009 |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_seq=1 ttl=63 time=0.241 ms 64 bytes from 10.0.35.1: icmp_seq=2 ttl=63 time=0.224 ms ^C --- 10.0.35.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.224/0.232/0.241/0.017 ms |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. 64 bytes from 10.0.35.100: icmp_seq=1 ttl=62 time=0.231 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=62 time=0.225 ms ^C --- 10.0.35.100 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.225/0.228/0.231/0.003 ms |
#ping www.google.com
PING www.l.google.com (74.125.87.104) 56(84) bytes of data. ^C --- www.l.google.com ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4030ms |
#lspci -h|grep 00:1b
lspci: invalid option -- 'h' Usage: lspci [<switches>] Basic display modes: -mm Produce machine-readable output (single -m for an obsolete format) -t Show bus tree Display options: -v Be verbose (-vv for very verbose) -k Show kernel drivers handling each device -x Show hex-dump of the standard part of the config space -xxx Show hex-dump of the whole config space (dangerous; root only) ... Other options: -i <file> Use specified ID database instead of /usr/share/misc/pci.ids.gz -p <file> Look up kernel modules in a given file instead of default modules.pcimap -M Enable `bus mapping' mode (dangerous; root only) PCI access options: -A <method> Use the specified PCI access method (see `-A help' for a list) -O <par>=<val> Set PCI access parameter (see `-O help' for a list) -G Enable PCI access debugging -H <mode> Use direct hardware access (<mode> = 1 or 2) -F <file> Read PCI configuration dump from a given file |
#lspci -n|grep 00:1b
00:1b.0 0403: 8086:284b (rev 02) |
#lspci|grep audio
|
#lspci|grep HD
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) |
#history | less
|
#cat /etc/bash
bash.bashrc bash_completion bash_completion.d/ |
#cat /home/.
./ ../ |
#cat /root/.bash
.bash_history .bash_profile .bashrc |
#cat /root/.bash
.bash_history .bash_profile .bashrc |
#cat /root/.bash_history
route /etc/init.d/openvpn restart route route vim server.conf route ping 192.168.15.254 ping 192.168.15.254 ls /etc/init.d/openvpn status ... iptables-restore<1 iptables-save vi 1 iptables-restore<1 vi 1 iptables-restore<1 iptables-save vi 1 iptables-restore<1 iptables-save |
#cat /root/.bash_history | grep alt1
|
#cat /root/.bash_history | less
|
#lsmod|less
|
#find /sys -name /*00:1b*
find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `/*00:1b*'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `/*00:1b*''. |
#find /sys -name *00:1b*
/sys/devices/pci0000:00/0000:00:1b.0 /sys/bus/pci/devices/0000:00:1b.0 /sys/bus/pci/drivers/HDA Intel/0000:00:1b.0 |
#openvt
|
#openvt
|
#openvt
|
#openvt
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ssh 10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 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: Thu Jun 4 09:19:33 2009 from 10.0.35.23 l3-agent is already running: pid=4804; pidfile=/root/.lilalo/l3-agent.pid |
#finch
Buddy List ââAlEX (291670823 -- ICQ) - Friends â sâââ âââââââ âââââââââââ ⯠Head Plate â 004632ââââââââââ â Istvan ââ¤425009110ââââââââââââââââââ ⯠KEDRIK â ¤322095000ââââââââââââââ ââ ââ â ... - ZIP â 188602 âââââââââ B ⯠d.r.i.m.f rdin> (задÑмÑиво) ÐоÑÑланд, ÐÑегон, âââââââââââ â ⯠Ivanov A. âли Ñже знаÑÑ, ÑÑо ÑаÑÑол Ð¾Ñ Ð¾Ð³ÑÑÑов ââââââââââââââ â ⯠~~ÐÑаÑа У! âÐââââââââââââââââââââââââââââ â â Pa$kuda âнаÑÑ, поÑÐµÐ¼Ñ âââââââââââââââââââââââââââââââ âAvailable ââ___________________________âââââââââââââââââââââââââââ â âââââââââââââââââââââ ____________________â Buddy List âAlEX (291670823 -- ICQ) |
#ping 192.168.108.2
PING 192.168.108.2 (192.168.108.2) 56(84) bytes of data. From 172.16.1.8 icmp_seq=1 Destination Host Unreachable From 172.16.1.8 icmp_seq=2 Destination Host Unreachable From 172.16.1.8 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.108.2 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4023ms , pipe 3 |
#ping 192.168.108.1
PING 192.168.108.1 (192.168.108.1) 56(84) bytes of data. 64 bytes from 192.168.108.1: icmp_seq=1 ttl=64 time=0.561 ms 64 bytes from 192.168.108.1: icmp_seq=2 ttl=64 time=0.468 ms 64 bytes from 192.168.108.1: icmp_seq=3 ttl=64 time=0.507 ms ^C --- 192.168.108.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.468/0.512/0.561/0.038 ms |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_seq=1 ttl=63 time=0.227 ms 64 bytes from 10.0.35.1: icmp_seq=2 ttl=63 time=0.218 ms ^C --- 10.0.35.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.218/0.222/0.227/0.015 ms |
#iptables-save
|
#iptables -t nat POSTROUTING -p tcp -j MASQUERADE
Bad argument `POSTROUTING' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A POSTROUTING -p tcp -j MASQUERADE
|
#ping 192.168.108.2
PING 192.168.108.2 (192.168.108.2) 56(84) bytes of data. ^C --- 192.168.108.2 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2015ms |
#iptables -F
|
#F
ping 192.168.108.2 PING 192.168.108.2 (192.168.108.2) 56(84) bytes of data. From 172.16.1.8 icmp_seq=1 Destination Host Unreachable From 172.16.1.8 icmp_seq=2 Destination Host Unreachable From 172.16.1.8 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.108.2 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4012ms , pipe 3 |
#/etc/init.d/openvpn restart
Stopping virtual private network daemon: server. Starting virtual private network daemon: server. |
#ping 192.168.108.2
PING 192.168.108.2 (192.168.108.2) 56(84) bytes of data. ^C --- 192.168.108.2 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#route del default
|
#route add default gw 192.168.207.1
|
#ping 192.168.108.2
PING 192.168.108.2 (192.168.108.2) 56(84) bytes of data. 64 bytes from 192.168.108.2: icmp_seq=1 ttl=63 time=0.670 ms 64 bytes from 192.168.108.2: icmp_seq=2 ttl=63 time=0.622 ms 64 bytes from 192.168.108.2: icmp_seq=3 ttl=63 time=0.677 ms 64 bytes from 192.168.108.2: icmp_seq=4 ttl=63 time=0.650 ms ^C --- 192.168.108.2 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.622/0.654/0.677/0.037 ms |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. 64 bytes from 10.0.35.100: icmp_seq=1 ttl=62 time=2.65 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=62 time=0.225 ms 64 bytes from 10.0.35.100: icmp_seq=3 ttl=62 time=0.230 ms ^C --- 10.0.35.100 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.225/1.035/2.650/1.141 ms |
#F
iptables-save # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:15 2009 *filter :INPUT ACCEPT [256:39656] :FORWARD ACCEPT [260:19740] :OUTPUT ACCEPT [322:34979] COMMIT # Completed on Thu Jun 4 09:35:15 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:15 2009 *nat :PREROUTING ACCEPT [107:6890] :POSTROUTING ACCEPT [126:8011] :OUTPUT ACCEPT [51:3282] -A POSTROUTING -p tcp -j MASQUERADE -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:35:15 2009 |
#F
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:27 2009 *filter :INPUT ACCEPT [322:48298] :FORWARD ACCEPT [284:21756] :OUTPUT ACCEPT [381:43694] COMMIT # Completed on Thu Jun 4 09:35:27 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:27 2009 *nat :PREROUTING ACCEPT [108:6950] :POSTROUTING ACCEPT [128:8135] :OUTPUT ACCEPT [54:3466] -A POSTROUTING -p tcp -j MASQUERADE -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:35:27 2009 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:44 2009 *filter :INPUT ACCEPT [378:54502] :FORWARD ACCEPT [324:25116] :OUTPUT ACCEPT [435:49867] COMMIT # Completed on Thu Jun 4 09:35:44 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:44 2009 *nat :PREROUTING ACCEPT [109:7034] :POSTROUTING ACCEPT [130:8271] :OUTPUT ACCEPT [56:3578] -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:35:44 2009 |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.207.1 0.0.0.0 UG 0 0 0 eth0.207 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:57 2009 *filter :INPUT ACCEPT [416:58103] :FORWARD ACCEPT [345:26850] :OUTPUT ACCEPT [473:55395] COMMIT # Completed on Thu Jun 4 09:35:57 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:35:57 2009 *nat :PREROUTING ACCEPT [114:7433] :POSTROUTING ACCEPT [138:8837] :OUTPUT ACCEPT [62:3943] -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:35:57 2009 |
#ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.7 P-t-P:172.16.1.8 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:213 errors:0 dropped:0 overruns:0 frame:0 TX packets:36 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:14874 (14.5 KiB) TX bytes:3069 (2.9 KiB) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.207.1 0.0.0.0 UG 0 0 0 eth0.207 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:36:30 2009 *filter :INPUT ACCEPT [553:72567] :FORWARD ACCEPT [412:31760] :OUTPUT ACCEPT [596:68423] COMMIT # Completed on Thu Jun 4 09:36:30 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:36:30 2009 *nat :PREROUTING ACCEPT [145:10915] :POSTROUTING ACCEPT [155:9922] :OUTPUT ACCEPT [71:4499] -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:36:30 2009 |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.207.1 0.0.0.0 UG 0 0 0 eth0.207 |
#ping 192.168.107.2
PING 192.168.107.2 (192.168.107.2) 56(84) bytes of data. 64 bytes from 192.168.107.2: icmp_seq=1 ttl=64 time=0.238 ms 64 bytes from 192.168.107.2: icmp_seq=2 ttl=64 time=0.222 ms ^C --- 192.168.107.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.222/0.230/0.238/0.008 ms |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:37:04 2009 *filter :INPUT ACCEPT [695:84506] :FORWARD ACCEPT [449:34792] :OUTPUT ACCEPT [701:81969] COMMIT # Completed on Thu Jun 4 09:37:04 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:37:04 2009 *nat :PREROUTING ACCEPT [145:10915] :POSTROUTING ACCEPT [164:10526] :OUTPUT ACCEPT [82:5223] -A POSTROUTING -o eth0.207 -p tcp -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:37:04 2009 |
#iptables-save>1
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:38:25 2009 *filter :INPUT ACCEPT [906:247405] :FORWARD ACCEPT [2101:1031793] :OUTPUT ACCEPT [1067:766769] COMMIT # Completed on Thu Jun 4 09:38:25 2009 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:38:25 2009 *nat :PREROUTING ACCEPT [114:7117] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [7:415] -A POSTROUTING -o eth0.207 -j MASQUERADE COMMIT # Completed on Thu Jun 4 09:38:25 2009 |
#~
6 COMMIT 7 # Completed on Thu Jun 4 09:37:13 2009 8 # Generated by iptables-save v1.4.3.2 on Thu Jun 4 09:37:13 2009 9 *nat 10 :PREROUTING ACCEPT [145:10915] -j MASQUERADE 11 :POSTROUTING ACCEPT [165:10578] 12 :OUTPUT ACCEPT [84:5335] ~ ~ ~ ~ ~ ~ ~ "1" 15L, 450C written |
#iptables-restore<1
|
#apt-cache search browser console
epiphany-extensions - Extensions for Epiphany web browser spe - Stani's Python Editor x11-apps - X applications xenwatch - Virtualization utilities, mostly for Xen |
#apt-cache search internet console
aria - Tool to download files from the Internet via HTTP or FTP linphone-nox - SIP softphone - console-only client linux-igd - Linux UPnP Internet Gateway Device pioneers-console - the Settlers of Catan board game - console parts pioneers-console-data - the Settlers of Catan board game - data files pybridge-server - Server files for pybridge sudoku - console based sudoku |
#apt-get install sudoku
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: sudoku 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 27.4kB of archives. After this operation, 77.8kB of additional disk space will be used. Get:1 http://192.168.15.13 lenny/main sudoku 1.0.1-3 [27.4kB] ... Unpacking sudoku (from .../sudoku_1.0.1-3_i386.deb) ... Processing triggers for man-db ... Setting up ed (1.3-3) ... update-alternatives: error: alternative path /bin/ed doesn't exist. dpkg: error processing ed (--configure): subprocess installed post-installation script returned error exit status 2 Setting up sudoku (1.0.1-3) ... Errors were encountered while processing: ed E: Sub-process /usr/bin/dpkg returned an error code (1) |
#apt-get remove ed
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: ed 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 115kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 57097 files and directories currently installed.) Removing ed ... update-alternatives: warning: alternative /bin/ed (part of link group editor) doesn't exist. Removing from list of alternatives. Processing triggers for man-db ... |
#sudoku
bash: sudoku: command not found |
#ssh 192.168.102.1
^C |
#ssh 192.168.108.1
ssh_exchange_identification: Connection closed by remote host |
#ssh 192.168.108.2
ssh: connect to host 192.168.108.2 port 22: Connection refused |
#ssh 192.168.208.2
ssh_exchange_identification: Connection closed by remote host |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.1.8 * 255.255.255.255 UH 0 0 0 tun0 192.168.108.0 172.16.1.8 255.255.255.0 UG 0 0 0 tun0 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 192.168.207.0 * 255.255.255.0 U 0 0 0 eth0.207 192.168.107.0 * 255.255.255.0 U 0 0 0 eth0.107 default 192.168.207.1 0.0.0.0 UG 0 0 0 eth0.207 |
#vim /etc/de
|
#vim /etc/de
|
bash.bashrc bash_completion bash_completion.d/
./ ../
.bash_history .bash_profile .bashrc
route /etc/init.d/openvpn restart route route vim server.conf route ping 192.168.15.254 ping 192.168.15.254 ls /etc/init.d/openvpn status vim server.conf tail -F /var/log/daemon.log vim server.conf /etc/init.d/openvpn restart tail -F /var/log/daemon.log iptables-save history history|less history|less ping 10.0.35.1 ping 10.0.35.100 ping www.google.com init 0 apt-cache search console tetris apt-cache search tetris apt-cache search console game apt-cache search console game|less apt-get install pacman4console pacman4console find / -name pacman4console `find / -name pacman4console` /usr/games/pacman4console ifconfig -a|less ping www.google.com finch finch ssh 192.168.102.1 ssh 192.168.102.2 ssh 192.168.202.1 netstat -na netstat -lnp netstat -lnp netstat -lnp /etc/openvpn/openvpn status netstat -lnp ssh 10.0.35.100 route route add 192.168.108 gw 172.16.1.8 route route del 192.168.0.108 route add -net 192.168.108 netmask 255.255.255.252 gw 172.16.1.8 route ping 192.168.108.1 route del 192.168.0.108 route route add -net 192.168.108.0 netmask 255.255.255.252 gw 172.16.1.8 ping 192.168.108.1 route -n traceroute www.google.com iptables-save iptables -A MSQUARADE -j SNAT route iptables -A MASQUERADE -o eth0.207 -j POSTROUTING iptables -A POSTROUTING -o eth0.207 -j MASQUERADE iptables-save iptables -A POSTROUTING -t nat -p tcp -m tcp-o eth0.207 -j MASQUERADE iptables -A POSTROUTING -t nat -p tcp -m tcp -o eth0.207 -j MASQUERADE iptables-save ping www.google.com ping 10.0.35.1 iptables-save man iptables iptables-save iptables-save > 1 vi 1 iptables-restore<1 vi 1 iptables-restore<1 route print route ping 10.0.35.1 vi 1 iptables-restore<1 iptables-save iptables-save iptables-save iptables-save vi 1 iptables-restore<1 iptables-save iptables --help iptables --help POSTROUTING man iptables route route ping 10.0.35.1 traceroute 10.1.0.35 route -n vi 1 iptables-restore<1 vi 1 iptables-restore<1 vi 1 iptables-restore<1 nat-stat vi 1 iptables-restore<1 vi 1 cat /dev/null >2 cat 2 iptables-restore<2 iptables-save echo '' >2 iptables-restore<2 iptables-save echo ' ' >2 iptables-restore<2 iptables -F iptables-save vi 1 iptables-restore<1 iptables-save iptables -A -p ip -j MASQUERADE iptables -A -p tcp -j MASQUERADE iptables -A POSTROUTING -p tcp -j MASQUERADE iptables -A POSTROUTING -m tcp -j MASQUERADE iptables -A POSTROUTING -t nat -m tcp -j MASQUERADE dmesg iptables -A POSTROUTING -t nat -p tcp -j MASQUERADE iptables-save iptables-save>1 vi 1 iptables-restore<1 iptables-save vi 1 iptables-restore<1 iptables-save vi 1 vi 1 iptables-restore<1 iptables-save vi 1 iptables-restore<1 vi 1 iptables-restore<1 iptables-save vi 1 iptables-restore<1 iptables-save
Время первой команды журнала | 19:09:35 2009- 6- 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:18:14 2009- 6- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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