/l3/users/eb/2009/linux3/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
$sudo iptables --help
[sudo] password for user: Sorry, try again. [sudo] password for user: iptables v1.4.3.2 Usage: iptables -[AD] chain rule-specification [options] iptables -I chain [rulenum] rule-specification [options] iptables -R chain rulenum rule-specification [options] iptables -D chain rulenum [options] iptables -[LS] [chain [rulenum]] [options] iptables -[FZ] [chain] [options] ... [!] --out-interface -o output name[+] network interface name ([+] for wildcard) --table -t table table to manipulate (default: `filter') --verbose -v verbose mode --line-numbers print line numbers when listing --exact -x expand numbers (display exact values) [!] --fragment -f match second or further fragments only --modprobe=<command> try to insert modules using this command --set-counters PKTS BYTES set the counter during insert/append [!] --version -V print package version. |
$sudo man iptables
|
#iptables -t filter -A -p tcp -s 192.168.102.2 -j REJECT with tcp-reset
Bad argument `tcp' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A -p tcp -s 192.168.102.2 -j REJECT with tcp-reset
Bad argument `tcp' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A -Ñi eth0.102 - tcp -s 192.168.102.2 -j REJECT with tcp-reset
Bad argument `eth0.102' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t filter -A -i eth0.102 -p tcp -s 192.168.102.2 -j REJECT with tcp-reset
Bad argument `eth0.102' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t filter -A -i eth0 -p tcp -s 192.168.102.2 -j REJECT with tcp-reset
Bad argument `eth0' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t filter -A INPUT -i eth0.102 -p tcp -s 192.168.102.2 -j REJECT
|
#iptables -t filter -D INPUT -i eth0.102 -p tcp -s 192.168.102.2 -j REJECT
|
#iptables -t filter -A FORWARD -i eth0.102 -p tcp -d 192.168.102.2 -j REJECT
|
#iptables -t filter -A FORWARD -i eth0.102 -p tcp -s 192.168.102.2 -j REJECT
|
#iptables -t filter -D FORWARD -i eth0.102 -p tcp -s 192.168.102.2 -j REJECT
|
#iptables-save > /etc/network/iptables
|
#cat /etc/network/iptables
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 14:18:22 2009 *filter :INPUT ACCEPT [1170:686543] :FORWARD ACCEPT [18906:9083917] :OUTPUT ACCEPT [1364:208926] COMMIT # Completed on Tue Jun 2 14:18:22 2009 |
#iptables -t filter -A INPUT -p tcp -j REJECT --reject-with icmp-port-unreachable
|
#nmap -p1-10000 -sS 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 14:34 EEST |
#nmap -p1-100 -sS 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 14:34 EEST |
#iptables -v --list
Chain INPUT (policy ACCEPT 2363 packets, 1747K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 20693 packets, 9594K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 2870 packets, 341K bytes) pkts bytes target prot opt in out source destination |
#iptables -t filter -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
#!ss
ssh 192.168.102.2 root@192.168.102.2's password: |
#mii-tool -F 1000baseTx eth0
Invalid media specification '1000baseTx'. |
#nmap -p1-100 -sS 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 14:42 EEST |
#exit
exit Connection to 192.168.102.2 closed. |
$sudo nmap -p1-100 -sF 192.168.102.2
[sudo] password for user: Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 14:44 EEST All 100 scanned ports on 192.168.102.2 are open|filtered (66) or filtered (34) MAC Address: 00:04:76:A0:A9:12 (3 Com) Nmap done: 1 IP address (1 host up) scanned in 28.875 seconds |
$sudo mii-
mii-diag mii-tool |
$sudo mii-tool
eth0: negotiated, link ok |
$sudo mii-tool eth0
eth0: negotiated, link ok |
$sudo mii-tool
eth0: negotiated, link ok |
$sudo mii-tool --help
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
$sudo mii-tool -A eth0
Invalid media specification 'eth0'. |
$sudo mii-tool -A
mii-tool: option requires an argument -- 'A' usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
$sudo mii-tool eth0 -A
mii-tool: option requires an argument -- 'A' usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
$sudo mii-tool -F 1000baseTx-FD eth0
Invalid media specification '1000baseTx-FD'. |
$sudo mii-tool -F 1000baseTx eth0
Invalid media specification '1000baseTx'. |
#mii-tool -F 100baseTx eth0
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
#mii-tool -R eth0
resetting the transceiver... |
#mii-tool -v eth0
eth0: 10 Mbit, half duplex, link ok product info: vendor 00:aa:00, model 56 rev 0 basic mode: 10 Mbit, half duplex basic status: link ok capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control |
#ethtool -s eth0 speed 100 autoneg on duplex full
|
#mii-tool -v eth0
eth0: negotiated 100baseTx-FD, link ok product info: vendor 00:aa:00, model 56 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
#ethtool -s eth0 speed 1000 autoneg on duplex full
|
#mii-tool -v eth0
eth0: negotiated, link ok product info: vendor 00:aa:00, model 56 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: flow-control link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
#mii-tool -v eth0
eth0: negotiated 100baseTx-FD, link ok product info: vendor 00:aa:00, model 56 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
#!ss
ssh 192.168.102.2 root@192.168.102.2's password: Linux linux4 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 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: Tue Jun 2 14:41:42 2009 from 192.168.102.1 l3-agent is already running: pid=10426; pidfile=/root/.lilalo/l3-agent.pid |
#exit
exit Connection to 192.168.102.2 closed. |
#iptables -v --list
Chain INPUT (policy ACCEPT 2713 packets, 1891K bytes) pkts bytes target prot opt in out source destination 630 121K ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED 13 548 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh 7247 299K REJECT tcp -- any any anywhere anywhere reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT 29738 packets, 10M bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 4585 packets, 485K bytes) pkts bytes target prot opt in out source destination |
#nmap -T4 -p1-1000 -sS 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:01 EEST Interesting ports on 192.168.102.2: Not shown: 999 filtered ports PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:04:76:A0:A9:12 (3 Com) Nmap done: 1 IP address (1 host up) scanned in 4.540 seconds |
#iptables-save > /etc/network/iptables
|
#vi /etc/network/iptables
|
#~
*filter :INPUT ACCEPT [2715:1891490] :FORWARD ACCEPT [35447:12261582] --tcp-reset --reject-with icmp-port-unreachable :OUTPUT ACCEPT [7570:979239] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT ~ ~ ~ ~ ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/network/iptables" 10L, 395C written |
#iptables -v --list
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 60 4200 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh 467 93133 ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED 909 36360 REJECT tcp -- any any anywhere anywhere reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT 3627 packets, 1560K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 736 packets, 69860 bytes) pkts bytes target prot opt in out source destination |
#nmap -T5 -p1-100 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:17 EEST Warning: Giving up on port early because retransmission cap hit. Interesting ports on 192.168.102.1: Not shown: 78 open|filtered ports PORT STATE SERVICE 11/tcp filtered systat 15/tcp filtered netstat 18/tcp filtered msp 21/tcp filtered ftp 23/tcp filtered telnet ... 70/tcp filtered gopher 74/tcp filtered netrjs-4 76/tcp filtered deos 80/tcp filtered http 84/tcp filtered ctf 89/tcp filtered su-mit-tg 91/tcp filtered mit-dov 92/tcp filtered npp MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 16.437 seconds |
#nmap -T4 -p1-100 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:18 EEST All 100 scanned ports on 192.168.102.1 are open|filtered (66) or filtered (34) MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 28.693 seconds |
#nmap -ÐÐT-p1-100 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:19 EEST Warning: Giving up on port early because retransmission cap hit. Interesting ports on 192.168.102.1: Not shown: 82 open|filtered ports PORT STATE SERVICE 4/tcp filtered unknown 11/tcp filtered systat 13/tcp filtered daytime 21/tcp filtered ftp 23/tcp filtered telnet ... 49/tcp filtered tacacs 53/tcp filtered domain 56/tcp filtered xns-auth 75/tcp filtered priv-dial 80/tcp filtered http 83/tcp filtered mit-ml-dev 91/tcp filtered mit-dov 96/tcp filtered dixie MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 12.401 seconds |
#mii-diag -v eth0
mii-diag.c:v2.11 3/21/2005 Donald Becker (becker@scyld.com) http://www.scyld.com/diag/index.html Using the new SIOCGMIIPHY value on PHY 0 (BMCR 0x0000). The autonegotiated capability is 0100. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x3100: Auto-negotiation enabled. You have link beat, and everything is working OK. This transceiver is capable of 100baseTx-FD 100baseTx 10baseT-FD 10baseT. Able to perform Auto-negotiation, negotiation complete. Your link partner advertised c1e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. ... Negotiation completed. Intel 8255* PHY #3072 extended management registers: Error counts, cleared when read: False carriers 2 Link disconnects 16389 Receive errors 12818 Rx symbol errors 0. Rx 10Mbps Early End-Of-Frame errors 2128. Rx 100Mbps Early End-Of-Frame errors 1300. Tx jabber errors 0. |
$nmap -T4 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:21 EEST Interesting ports on 192.168.102.2: Not shown: 1712 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind 9999/tcp open abyss Nmap done: 1 IP address (1 host up) scanned in 0.488 seconds |
$nmap -T4 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:21 EEST Interesting ports on 192.168.102.2: Not shown: 1712 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind 9999/tcp open abyss Nmap done: 1 IP address (1 host up) scanned in 0.488 seconds |
$nmap -T4 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:21 EEST Warning: Giving up on port early because retransmission cap hit. |
$nmap -T4 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:21 EEST Warning: Giving up on port early because retransmission cap hit. |
$nmap -T1 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:22 EEST |
$nmap -T1 192.168.102.2
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:22 EEST |
#mii-tool -v eth0
eth0: negotiated 100baseTx-FD, link ok product info: vendor 00:aa:00, model 56 rev 0 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD |
#iptables -v --list
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 454 34551 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh 3285 425K ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED 3693 148K REJECT tcp -- any any anywhere anywhere reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT 5267 packets, 1834K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 4287 packets, 313K bytes) pkts bytes target prot opt in out source destination |
#nmap -T5 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:24 EEST Warning: Giving up on port early because retransmission cap hit. Stats: 0:01:03 elapsed; 0 hosts completed (1 up), 1 undergoing FIN Scan FIN Scan Timing: About 35.16% done; ETC: 15:26 (0:01:32 remaining) Stats: 0:01:03 elapsed; 0 hosts completed (1 up), 1 undergoing FIN Scan FIN Scan Timing: About 35.26% done; ETC: 15:26 (0:01:32 remaining) All 1715 scanned ports on 192.168.102.1 are open|filtered (1336) or filtered (228) or closed (151) MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 231.197 seconds |
#nmap -T5 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 15:28 EEST Stats: 0:00:09 elapsed; 0 hosts completed (0 up), 0 undergoing ARP Ping Scan Parallel DNS resolution of 1 host. Timing: About 0.00% done Interesting ports on 192.168.102.1: Not shown: 1714 closed ports PORT STATE SERVICE 22/tcp open|filtered ssh MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 14.337 seconds |
#exit
exit Connection to 192.168.102.2 closed. |
#cat /etc/network/iptables
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:08:48 2009 *filter :INPUT ACCEPT [2715:1891490] :FORWARD ACCEPT [35447:12261582] :OUTPUT ACCEPT [7570:979239] -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j REJECT --reject-with tcp-reset -A INPUT -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Tue Jun 2 15:08:48 2009 |
#traceroute crimea-board.info
^C |
#traceroute -n crimea-board.info
crimea-board.info: Temporary failure in name resolution Cannot handle "host" cmdline arg `crimea-board.info' on position 1 (argc 2) |
#traceroute -n 195.216.212.154
traceroute to 195.216.212.154 (195.216.212.154), 30 hops max, 60 byte packets 1 192.168.15.254 1.012 ms 1.175 ms 1.371 ms 2 10.0.35.1 0.331 ms 0.310 ms 0.237 ms 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * ... 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * |
#traceroute -n 195.216.212.154
traceroute to 195.216.212.154 (195.216.212.154), 30 hops max, 60 byte packets 1 192.168.15.254 1.051 ms 1.209 ms 1.410 ms 2 10.0.35.1 0.371 ms !N 0.350 ms !N 0.308 ms !N |
#traceroute -n 195.216.212.154
traceroute to 195.216.212.154 (195.216.212.154), 30 hops max, 60 byte packets 1 192.168.15.254 0.955 ms 1.158 ms 1.327 ms 2 10.0.35.1 0.288 ms 0.239 ms 0.191 ms 3 192.168.200.2 0.862 ms 1.318 ms 1.783 ms 4 192.168.100.1 27.391 ms 28.109 ms 28.805 ms 5 193.200.68.189 10.984 ms 11.183 ms 14.125 ms 6 193.200.69.241 16.330 ms 16.644 ms 18.598 ms 7 62.149.4.25 19.047 ms 20.568 ms 20.635 ms 8 62.149.31.49 22.570 ms 22.619 ms 24.712 ms 9 62.149.20.66 25.324 ms 20.600 ms 20.636 ms ... 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * |
#iptables -t filter -F
|
#netstat -nlp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 2642/inetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2087/portmap tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2359/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2626/exim4 tcp6 0 0 :::22 :::* LISTEN 2359/sshd udp 0 0 0.0.0.0:111 0.0.0.0:* 2087/portmap Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path ... unix 2 [ ACC ] STREAM LISTENING 7910 2907/ssh-agent /tmp/ssh-ILQqgD2864/agent.2864 unix 2 [ ACC ] STREAM LISTENING 7960 2864/x-session-mana /tmp/.ICE-unix/2864 unix 2 [ ACC ] STREAM LISTENING 9251 3514/gconfd-2 /tmp/orbit-user/linc-dba-0-77498d5d5146b unix 2 [ ACC ] STREAM LISTENING 9265 3511/notification-d /tmp/orbit-user/linc-db7-0-666bc305bec7 unix 2 [ ACC ] STREAM LISTENING 9362 3537/firefox-bin /tmp/orbit-user/linc-dd1-0-1d74f3283a780 unix 2 [ ACC ] STREAM LISTENING 6581 2338/syslog-ng /dev/log unix 2 [ ACC ] STREAM LISTENING 6605 2348/dbus-daemon /var/run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 7959 2864/x-session-mana @/tmp/.ICE-unix/2864 unix 2 [ ACC ] STREAM LISTENING 7460 2758/gdm /var/run/gdm_socket unix 2 [ ACC ] STREAM LISTENING 6890 2636/lpd /dev/printer |
#netstat -nlp -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 2642/inetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2087/portmap tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2359/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2626/exim4 udp 0 0 0.0.0.0:111 0.0.0.0:* 2087/portmap |
#iptables -v --list
Chain INPUT (policy ACCEPT 172 packets, 60329 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 941 packets, 132K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1552 packets, 215K bytes) pkts bytes target prot opt in out source destination |
#iptables-restore < /etc/network/iptables
|
#tcpdump -i et0.102 -n host 192.168.102.2
tcpdump: et0.102: No such device exists (SIOCGIFHWADDR: No such device) |
#nmap -T5 -p1-1000 -sF 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 16:05 EEST Interesting ports on 192.168.102.1: Not shown: 999 closed ports PORT STATE SERVICE 22/tcp open|filtered ssh MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 1.325 seconds |
#tcpdump -i eth0.102 -n host 192.168.102.2
16:05:03.301211 IP 192.168.102.2.38754 > 192.168.102.1.838: Flags [F], seq 3821804689, win 1024, length 0 16:05:03.301247 IP 192.168.102.1.838 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.301256 IP 192.168.102.2.38754 > 192.168.102.1.52: Flags [F], seq 3821804689, win 3072, length 0 16:05:03.301266 IP 192.168.102.1.52 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.301270 IP 192.168.102.2.38754 > 192.168.102.1.221: Flags [F], seq 3821804689, win 1024, length 0 16:05:03.301279 IP 192.168.102.1.221 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.301282 IP 192.168.102.2.38754 > 192.168.102.1.135: Flags [F], seq 3821804689, win 3072, length 0 16:05:03.301289 IP 192.168.102.1.135 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.301292 IP 192.168.102.2.38754 > 192.168.102.1.240: Flags [F], seq 3821804689, win 2048, length 0 16:05:03.301305 IP 192.168.102.1.240 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 ... 16:05:03.304835 IP 192.168.102.1.205 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.304839 IP 192.168.102.2.38754 > 192.168.102.1.638: Flags [F], seq 3821804689, win 3072, length 0 16:05:03.304847 IP 192.168.102.1.638 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.304851 IP 192.168.102.2.38754 > 192.168.102.1.446: Flags [F], seq 3821804689, win 2048, length 0 16:05:03.304858 IP 192.168.102.1.446 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.304861 IP 192.168.102.2.38754 > 192.168.102.1.726: Flags [F], seq 3821804689, win 4096, length 0 16:05:03.304873 IP 192.168.102.1.726 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.304878 IP 192.168.102.2.38754 > 192.168.102.1.75: Flags [F], seq 3821804689, win 2048, length 0 16:05:03.304887 IP 192.168.102.1.75 > 192.168.102.2.38754: Flags [R.], seq 0, ack 3821804690, win 0, length 0 16:05:03.304890 IP 192.168.102.2.38754 > 192.168.102.1.67: Flags [F], seq 3821804689, win 4096, length 0 |
#nmap -T5 -p1-1000 -sS 192.168.102.1
Starting Nmap 4.68 ( http://nmap.org ) at 2009-06-02 16:06 EEST Interesting ports on 192.168.102.1: Not shown: 999 closed ports PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:07:E9:3C:2C:BA (Intel) Nmap done: 1 IP address (1 host up) scanned in 0.253 seconds |
#tcpdump -i eth0.102 -n host 192.168.102.2
16:06:53.883677 IP 192.168.102.1.606 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.883686 IP 192.168.102.2.33449 > 192.168.102.1.97: Flags [S], seq 2796257610, win 2048, options [mss 1460], length 0 16:06:53.883700 IP 192.168.102.1.97 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.883706 IP 192.168.102.2.33449 > 192.168.102.1.297: Flags [S], seq 2796257610, win 2048, options [mss 1460], length 0 16:06:53.883718 IP 192.168.102.1.297 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.883723 IP 192.168.102.2.33449 > 192.168.102.1.908: Flags [S], seq 2796257610, win 2048, options [mss 1460], length 0 16:06:53.883734 IP 192.168.102.1.908 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.883743 IP 192.168.102.2.33449 > 192.168.102.1.961: Flags [S], seq 2796257610, win 3072, options [mss 1460], length 0 16:06:53.883757 IP 192.168.102.1.961 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.883762 IP 192.168.102.2.33449 > 192.168.102.1.753: Flags [S], seq 2796257610, win 3072, options [mss 1460], length 0 ... 16:06:53.885784 IP 192.168.102.2.33449 > 192.168.102.1.390: Flags [S], seq 2796257610, win 3072, options [mss 1460], length 0 16:06:53.885796 IP 192.168.102.1.390 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.885800 IP 192.168.102.2.33449 > 192.168.102.1.701: Flags [S], seq 2796257610, win 3072, options [mss 1460], length 0 16:06:53.885813 IP 192.168.102.1.701 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.886122 IP 192.168.102.2.33449 > 192.168.102.1.451: Flags [S], seq 2796257610, win 3072, options [mss 1460], length 0 16:06:53.886164 IP 192.168.102.1.451 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.886176 IP 192.168.102.2.33449 > 192.168.102.1.967: Flags [S], seq 2796257610, win 2048, options [mss 1460], length 0 16:06:53.886219 IP 192.168.102.1.967 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 16:06:53.886228 IP 192.168.102.2.33449 > 192.168.102.1.264: Flags [S], seq 2796257610, win 4096, options [mss 1460], length 0 16:06:53.886240 IP 192.168.102.1.264 > 192.168.102.2.33449: Flags [R.], seq 0, ack 2796257611, win 0, length 0 |
#tcpdump -i eth0.102 -n host 192.168.102.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0.102, link-type EN10MB (Ethernet), capture size 96 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#cat /proc/net/ip_conntrack
udp 17 10 src=192.168.15.3 dst=10.0.35.1 sport=43231 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=43231 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58220 dport=18030 packets=6 bytes=1946 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58220 packets=5 bytes=292 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=192.168.102.2 dst=10.0.35.100 sport=48057 dport=22 packets=2671 bytes=146087 src=10.0.35.100 dst=192.168.102.2 sport=22 dport=48057 packets=3429 bytes=959383 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431925 ESTABLISHED src=192.168.102.1 dst=192.168.102.2 sport=51693 dport=22 packets=131 bytes=11111 src=192.168.102.2 dst=192.168.102.1 sport=22 dport=51693 packets=84 bytes=11299 [ASSURED] mark=0 secmark=0 use=1 udp 17 10 src=192.168.15.3 dst=10.0.35.1 sport=58554 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=58554 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 90 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58218 dport=18030 packets=5 bytes=1506 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58218 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58215 dport=18030 packets=5 bytes=891 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58215 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 udp 17 0 src=192.168.15.3 dst=10.0.35.1 sport=59453 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=59453 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 6 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58214 dport=18030 packets=5 bytes=1500 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58214 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 66 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58216 dport=18030 packets=12 bytes=19301 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58216 packets=15 bytes=788 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=192.168.15.3 dst=10.0.35.100 sport=33397 dport=22 packets=2390 bytes=127172 src=10.0.35.100 dst=192.168.15.3 sport=22 dport=33397 packets=2488 bytes=544464 [ASSURED] mark=0 secmark=0 use=1 tcp 6 427183 ESTABLISHED src=10.0.35.100 dst=192.168.102.2 sport=39855 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.102.2 dst=10.0.35.100 sport=80 dport=39855 packets=0 bytes=0 mark=0 secmark=0 use=1 tcp 6 431995 ESTABLISHED src=192.168.15.3 dst=213.180.203.19 sport=49016 dport=5222 packets=91 bytes=14511 src=213.180.203.19 dst=192.168.15.3 sport=5222 dport=49016 packets=82 bytes=36022 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58219 dport=18030 packets=5 bytes=1113 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58219 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 427163 ESTABLISHED src=10.0.35.100 dst=192.168.102.2 sport=43520 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.102.2 dst=10.0.35.100 sport=80 dport=43520 packets=0 bytes=0 mark=0 secmark=0 use=1 tcp 6 79 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58217 dport=18030 packets=11 bytes=19249 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58217 packets=16 bytes=852 [ASSURED] mark=0 secmark=0 use=1 tcp 6 46 TIME_WAIT src=192.168.102.2 dst=194.150.93.78 sport=36404 dport=18030 packets=5 bytes=1104 src=194.150.93.78 dst=192.168.102.2 sport=18030 dport=36404 packets=4 bytes=216 [ASSURED] mark=0 secmark=0 use=1 |
#lsmod | grep trac
nf_conntrack_ipv4 11568 1 nf_defrag_ipv4 1648 1 nf_conntrack_ipv4 xt_conntrack 3168 1 nf_conntrack 58228 2 nf_conntrack_ipv4,xt_conntrack x_tables 13672 4 xt_conntrack,xt_tcpudp,ipt_REJECT,ip_tables |
#iptables -v --list
Chain INPUT (policy ACCEPT 1 packets, 350 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 1383 packets, 250K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 3167 packets, 325K bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -D PREROUTING -i eth0.102 -p tcp --dport 22 -j DNAT --to-destination 10.0.35.100:22
|
#iptables -t nat -D PREROUTING -i eth0.102 -p tcp --dport 22 -j DNAT --to-destination 192.168.15.1:22
|
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
#iptables -t nat -v --list
Chain PREROUTING (policy ACCEPT 16 packets, 1465 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 23 packets, 1320 bytes) pkts bytes target prot opt in out source destination 4 224 MASQUERADE all -- any eth0 anywhere anywhere Chain OUTPUT (policy ACCEPT 12 packets, 672 bytes) pkts bytes target prot opt in out source destination |
#iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
|
#iptables -t nat -A POSTROUTING -o eth0 -s 192.168.102.0/32 -j MASQUERADE
|
$ssh -l root 192.168.102.2
^C |
$ssh -l root 192.168.102.2
root@192.168.102.2's password: |
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:08:48 2009 *filter :INPUT ACCEPT [2715:1891490] :FORWARD ACCEPT [35447:12261582] :OUTPUT ACCEPT [7570:979239] -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j REJECT --reject-with tcp-reset -A INPUT -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Tue Jun 2 15:08:48 2009
udp 17 10 src=192.168.15.3 dst=10.0.35.1 sport=43231 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=43231 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58220 dport=18030 packets=6 bytes=1946 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58220 packets=5 bytes=292 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=192.168.102.2 dst=10.0.35.100 sport=48057 dport=22 packets=2671 bytes=146087 src=10.0.35.100 dst=192.168.102.2 sport=22 dport=48057 packets=3429 bytes=959383 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431925 ESTABLISHED src=192.168.102.1 dst=192.168.102.2 sport=51693 dport=22 packets=131 bytes=11111 src=192.168.102.2 dst=192.168.102.1 sport=22 dport=51693 packets=84 bytes=11299 [ASSURED] mark=0 secmark=0 use=1 udp 17 10 src=192.168.15.3 dst=10.0.35.1 sport=58554 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=58554 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 90 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58218 dport=18030 packets=5 bytes=1506 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58218 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58215 dport=18030 packets=5 bytes=891 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58215 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 udp 17 0 src=192.168.15.3 dst=10.0.35.1 sport=59453 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.3 sport=53 dport=59453 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 6 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58214 dport=18030 packets=5 bytes=1500 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58214 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 66 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58216 dport=18030 packets=12 bytes=19301 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58216 packets=15 bytes=788 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=192.168.15.3 dst=10.0.35.100 sport=33397 dport=22 packets=2390 bytes=127172 src=10.0.35.100 dst=192.168.15.3 sport=22 dport=33397 packets=2488 bytes=544464 [ASSURED] mark=0 secmark=0 use=1 tcp 6 427183 ESTABLISHED src=10.0.35.100 dst=192.168.102.2 sport=39855 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.102.2 dst=10.0.35.100 sport=80 dport=39855 packets=0 bytes=0 mark=0 secmark=0 use=1 tcp 6 431995 ESTABLISHED src=192.168.15.3 dst=213.180.203.19 sport=49016 dport=5222 packets=91 bytes=14511 src=213.180.203.19 dst=192.168.15.3 sport=5222 dport=49016 packets=82 bytes=36022 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58219 dport=18030 packets=5 bytes=1113 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58219 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 427163 ESTABLISHED src=10.0.35.100 dst=192.168.102.2 sport=43520 dport=80 packets=1 bytes=40 [UNREPLIED] src=192.168.102.2 dst=10.0.35.100 sport=80 dport=43520 packets=0 bytes=0 mark=0 secmark=0 use=1 tcp 6 79 TIME_WAIT src=192.168.15.3 dst=194.150.93.78 sport=58217 dport=18030 packets=11 bytes=19249 src=194.150.93.78 dst=192.168.15.3 sport=18030 dport=58217 packets=16 bytes=852 [ASSURED] mark=0 secmark=0 use=1 tcp 6 46 TIME_WAIT src=192.168.102.2 dst=194.150.93.78 sport=36404 dport=18030 packets=5 bytes=1104 src=194.150.93.78 dst=192.168.102.2 sport=18030 dport=36404 packets=4 bytes=216 [ASSURED] mark=0 secmark=0 use=1
Время первой команды журнала | 12:54:06 2009- 6- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:32:54 2009- 6- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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