/l3/users/clint/nt-lnet-2006-06-26/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 |
|
#ssh 192.168.15.2 1000
The authenticity of host '192.168.15.2 (192.168.15.2)' can't be established. RSA key fingerprint is 07:18:94:2c:0b:9b:a6:d6:e1:70:03:f4:b8:e5:91:31. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.2' (RSA) to the list of known hosts. |
#ssh 192.168.15.2
|
#[root@linux1:root]# ssh 192.168.15.2
root@192.168.15.2's password: Last login: Tue Jun 27 15:06:21 2006 from linux2.unix.nt.unix.nt Linux linux2.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 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. l3-agent is already running: pid=4108; pidfile=/root/.lilalo/l3-agent.pid |
#ping -f 192.168.15.2 -s 12315
PING 192.168.15.2 (192.168.15.2) 12315(12343) bytes of data. . --- 192.168.15.2 ping statistics --- 2758 packets transmitted, 2757 received, 0% packet loss, time 7672ms rtt min/avg/max/mdev = 2.567/2.587/2.780/0.056 ms, ipg/ewma 2.783/2.589 ms |
#ping -f 192.168.15.2 -s 65000
PING 192.168.15.2 (192.168.15.2) 65000(65028) bytes of data. .. --- 192.168.15.2 ping statistics --- 989 packets transmitted, 987 received, 0% packet loss, time 11608ms rtt min/avg/max/mdev = 11.832/12.176/14.002/0.432 ms, pipe 2, ipg/ewma 11.749/11.914 ms |
#ping -f 192.168.15.2 -s 65000
PING 192.168.15.2 (192.168.15.2) 65000(65028) bytes of data. . --- 192.168.15.2 ping statistics --- 833 packets transmitted, 832 received, 0% packet loss, time 9706ms rtt min/avg/max/mdev = 11.856/11.937/12.502/0.137 ms, pipe 2, ipg/ewma 11.665/11.946 ms |
#[root@linux1:root]# telnet 10.0.2.0
Trying 10.0.2.0... telnet: Unable to connect to remote host: No route to host |
#[root@linux1:root]# ping 195.95.210.89
PING 195.95.210.89 (195.95.210.89) 56(84) bytes of data. 64 bytes from 195.95.210.89: icmp_seq=1 ttl=249 time=33.4 ms 64 bytes from 195.95.210.89: icmp_seq=2 ttl=249 time=37.8 ms 64 bytes from 195.95.210.89: icmp_seq=3 ttl=249 time=37.0 ms --- 195.95.210.89 ping statistics --- 4 packets transmitted, 3 received, 25% packet loss, time 3005ms rtt min/avg/max/mdev = 33.411/36.090/37.802/1.918 ms |
#tracert 195.95.210.89
bash: tracert: command not found |
#traceroute 195.95.210.89
traceroute to 195.95.210.89 (195.95.210.89), 30 hops max, 38 byte packets 1 linux.nt (192.168.15.254) 0.244 ms 0.223 ms 0.180 ms 2 lin-gw.microcom.com.ua (195.95.210.89) 26.264 ms 26.266 ms * |
#traceroute 195.95.210.90
traceroute to 195.95.210.90 (195.95.210.90), 30 hops max, 38 byte packets 1 linux.nt (192.168.15.254) 0.677 ms 0.222 ms 0.177 ms 2 * * * 3 * * * |
#[root@linux1:root]# nmap
Nmap 3.75 Usage: nmap [Scan Type(s)] [Options] <host or net list> Some Common Scan Types ('*' options require root privileges) * -sS TCP SYN stealth port scan (default if privileged (root)) -sT TCP connect() port scan (default for unprivileged users) * -sU UDP port scan -sP ping scan (Find any reachable machines) * -sF,-sX,-sN Stealth FIN, Xmas, or Null scan (experts only) -sV Version scan probes open ports determining service & app names/versions -sR RPC scan (use with other scan types) Some Common Options (none are required, most can be combined): ... * -Ddecoy_host1,decoy2[,...] Hide scan using many decoys -6 scans via IPv6 rather than IPv4 -T <Paranoid|Sneaky|Polite|Normal|Aggressive|Insane> General timing policy -n/-R Never do DNS resolution/Always resolve [default: sometimes resolve] -oN/-oX/-oG <logfile> Output normal/XML/grepable scan logs to <logfile> -iL <inputfile> Get targets from file; Use '-' for stdin * -S <your_IP>/-e <devicename> Specify source address or network interface --interactive Go into interactive mode (then press h for help) Example: nmap -v -sS -O www.my.com 192.168.0.0/16 '192.88-90.*.*' SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES |
#nmap -o
nmap: option requires an argument -- o Nmap 3.75 Usage: nmap [Scan Type(s)] [Options] <host or net list> Some Common Scan Types ('*' options require root privileges) * -sS TCP SYN stealth port scan (default if privileged (root)) -sT TCP connect() port scan (default for unprivileged users) * -sU UDP port scan -sP ping scan (Find any reachable machines) * -sF,-sX,-sN Stealth FIN, Xmas, or Null scan (experts only) -sV Version scan probes open ports determining service & app names/versions -sR RPC scan (use with other scan types) ... * -Ddecoy_host1,decoy2[,...] Hide scan using many decoys -6 scans via IPv6 rather than IPv4 -T <Paranoid|Sneaky|Polite|Normal|Aggressive|Insane> General timing policy -n/-R Never do DNS resolution/Always resolve [default: sometimes resolve] -oN/-oX/-oG <logfile> Output normal/XML/grepable scan logs to <logfile> -iL <inputfile> Get targets from file; Use '-' for stdin * -S <your_IP>/-e <devicename> Specify source address or network interface --interactive Go into interactive mode (then press h for help) Example: nmap -v -sS -O www.my.com 192.168.0.0/16 '192.88-90.*.*' SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES |
#nmap -6
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:15 EEST No target machines/networks specified! QUITTING! |
#[root@linux1:root]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -A INPUT -p tcp -dport 22 -ACCEPT
Bad argument `22' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp --dport 22 -ACCEPT
iptables v1.2.11: Can't use -A with -A Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -P tcp --dport 22 -ACCEPT
iptables v1.2.11: Can't use -P with -A Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp --dport 22 -ACCEPT
iptables v1.2.11: Can't use -A with -A Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -P tcp --dport 22 -j ACCEPT
iptables v1.2.11: Can't use -P with -A Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp --dport 22 -ACCEPT
iptables v1.2.11: Can't use -A with -A Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
#iptables -A INPUT -p tcp --dport 25 -j ACCEPT
|
#iptables -A INPUT -p tcp DROP
Bad argument `DROP' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp -j DROP
|
#[root@linux1:root]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#nmap 192.168.15.2
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:29 EEST Interesting ports on linux2.linux.nt (192.168.15.2): (The 1662 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:04:79:67:96:71 (Radius Co.) Nmap run completed -- 1 IP address (1 host up) scanned in 0.593 seconds |
#nmap 192.168.15.1
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:29 EEST caught SIGINT signal, cleaning up |
#nmap localhost
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:29 EEST Interesting ports on localhost.localdomain (127.0.0.1): (The 1661 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp Nmap run completed -- 1 IP address (1 host up) scanned in 21.685 seconds |
#nmap 192.168.15.2
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:31 EEST Interesting ports on linux2.linux.nt (192.168.15.2): (The 1662 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:04:79:67:96:71 (Radius Co.) Nmap run completed -- 1 IP address (1 host up) scanned in 0.675 seconds |
#nmap 192.168.15.2
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:31 EEST Interesting ports on linux2.linux.nt (192.168.15.2): (The 1662 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:04:79:67:96:71 (Radius Co.) Nmap run completed -- 1 IP address (1 host up) scanned in 0.629 seconds |
#[root@linux1:root]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#nmap 192.168.15.2
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:32 EEST Interesting ports on linux2.linux.nt (192.168.15.2): (The 1661 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 22/tcp open ssh 25/tcp closed smtp MAC Address: 00:04:79:67:96:71 (Radius Co.) Nmap run completed -- 1 IP address (1 host up) scanned in 21.256 seconds |
#iptables -A INPUT -p tcp --syn -j DROP
|
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere DROP tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -D INPUT -p tcp -j DROP
|
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#[root@linux1:root]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#eject
|
#[root@linux1:root]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp DROP tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#nmap localhost
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:39 EEST Interesting ports on localhost.localdomain (127.0.0.1): (The 1661 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp Nmap run completed -- 1 IP address (1 host up) scanned in 21.065 seconds |
#cd /etc/init.d/
|
#ls -l
total 171 -rwxr-xr-x 1 root root 1074 2002-01-18 10:13 atd -rw-r--r-- 1 root root 2593 2004-09-10 18:00 bootclean.sh -rwxr-xr-x 1 root root 1529 2005-01-05 00:43 bootlogd -rwxr-xr-x 1 root root 1371 2004-09-10 18:00 bootmisc.sh -rwxr-xr-x 1 root root 935 2004-09-10 18:00 checkfs.sh -rwxr-xr-x 1 root root 7160 2004-09-10 18:00 checkroot.sh -rwxr-xr-x 1 root root 468 2004-10-19 08:52 console-cyrillic -rwxr-xr-x 1 root root 5355 2004-07-30 23:44 console-screen.sh -rwxr-xr-x 1 root root 1096 2004-07-28 17:12 cron ... lrwxrwxrwx 1 root root 8 2006-06-25 21:47 stop-bootlogd -> bootlogd -rwxr-xr-x 1 root root 354 2002-10-12 11:02 sudo -rwxr-xr-x 1 root root 2077 2004-11-07 14:13 sysklogd -rwxr-xr-x 1 root root 509 2004-09-10 18:00 umountfs -rwxr-xr-x 1 root root 1291 2004-09-10 18:00 umountnfs.sh -rwxr-xr-x 1 root root 1381 2004-09-10 18:00 urandom -rwxr-xr-x 1 root root 3192 2004-12-09 16:53 xdm -rwxr-xr-x 1 root root 1185 2004-12-09 16:53 xfree86-common -rwxr-xr-x 1 root root 3173 2004-12-15 19:39 xfs -rwxr-xr-x 1 root root 45982 2005-01-30 04:23 xprint |
#iptables save
Bad argument `save' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -save
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -save
iptables v1.2.11: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#iptables -h
iptables v1.2.11 Usage: iptables -[AD] chain rule-specification [options] iptables -[RI] chain rulenum rule-specification [options] iptables -D chain rulenum [options] iptables -[LFZ] [chain] [options] iptables -[NX] chain iptables -E old-chain-name new-chain-name iptables -P chain target [options] iptables -h (print this help information) Commands: ... --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. |
#iptables-save
# Generated by iptables-save v1.2.11 on Tue Jun 27 14:43:54 2006 *filter :INPUT ACCEPT [64601:301522268] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [82575:305950756] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j DROP COMMIT # Completed on Tue Jun 27 14:43:54 2006 # Generated by iptables-save v1.2.11 on Tue Jun 27 14:43:54 2006 *nat :PREROUTING ACCEPT [3567:167218] :POSTROUTING ACCEPT [47166:135634753] :OUTPUT ACCEPT [47166:135634753] COMMIT # Completed on Tue Jun 27 14:43:54 2006 |
#ls -ll
total 171 -rwxr-xr-x 1 root root 1074 2002-01-18 10:13 atd -rw-r--r-- 1 root root 2593 2004-09-10 18:00 bootclean.sh -rwxr-xr-x 1 root root 1529 2005-01-05 00:43 bootlogd -rwxr-xr-x 1 root root 1371 2004-09-10 18:00 bootmisc.sh -rwxr-xr-x 1 root root 935 2004-09-10 18:00 checkfs.sh -rwxr-xr-x 1 root root 7160 2004-09-10 18:00 checkroot.sh -rwxr-xr-x 1 root root 468 2004-10-19 08:52 console-cyrillic -rwxr-xr-x 1 root root 5355 2004-07-30 23:44 console-screen.sh -rwxr-xr-x 1 root root 1096 2004-07-28 17:12 cron ... lrwxrwxrwx 1 root root 8 2006-06-25 21:47 stop-bootlogd -> bootlogd -rwxr-xr-x 1 root root 354 2002-10-12 11:02 sudo -rwxr-xr-x 1 root root 2077 2004-11-07 14:13 sysklogd -rwxr-xr-x 1 root root 509 2004-09-10 18:00 umountfs -rwxr-xr-x 1 root root 1291 2004-09-10 18:00 umountnfs.sh -rwxr-xr-x 1 root root 1381 2004-09-10 18:00 urandom -rwxr-xr-x 1 root root 3192 2004-12-09 16:53 xdm -rwxr-xr-x 1 root root 1185 2004-12-09 16:53 xfree86-common -rwxr-xr-x 1 root root 3173 2004-12-15 19:39 xfs -rwxr-xr-x 1 root root 45982 2005-01-30 04:23 xprint |
#iptables-save > /etc/de
debconf.conf debian_version default defoma deluser.conf devfs |
#iptables-save > /etc/default/iptables.conf
|
#cd /
|
#vi /etc/network/interfaces
20c20 < --- > up iptables < /etc/default/iptables.conf |
#vi /etc/network/interfaces
20c20 < up iptables < /etc/default/iptables.conf --- > up iptables-restore < /etc/default/iptables.conf |
#ssh 192.168.15.2
root@192.168.15.2's password: Last login: Tue Jun 27 15:42:56 2006 from linux.nt Linux linux2.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 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. l3-agent is already running: pid=4108; pidfile=/root/.lilalo/l3-agent.pid |
#[root@linux1:root]# nmap localhost
Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2006-06-27 14:54 EEST Interesting ports on localhost.localdomain (127.0.0.1): (The 1661 ports scanned but not shown below are in state: filtered) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp Nmap run completed -- 1 IP address (1 host up) scanned in 21.063 seconds |
#ssh 192.168.15.2
root@192.168.15.2's password: Last login: Tue Jun 27 15:51:15 2006 from linux1.linux.nt Linux linux2.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 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. ^[[Al3-agent is already running: pid=4108; pidfile=/root/.lilalo/l3-agent.pid |
#netstat
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State |
#netstat -i
exit Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 44254 0 0 0 36908 0 0 0 BMU lo 16436 0 900 0 0 0 900 0 0 0 LRU |
#netstat
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 linux2.unix.nt.un:33266 linux2.unix.nt.unix:ssh TIME_WAIT tcp 0 0 linux2.unix.nt.un:33272 linux.nt:18030 TIME_WAIT tcp 0 0 linux2.unix.nt.un:33274 linux.nt:18030 TIME_WAIT tcp 0 0 linux2.unix.nt.un:33273 linux1.linux.nt:ssh TIME_WAIT tcp 0 0 linux2.unix.nt.un:33044 linux1.linux.nt:ssh ESTABLISHED tcp6 0 0 linux2.unix.nt.unix:ssh linux1.linux.nt:33251 ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path ... unix 2 [ ] DGRAM 12812 unix 2 [ ] DGRAM 9836 unix 2 [ ] DGRAM 9541 unix 2 [ ] DGRAM 7398 unix 2 [ ] DGRAM 6089 unix 2 [ ] DGRAM 6081 unix 2 [ ] DGRAM 5849 unix 2 [ ] DGRAM 5737 unix 2 [ ] DGRAM 5564 unix 2 [ ] DGRAM 5357 |
#exit
exit Connection to 192.168.15.2 closed. |
#netstat -h
usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vnNcaeol] [<Socket> ...] netstat { [-veenNac] -i | [-cnNe] -M | -s } -r, --route display routing table -i, --interfaces display interface table -g, --groups display multicast group memberships -s, --statistics display networking statistics (like SNMP) -M, --masquerade display masqueraded connections -v, --verbose be verbose -n, --numeric don't resolve names ... -a, --all, --listening display all sockets (default: connected) -o, --timers display timers -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.0.0.0 * 255.0.0.0 U 0 0 0 eth0 ^[[A |
#netstat -a
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:echo *:* LISTEN tcp 0 0 *:sunrpc *:* LISTEN tcp 0 0 *:auth *:* LISTEN tcp 0 0 *:kpasswd *:* LISTEN tcp 0 0 localhost.localdom:smtp *:* LISTEN tcp6 0 0 *:20000 *:* LISTEN tcp6 0 0 *:ftp-data *:* LISTEN tcp6 0 0 *:ssh *:* LISTEN tcp6 0 0 ::ffff:192.168.15.1:ssh ::ffff:192.168.15:33044 ESTABLISHED |
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.0.0.0 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148309 errors:0 dropped:0 overruns:0 frame:0 TX packets:142268 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187522471 (178.8 MiB) TX bytes:187130032 (178.4 MiB) Interrupt:201 Base address:0xc000 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.0.0.0 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148309 errors:0 dropped:0 overruns:0 frame:0 TX packets:142268 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187522471 (178.8 MiB) TX bytes:187130032 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69894 errors:0 dropped:0 overruns:0 frame:0 TX packets:69894 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120312355 (114.7 MiB) TX bytes:120312355 (114.7 MiB) |
#ifconfig eth0 192.168.15.126 netmask 255.255.255.192 broadcast 192.168.16.0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.126 Bcast:192.168.16.0 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148363 errors:0 dropped:0 overruns:0 frame:0 TX packets:142319 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187525711 (178.8 MiB) TX bytes:187133092 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69928 errors:0 dropped:0 overruns:0 frame:0 TX packets:69928 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120315347 (114.7 MiB) TX bytes:120315347 (114.7 MiB) |
#ifconfig eth0 192.168.15.126 netmask 255.255.255.192 broadcast 192.168.16.65
|
#[root@linux1:root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.126 Bcast:192.168.16.65 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148385 errors:0 dropped:0 overruns:0 frame:0 TX packets:142319 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527031 (178.8 MiB) TX bytes:187133092 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69928 errors:0 dropped:0 overruns:0 frame:0 TX packets:69928 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120315347 (114.7 MiB) TX bytes:120315347 (114.7 MiB) |
#ping 192.168.1565
connect: Network is unreachable |
#ping 192.168.15.65
PING 192.168.15.65 (192.168.15.65) 56(84) bytes of data. From 192.168.15.126 icmp_seq=1 Destination Host Unreachable From 192.168.15.126 icmp_seq=2 Destination Host Unreachable From 192.168.15.126 icmp_seq=3 Destination Host Unreachable From 192.168.15.126 icmp_seq=4 Destination Host Unreachable From 192.168.15.126 icmp_seq=5 Destination Host Unreachable From 192.168.15.126 icmp_seq=6 Destination Host Unreachable --- 192.168.15.65 ping statistics --- 8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7001ms , pipe 4 |
#traceroute 192.168.15.254
traceroute: Warning: findsaddr: netlink error: Network is unreachable traceroute: Warning: ip checksums disabled traceroute to 192.168.15.254 (192.168.15.254), 30 hops max, 38 byte packets traceroute: sendto: Network is unreachable 1 traceroute: wrote 192.168.15.254 38 chars, ret=-1 *traceroute: sendto: Network is unreachable traceroute: wrote 192.168.15.254 38 chars, ret=-1 *traceroute: sendto: Network is unreachable traceroute: wrote 192.168.15.254 38 chars, ret=-1 * traceroute: sendto: Network is unreachable 2 traceroute: wrote 192.168.15.254 38 chars, ret=-1 *traceroute: sendto: Network is unreachable traceroute: wrote 192.168.15.254 38 chars, ret=-1 |
#[root@linux1:root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.126 Bcast:192.168.16.65 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148390 errors:0 dropped:0 overruns:0 frame:0 TX packets:142328 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527331 (178.8 MiB) TX bytes:187133632 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69936 errors:0 dropped:0 overruns:0 frame:0 TX packets:69936 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120316243 (114.7 MiB) TX bytes:120316243 (114.7 MiB) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.64 * 255.255.255.192 U 0 0 0 eth0 |
#route -?
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables route [-v] [-FC] {add|del|flush} ... Modify routing table for AF. route {-h|--help} [<AF>] Detailed usage syntax for specified AF. route {-V|--version} Display version/author and exit. -v, --verbose be verbose -n, --numeric don't resolve names -e, --extend display other/more information -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <AF>=Use '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#route -v
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.64 * 255.255.255.192 U 0 0 0 eth0 |
#route -F
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.64 * 255.255.255.192 U 0 0 0 eth0 |
#route -v -FC del
Modifying `inet' routing cache not supported Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route -v -F
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.64 * 255.255.255.192 U 0 0 0 eth0 |
#route del
Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#inetd
|
#[root@linux1:root]# ping 192.168.15.65
PING 192.168.15.65 (192.168.15.65) 56(84) bytes of data. From 192.168.15.126 icmp_seq=1 Destination Host Unreachable From 192.168.15.126 icmp_seq=2 Destination Host Unreachable From 192.168.15.126 icmp_seq=3 Destination Host Unreachable --- 192.168.15.65 ping statistics --- 6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5000ms , pipe 3 |
#ping 192.168.15.65
PING 192.168.15.65 (192.168.15.65) 56(84) bytes of data. From 192.168.15.126 icmp_seq=1 Destination Host Unreachable From 192.168.15.126 icmp_seq=2 Destination Host Unreachable From 192.168.15.126 icmp_seq=3 Destination Host Unreachable From 192.168.15.126 icmp_seq=4 Destination Host Unreachable From 192.168.15.126 icmp_seq=5 Destination Host Unreachable From 192.168.15.126 icmp_seq=6 Destination Host Unreachable From 192.168.15.126 icmp_seq=7 Destination Host Unreachable From 192.168.15.126 icmp_seq=8 Destination Host Unreachable From 192.168.15.126 icmp_seq=9 Destination Host Unreachable --- 192.168.15.65 ping statistics --- 12 packets transmitted, 0 received, +9 errors, 100% packet loss, time 11001ms , pipe 3 |
#ping 192.168.15.62
connect: Network is unreachable |
#ping 192.168.15.62
connect: Network is unreachable |
#ping 192.168.15.62
connect: Network is unreachable |
#ping 192.168.15.65
PING 192.168.15.65 (192.168.15.65) 56(84) bytes of data. From 192.168.15.126 icmp_seq=1 Destination Host Unreachable From 192.168.15.126 icmp_seq=2 Destination Host Unreachable From 192.168.15.126 icmp_seq=3 Destination Host Unreachable From 192.168.15.126 icmp_seq=4 Destination Host Unreachable From 192.168.15.126 icmp_seq=5 Destination Host Unreachable From 192.168.15.126 icmp_seq=6 Destination Host Unreachable --- 192.168.15.65 ping statistics --- 9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7998ms , pipe 4 |
#ping 192.168.16.65
Do you want to ping broadcast? Then -b |
#ping 192.168.16.64
connect: Network is unreachable |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.126 Bcast:192.168.16.65 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:148391 errors:0 dropped:0 overruns:0 frame:0 TX packets:142355 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527391 (178.8 MiB) TX bytes:187135252 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69963 errors:0 dropped:0 overruns:0 frame:0 TX packets:69963 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120319267 (114.7 MiB) TX bytes:120319267 (114.7 MiB) |
#ifconfig 192.168.16.126
192.168.16.126: error fetching interface information: Device not found |
#ifconfig eth0 192.168.15.126
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.15.126 Bcast:192.168.16.65 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:148391 errors:0 dropped:0 overruns:0 frame:0 TX packets:142355 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527391 (178.8 MiB) TX bytes:187135252 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69963 errors:0 dropped:0 overruns:0 frame:0 TX packets:69963 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120319267 (114.7 MiB) TX bytes:120319267 (114.7 MiB) |
#ifconfig eth0 192.168.16.126
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.16.126 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:148391 errors:0 dropped:0 overruns:0 frame:0 TX packets:142355 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527391 (178.8 MiB) TX bytes:187135252 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69963 errors:0 dropped:0 overruns:0 frame:0 TX packets:69963 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120319267 (114.7 MiB) TX bytes:120319267 (114.7 MiB) |
#ifconfig eth0 192.168.16.126 netmask 255.255.255.192 broadcast 192.168.16.64
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:A0:A9:12 inet addr:192.168.16.126 Bcast:192.168.16.64 Mask:255.255.255.192 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:148391 errors:0 dropped:0 overruns:0 frame:0 TX packets:142355 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:187527391 (178.8 MiB) TX bytes:187135252 (178.4 MiB) Interrupt:201 Base address:0xc000 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:69963 errors:0 dropped:0 overruns:0 frame:0 TX packets:69963 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:120319267 (114.7 MiB) TX bytes:120319267 (114.7 MiB) |
#[root@linux1:root]# ping 192.168.16.64
Do you want to ping broadcast? Then -b |
Время первой команды журнала | 14:05:35 2006- 6-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:31:57 2006- 6-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 31.68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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