/l3/users/bas/2011-03/linux5.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#vim /etc/hosts.allow
--- /tmp/l3-saved-3781.6480.16710 2011-04-06 12:16:03.000000000 +0600 +++ /etc/hosts.allow 2011-04-06 12:16:35.000000000 +0600 @@ -3,4 +3,4 @@ # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # - +sshd = 127.0.0.1 192.168.15.5 |
#/etc/init.d/sshd restart
Stopping sshd: [ OK ] Starting sshd: [ OK ] |
#vim /etc/hosts.deny
--- /tmp/l3-saved-3781.12122.24213 2011-04-06 12:18:02.000000000 +0600 +++ /etc/hosts.deny 2011-04-06 12:18:20.000000000 +0600 @@ -6,4 +6,4 @@ # The portmap line is redundant, but it is left to remind you that # the new secure portmap uses hosts.deny and hosts.allow. In particular # you should know that NFS uses portmap! -# sshd = ALL +sshd : ALL |
#vim /etc/hosts.allow
--- /tmp/l3-saved-3781.12632.26231 2011-04-06 12:18:22.000000000 +0600 +++ /etc/hosts.allow 2011-04-06 12:19:09.000000000 +0600 @@ -3,4 +3,4 @@ # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # -# sshd = 127.0.0.1 192.168.15.5 +sshd: 127.0.0.1 192.168.15.5 192.168.15.253 |
#ssh user@192.168.15.1
Last login: Wed Apr 6 12:06:15 2011 from linux1 l3-agent is already running: pid=3667; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection to 192.168.15.1 closed. |
#ssh user@192.168.15.1
Last login: Wed Apr 6 12:22:19 2011 from linux5.unix.bas l3-agent is already running: pid=3667; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection to 192.168.15.1 closed. |
#ssh user@192.168.15.1
Last login: Wed Apr 6 12:22:48 2011 from linux5.unix.bas l3-agent is already running: pid=3667; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection to 192.168.15.1 closed. |
#ssh user@192.168.15.1
ssh_exchange_identification: Connection closed by remote host |
#ssh 192.168.15.1
root@192.168.15.1's password: Permission denied, please try again. root@192.168.15.1's password: Permission denied, please try again. root@192.168.15.1's password: Permission denied (publickey,gssapi-with-mic,password). |
#ssh user@192.168.15.1
Last login: Wed Apr 6 12:23:30 2011 from linux5.unix.bas l3-agent is already running: pid=3667; pidfile=/home/user/.lilalo/l3-agent.pid |
#nmap 192.168.15.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:27 ALMT Interesting ports on linux1.unix.bas (192.168.15.1): Not shown: 1670 closed ports PORT STATE SERVICE 7/tcp open echo 22/tcp open ssh 23/tcp open telnet 79/tcp open finger 111/tcp open rpcbind 673/tcp open unknown 704/tcp open elcsd 816/tcp open unknown 2049/tcp open nfs 3128/tcp open squid-http MAC Address: E0:CB:4E:DD:EA:D7 (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 0.149 seconds |
#nmap 192.168.15.5
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:27 ALMT Interesting ports on linux1.unix.bas (192.168.15.5): Not shown: 1675 closed ports PORT STATE SERVICE 7/tcp open echo 22/tcp open ssh 79/tcp open finger 111/tcp open rpcbind 944/tcp open unknown Nmap finished: 1 IP address (1 host up) scanned in 0.051 seconds |
#nmap 192.168.15.2
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:31 ALMT Interesting ports on linux1.unix.bas (192.168.15.2): Not shown: 1673 closed ports PORT STATE SERVICE 7/tcp open echo 22/tcp open ssh 23/tcp open telnet 79/tcp open finger 80/tcp open http 111/tcp open rpcbind 905/tcp open unknown MAC Address: 00:26:18:E4:56:5E (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 0.120 seconds |
#nmap -p 23 192.168.15.* | grep 'ports on'
Interesting ports on linux1.unix.bas (192.168.15.1): Interesting ports on linux1.unix.bas (192.168.15.2): Interesting ports on linux1.unix.bas (192.168.15.3): Interesting ports on linux1.unix.bas (192.168.15.4): Interesting ports on linux1.unix.bas (192.168.15.5): Interesting ports on linux10.unix.bas (192.168.15.10): Interesting ports on linux222.unix.bas (192.168.15.222): Interesting ports on linux253.unix.bas (192.168.15.253): |
#cat /proc/sys/net/ipv4/ip_
ip_conntrack_max ip_dynaddr ip_local_port_range ip_no_pmtu_disc ip_default_ttl ip_forward ip_nonlocal_bind |
#cat /proc/sys/net/ipv4/ip_
ip_conntrack_max ip_dynaddr ip_local_port_range ip_no_pmtu_disc ip_default_ttl ip_forward ip_nonlocal_bind |
#cat /proc/sys/net/ipv4/ip_forward
1 |
#iptables -l
iptables v1.3.5: Unknown arg `-l' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:bootps ACCEPT tcp -- anywhere anywhere tcp dpt:bootps Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED ACCEPT all -- 192.168.122.0/24 anywhere ACCEPT all -- anywhere anywhere REJECT all -- anywhere anywhere reject-with icmp-port-unreachable REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -save
iptables v1.3.5: no command specified Try `iptables -h' or 'iptables --help' for more information. |
#/etc/init.d/ip
ip6tables iptables |
#/etc/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ] |
#/etc/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ] |
#nmap /192.168.15.5
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 14:40 ALMT sendto in send_ip_packet: sendto(6, packet, 28, 0, 0.168.15.5, 16) => Invalid argument sendto in send_ip_packet: sendto(5, packet, 40, 0, 0.168.15.5, 16) => Invalid argument sendto in send_ip_packet: sendto(6, packet, 28, 0, 0.168.15.5, 16) => Invalid argument sendto in send_ip_packet: sendto(5, packet, 40, 0, 0.168.15.5, 16) => Invalid argument Stats: 0:00:01 elapsed; 0 hosts completed (0 up), 0 undergoing Host Discovery Note: Host seems down. If it is really up, but blocking our ping probes, try -P0 Nmap finished: 1 IP address (0 hosts up) scanned in 2.051 seconds |
#nmap 192.168.15.5
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 14:40 ALMT Interesting ports on linux1.unix.bas (192.168.15.5): Not shown: 1675 closed ports PORT STATE SERVICE 7/tcp open echo 22/tcp open ssh 79/tcp open finger 111/tcp open rpcbind 944/tcp open unknown Nmap finished: 1 IP address (1 host up) scanned in 0.049 seconds |
#ipt
iptables iptables-save iptunnel iptables-restore iptstate |
#iptables -A INPUT -p tcp --syn -j DROP
|
#iptables -A INPUT -p tcp --syn -j REJECT --reject-with tcp-reset
|
#nmap 192.168.15.2
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 14:45 ALMT Interesting ports on linux1.unix.bas (192.168.15.2): Not shown: 1679 closed ports PORT STATE SERVICE 22/tcp open ssh MAC Address: 00:26:18:E4:56:5E (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 1.202 seconds |
#iptables -L --line-number
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:domain 2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain 3 ACCEPT udp -- anywhere anywhere udp dpt:bootps 4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps 5 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 6 REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with tcp-reset Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 anywhere 3 ACCEPT all -- anywhere anywhere 4 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable 5 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 14:50:20 2011 *nat :PREROUTING ACCEPT [70161:3104292] :POSTROUTING ACCEPT [17983:858968] :OUTPUT ACCEPT [17985:859153] -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p tcp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -p udp -j MASQUERADE --to-ports 1024-65535 -A POSTROUTING -s 192.168.122.0/255.255.255.0 -d ! 192.168.122.0/255.255.255.0 -j MASQUERADE COMMIT # Completed on Wed Apr 6 14:50:20 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REJECT --reject-with tcp-reset -A FORWARD -d 192.168.122.0/255.255.255.0 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 192.168.122.0/255.255.255.0 -i virbr0 -j ACCEPT -A FORWARD -i virbr0 -o virbr0 -j ACCEPT -A FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable COMMIT # Completed on Wed Apr 6 14:50:20 2011 |
#iptables -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
|
#iptables -A INPUT -p udp -j REJECT --reject-with port-unreachable
iptables v1.3.5: unknown reject type `port-unreachable' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -j REJECT --reject-with icmp-host-unreachable
|
#iptables -L -n
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 reject-with tcp-reset ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate ESTABLISHED REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset REJECT udp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:67 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 6 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 reject-with tcp-reset 7 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate ESTABLISHED 8 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset 9 REJECT udp -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 10 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -D INPUT 6
|
#ping 192.168.15.5
PING 192.168.15.5 (192.168.15.5) 56(84) bytes of data. --- 192.168.15.5 ping statistics --- 12 packets transmitted, 0 received, 100% packet loss, time 10999ms |
#nmap -sF 192.168.15.5
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 15:07 ALMT Interesting ports on linux1.unix.bas (192.168.15.5): Not shown: 1679 closed ports PORT STATE SERVICE 22/tcp open|filtered ssh Nmap finished: 1 IP address (1 host up) scanned in 1.222 seconds |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:bootps ACCEPT tcp -- anywhere anywhere tcp dpt:bootps ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT all -- anywhere anywhere ctstate ESTABLISHED REJECT tcp -- anywhere anywhere reject-with tcp-reset REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable REJECT all -- anywhere anywhere reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED ACCEPT all -- 192.168.122.0/24 anywhere ACCEPT all -- anywhere anywhere REJECT all -- anywhere anywhere reject-with icmp-port-unreachable REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#nmap 192.168.15.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 15:21 ALMT Interesting ports on linux1.unix.bas (192.168.15.1): Not shown: 1678 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: E0:CB:4E:DD:EA:D7 (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 1.201 seconds |
#nmap -sF 192.168.15.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 15:22 ALMT Interesting ports on linux1.unix.bas (192.168.15.1): Not shown: 1678 closed ports PORT STATE SERVICE 22/tcp open|filtered ssh 80/tcp open|filtered http MAC Address: E0:CB:4E:DD:EA:D7 (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 1.298 seconds |
#ping 192.168.15.1
PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data. --- 192.168.15.1 ping statistics --- 7 packets transmitted, 0 received, 100% packet loss, time 5999ms |
#/etc/init.d/ip
ip6tables iptables |
#/etc/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ] |
#ping 192.169.15.2
PING 192.169.15.2 (192.169.15.2) 56(84) bytes of data. --- 192.169.15.2 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 3999ms |
#ping 192.168.16.2
PING 192.168.16.2 (192.168.16.2) 56(84) bytes of data. --- 192.168.16.2 ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 8000ms |
#ping 192.168.16.2
PING 192.168.16.2 (192.168.16.2) 56(84) bytes of data. 64 bytes from 192.168.16.2: icmp_seq=1 ttl=64 time=1.06 ms --- 192.168.16.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.068/1.068/1.068/0.000 ms |
#ping 192.168.15.2
PING 192.168.15.2 (192.168.15.2) 56(84) bytes of data. 64 bytes from 192.168.15.2: icmp_seq=1 ttl=64 time=0.940 ms 64 bytes from 192.168.15.2: icmp_seq=2 ttl=64 time=0.178 ms --- 192.168.15.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.178/0.559/0.940/0.381 ms |
#ping 192.168.15.2
PING 192.168.15.2 (192.168.15.2) 56(84) bytes of data. 64 bytes from 192.168.15.2: icmp_seq=1 ttl=64 time=0.178 ms 64 bytes from 192.168.15.2: icmp_seq=2 ttl=64 time=0.180 ms 64 bytes from 192.168.15.2: icmp_seq=3 ttl=64 time=0.186 ms 64 bytes from 192.168.15.2: icmp_seq=4 ttl=64 time=0.158 ms 64 bytes from 192.168.15.2: icmp_seq=5 ttl=64 time=0.166 ms 64 bytes from 192.168.15.2: icmp_seq=6 ttl=64 time=0.143 ms 64 bytes from 192.168.15.2: icmp_seq=7 ttl=64 time=0.161 ms 64 bytes from 192.168.15.2: icmp_seq=8 ttl=64 time=0.170 ms 64 bytes from 192.168.15.2: icmp_seq=9 ttl=64 time=0.179 ms ... 64 bytes from 192.168.15.2: icmp_seq=34 ttl=64 time=0.187 ms 64 bytes from 192.168.15.2: icmp_seq=35 ttl=64 time=0.194 ms 64 bytes from 192.168.15.2: icmp_seq=36 ttl=64 time=0.172 ms 64 bytes from 192.168.15.2: icmp_seq=37 ttl=64 time=0.194 ms 64 bytes from 192.168.15.2: icmp_seq=38 ttl=64 time=0.166 ms 64 bytes from 192.168.15.2: icmp_seq=39 ttl=64 time=0.175 ms 64 bytes from 192.168.15.2: icmp_seq=40 ttl=64 time=0.155 ms --- 192.168.15.2 ping statistics --- 40 packets transmitted, 40 received, 0% packet loss, time 39006ms rtt min/avg/max/mdev = 0.143/0.174/0.208/0.015 ms |
#ping 192.168.160.2
PING 192.168.160.2 (192.168.160.2) 56(84) bytes of data. 64 bytes from 192.168.160.2: icmp_seq=1 ttl=64 time=0.175 ms 64 bytes from 192.168.160.2: icmp_seq=2 ttl=64 time=0.158 ms --- 192.168.160.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.158/0.166/0.175/0.015 ms |
#vim /etc/xinetd.d/finger
--- /tmp/l3-saved-3781.27636.21735 2011-04-06 16:37:31.000000000 +0600 +++ /etc/xinetd.d/finger 2011-04-06 16:37:48.000000000 +0600 @@ -7,7 +7,7 @@ user = root server = /usr/bin/bc #server_args = -i - #bind = 127.0.0.1 + bind = 192.168.60.2 #only_from = 127.0.0.1 192.168.15.5 192.168.15.1 no_access = 127.0.0.1 192.168.15.5 } |
#vim /etc/xinetd.d/finger
--- /tmp/l3-saved-3781.6669.4624 2011-04-06 16:37:50.000000000 +0600 +++ /etc/xinetd.d/finger 2011-04-06 16:37:57.000000000 +0600 @@ -7,7 +7,7 @@ user = root server = /usr/bin/bc #server_args = -i - bind = 192.168.60.2 + bind = 192.168.160.2 #only_from = 127.0.0.1 192.168.15.5 192.168.15.1 no_access = 127.0.0.1 192.168.15.5 } |
#/etc/init.d/xinetd restart
Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#nc 192.168.160.2 79
qwerty 2+2 = 2+1= |
#netstat -lp | grep finger
tcp 0 0 192.168.160.2:finger *:* LISTEN 7195/xinetd |
#netstat -lp | grep finger
history | grep iptable 1064 iptables -l 1065 iptables -L 1066 iptables -save 1067 /etc/init.d/iptables save 1068 iptables-save 1069 /etc/init.d/iptables save 1070 iptables -A INPUT -p tcp --dport 22 -j ACCEPT 1073 iptables -A INPUT -p tcp --syn -j DROP 1075 iptables -D INPUT -p tcp --syn -j DROP ... 1086 iptables -A INPUT -j REJECT --reject-with icmp-host-unreachable 1087 iptables -L -n 1088 iptables -L -n --line-numbers 1089 iptables -D INPUT 6 1092 iptables -L 1096 /etc/init.d/iptables save 1106 iptables -t nat -R PREROUTING -p tcp --dport 79 -j DNAT --to 192.168.160.2:79 1107 iptables -t nat -R PREROUTING -p tcp --dport 79 -j DNAT --to 192.168.160.2:79 1108* iptables -t nat -R PREROUTING -p tcp --dport 79 -j DNAT --to 192.168.160.2:79 1109 history | grep iptable |
#iptables -L --line-number
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:domain 2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain 3 ACCEPT udp -- anywhere anywhere udp dpt:bootps 4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps 5 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 6 ACCEPT all -- anywhere anywhere ctstate ESTABLISHED 7 REJECT tcp -- anywhere anywhere reject-with tcp-reset 8 REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable 9 REJECT all -- anywhere anywhere reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 anywhere 3 ACCEPT all -- anywhere anywhere 4 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable 5 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -D INPUT 7
|
#iptables -L --line-number
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:domain 2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain 3 ACCEPT udp -- anywhere anywhere udp dpt:bootps 4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps 5 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 6 ACCEPT all -- anywhere anywhere ctstate ESTABLISHED 7 REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable 8 REJECT all -- anywhere anywhere reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 anywhere 3 ACCEPT all -- anywhere anywhere 4 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable 5 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -L --line-number 7
Bad argument `7' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -D INPUT 7
|
#iptables -L --line-number 7
Bad argument `7' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -L --line-number
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:domain 2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain 3 ACCEPT udp -- anywhere anywhere udp dpt:bootps 4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps 5 ACCEPT tcp -- anywhere anywhere tcp dpt:ssh 6 ACCEPT all -- anywhere anywhere ctstate ESTABLISHED 7 REJECT all -- anywhere anywhere reject-with icmp-host-unreachable Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere 192.168.122.0/24 state RELATED,ESTABLISHED 2 ACCEPT all -- 192.168.122.0/24 anywhere 3 ACCEPT all -- anywhere anywhere 4 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable 5 REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT) num target prot opt source destination |
#iptables -D INPUT 7
|
#/etc/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ] |
#history
122 mkdir /tmp/1 123 ls /tmp/ 124 ls /tmp/ 125 ls /tmp/ | grep 1 126 ls /tmp/ | grep 2 127 cd /tmp/ 128 mkdir DIR 129 mkdir DIR/1 130 mkdir DIR/1 2 3 4 5 6 7 8 9 131 ls /Di ... 1112 iptables -L --line-number 1113 iptables -L --line-number 7 1114 iptables -D INPUT 7 1115 iptables -L --line-number 7 1116 iptables -L --line-number 1117 iptables -D INPUT 7 1118 /etc/init.d/iptables save 1119 iptables -t nat -R PREROUTING -p tcp --dport 79 -j DNAT --to 192.168.160.2:79 1120 iptables -L --line-number 1121 history |
#ls /etc/sys
sysconfig/ sysctl.conf syslog.conf |
#ls /etc/sys
sysconfig/ sysctl.conf syslog.conf |
#ls /etc/sysconfig/net
netconsole network networking/ network-scripts/ |
#ls /etc/sysconfig/network-scripts/
ifcfg-eth0 ifdown-ippp ifdown-routes ifup-bnep ifup-isdn ifup-sit network-functions ifcfg-eth0:0 ifdown-ipsec ifdown-sit ifup-eth ifup-plip ifup-sl network-functions-ipv6 ifcfg-lo ifdown-ipv6 ifdown-sl ifup-ippp ifup-plusb ifup-tunnel route-eth0 ifdown ifdown-isdn ifdown-tunnel ifup-ipsec ifup-post ifup-wireless ifdown-bnep ifdown-post ifup ifup-ipv6 ifup-ppp init.ipv6-global ifdown-eth ifdown-ppp ifup-aliases ifup-ipx ifup-routes net.hotplug |
#nc 192.168.15.1 79
|
#nc 192.168.15.1 77
|
#nc 192.168.15.1 79
ls -l total 172 drwxr-xr-x 2 root root 4096 Apr 4 11:11 bin drwxr-xr-x 3 root root 4096 Apr 5 15:28 boot drwxr-xr-x 16 root root 4300 Apr 6 16:37 dev drwxr-xr-x 111 root root 12288 Apr 6 14:30 etc drwxr-xr-x 4 root root 4096 Apr 2 15:29 home drwxr-xr-x 11 root root 4096 Apr 6 14:01 lib drwxr-xr-x 7 root root 4096 Apr 6 14:01 lib64 drwx------ 2 root root 16384 Mar 28 03:54 lost+found ... dr-xr-xr-x 242 root root 0 Apr 6 15:57 proc drwxr-x--- 29 root root 4096 Apr 6 16:38 root drwxr-xr-x 3 root root 12288 Apr 6 14:01 sbin drwxr-xr-x 2 root root 4096 Mar 27 21:55 selinux drwxr-xr-x 2 root root 4096 Apr 4 14:31 snapdir drwxr-xr-x 2 root root 4096 Jan 27 2010 srv drwxr-xr-x 12 root root 0 Apr 6 15:57 sys drwxrwxrwt 20 root root 4096 Apr 6 16:54 tmp drwxr-xr-x 16 root root 4096 Mar 27 22:04 usr drwxr-xr-x 22 root root 4096 Mar 27 22:02 var |
#ifconfig
dummy0 Link encap:Ethernet HWaddr 26:7E:EA:BE:04:58 inet addr:192.168.160.2 Bcast:192.168.160.255 Mask:255.255.255.0 inet6 addr: fe80::247e:eaff:febe:458/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) eth0 Link encap:Ethernet HWaddr 00:26:18:CA:EE:7B inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:0 RX bytes:2904791 (2.7 MiB) TX bytes:2904791 (2.7 MiB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:45 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:8292 (8.0 KiB) |
#ifconfig dummy0
dummy0 Link encap:Ethernet HWaddr 26:7E:EA:BE:04:58 inet addr:192.168.160.2 Bcast:192.168.160.255 Mask:255.255.255.0 inet6 addr: fe80::247e:eaff:febe:458/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2692/hpiod tcp 0 0 0.0.0.0:7 0.0.0.0:* LISTEN 7195/xinetd tcp 0 0 192.168.160.2:79 0.0.0.0:* LISTEN 7195/xinetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2423/portmap tcp 0 0 0.0.0.0:944 0.0.0.0:* LISTEN 2458/rpc.statd tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2965/dnsmasq tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2719/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2760/sendmail: acce ... unix 2 [ ACC ] STREAM LISTENING 9262 2908/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 9018 2778/gpm /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 9374 2854/libvirtd /var/run/libvirt/libvirt-sock unix 2 [ ACC ] STREAM LISTENING 12594 3718/gedit /tmp/gedit.user.1229453505 unix 2 [ ACC ] STREAM LISTENING 9376 2854/libvirtd /var/run/libvirt/libvirt-sock-ro unix 2 [ ACC ] STREAM LISTENING 6058 2123/brcm_iscsiuio @ISCSID_UIP_ABSTRACT_NAMESPACE unix 2 [ ACC ] STREAM LISTENING 10402 3274/dbus-daemon @/tmp/dbus-E16OMFU3MJ unix 2 [ ACC ] STREAM LISTENING 11335 3363/gam_server @/tmp/fam-user- unix 2 [ ACC ] STREAM LISTENING 7021 2592/hald @/var/run/hald/dbus-peaHveNy79 unix 2 [ ACC ] STREAM LISTENING 7022 2592/hald @/var/run/hald/dbus-XyfkU8jA7g |
#netstat -lnp -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2692/hpiod tcp 0 0 0.0.0.0:7 0.0.0.0:* LISTEN 7195/xinetd tcp 0 0 192.168.160.2:79 0.0.0.0:* LISTEN 7195/xinetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2423/portmap tcp 0 0 0.0.0.0:944 0.0.0.0:* LISTEN 2458/rpc.statd tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2965/dnsmasq tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2719/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2760/sendmail: acce tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2697/python udp 0 0 0.0.0.0:938 0.0.0.0:* 2458/rpc.statd udp 0 0 0.0.0.0:941 0.0.0.0:* 2458/rpc.statd udp 0 0 192.168.122.1:53 0.0.0.0:* 2965/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 2965/dnsmasq udp 0 0 0.0.0.0:38879 0.0.0.0:* 2908/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2908/avahi-daemon: udp 0 0 0.0.0.0:111 0.0.0.0:* 2423/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 2719/cupsd |
#netstat -lnp -A inet | grep :79
tcp 0 0 192.168.160.2:79 0.0.0.0:* LISTEN 7195/xinetd |
#iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE tcp -- 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535 MASQUERADE udp -- 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535 MASQUERADE all -- 192.168.122.0/24 !192.168.122.0/24 Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -t nat -A PREROUTING -p tcp --dport 79 -j DNAT --to 192.168.160.2:79
|
#rdesktop 192.168.15.2
Autoselected keyboard map en-us WARNING: Remote desktop does not support colour depth 24; falling back to 16 |
#rdesktop 192.168.15.3
Autoselected keyboard map en-us |
#rdesktop 192.168.151
Autoselected keyboard map en-us |
#rdesktop 192.168.15.1
Autoselected keyboard map en-us ERROR: 192.168.15.1: unable to connect |
#rdesktop 192.168.15.2
Autoselected keyboard map en-us WARNING: Remote desktop does not support colour depth 24; falling back to 16 |
#dig . kz
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> . kz ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64644 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;. IN A ;; AUTHORITY SECTION: . 10800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2011040601 1800 900 604800 86400 ;; Query time: 142 msec ... ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7885 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;kz. IN A ;; AUTHORITY SECTION: kz. 10800 IN SOA ns.nic.kz. hostmaster.nic.kz. 2011040708 14400 7200 2592000 86400 ;; Query time: 65 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:14:07 2011 ;; MSG SIZE rcvd: 74 |
#dig . ns | grep NS | grep '^\.' | wc -l
13 |
#dig kz ns
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> kz ns ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22820 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;kz. IN NS ;; ANSWER SECTION: kz. 86400 IN NS ns.ru.net. kz. 86400 IN NS ns.spb.ru. kz. 86400 IN NS auth00.ns.uu.net. kz. 86400 IN NS ns.nursat.net. kz. 86400 IN NS ns-kz.ripe.net. kz. 86400 IN NS ns.nic.kz. ;; Query time: 67 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:15:30 2011 ;; MSG SIZE rcvd: 163 |
#dig.alb.kz ns
bash: dig.alb.kz: command not found |
#dig alb.kz ns
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> alb.kz ns ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49018 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;alb.kz. IN NS ;; ANSWER SECTION: alb.kz. 7769 IN NS ns.alb.kz. alb.kz. 7769 IN NS cnr1.online.kz. alb.kz. 7769 IN NS cnr2.online.kz. ;; ADDITIONAL SECTION: ns.alb.kz. 180569 IN A 212.19.133.100 ;; Query time: 1 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:17:34 2011 ;; MSG SIZE rcvd: 102 |
#dig kz soa
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> kz soa ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14607 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 0 ;; QUESTION SECTION: ;kz. IN SOA ;; ANSWER SECTION: kz. 86390 IN SOA ns.nic.kz. hostmaster.nic.kz. 2011040708 14400 7200 2592000 86400 ;; AUTHORITY SECTION: kz. 86235 IN NS ns-kz.ripe.net. kz. 86235 IN NS ns.ru.net. kz. 86235 IN NS ns.nic.kz. kz. 86235 IN NS auth00.ns.uu.net. kz. 86235 IN NS ns.spb.ru. kz. 86235 IN NS ns.nursat.net. ;; Query time: 1 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:18:14 2011 ;; MSG SIZE rcvd: 210 |
#dig nur.kz
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> nur.kz ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41619 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;nur.kz. IN A ;; ANSWER SECTION: nur.kz. 3600 IN A 195.210.46.230 ;; AUTHORITY SECTION: nur.kz. 3600 IN NS ns1.tutby.com. nur.kz. 3600 IN NS ns2.tutby.com. ;; ADDITIONAL SECTION: ns1.tutby.com. 3600 IN A 195.137.160.3 ns2.tutby.com. 3600 IN A 86.57.250.3 ;; Query time: 422 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:23:14 2011 ;; MSG SIZE rcvd: 117 |
#dig nur.kz soa
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> nur.kz soa ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53475 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;nur.kz. IN SOA ;; ANSWER SECTION: nur.kz. 3600 IN SOA ns1.tutby.com. hostmaster.tutby.com. 2010111601 900 600 86400 3600 ;; AUTHORITY SECTION: nur.kz. 3427 IN NS ns2.tutby.com. nur.kz. 3427 IN NS ns1.tutby.com. ;; ADDITIONAL SECTION: ns1.tutby.com. 3427 IN A 195.137.160.3 ns2.tutby.com. 3427 IN A 86.57.250.3 ;; Query time: 76 msec ;; SERVER: 192.168.15.253#53(192.168.15.253) ;; WHEN: Thu Apr 7 10:26:06 2011 ;; MSG SIZE rcvd: 148 |
ip_conntrack_max ip_dynaddr ip_local_port_range ip_no_pmtu_disc ip_default_ttl ip_forward ip_nonlocal_bind
1
Время первой команды журнала | 08:15:57 2011- 4- 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 06:23:14 2011- 4- 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.83 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.57 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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