/l3/users/eb/2009/linux15/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=0b08ab07-b42d-4866-9f69-2b9aa6606b71, volume name "ROOT" (needs journal recovery) (large files) |
#vconfig eth0 108
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Unknown command -:eth0:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. ... * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig add eth0 108
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 108 to IF -:eth0:- |
#vconfig add eth0 208
Added VLAN with VID == 208 to IF -:eth0:- |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:82794 errors:0 dropped:0 overruns:0 frame:0 TX packets:66153 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57436032 (54.7 MiB) TX bytes:7061321 (6.7 MiB) Interrupt:28 Base address:0xa000 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:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:82794 errors:0 dropped:0 overruns:0 frame:0 TX packets:66153 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57436032 (54.7 MiB) TX bytes:7061321 (6.7 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) |
#ifconfig eth0.108 192.168.108.1/24 up
|
#ifconfig eth0.208 192.168.208.2/24 up
|
#netstat -nr
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.208.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.208 192.168.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.108 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#cat /proc/net/i
if_inet6 igmp6 ip6_mr_cache ip_mr_cache ipv6_route igmp ip6_flowlabel ip6_mr_vif ip_mr_vif |
#cat /proc/
Display all 166 possibilities? (y or n) 1/ 20062 3522/ 749/ kmsg 10/ 20063 3524/ 751/ kpagecount 1054/ 2070/ 3526/ 753/ kpageflags 1095/ 209/ 3527/ 761/ loadavg 1096/ 210/ 3528/ 763/ locks 11/ 211/ 3530/ 772/ mdstat 12/ 212/ 3531/ 773/ meminfo 12389/ 213/ 3533/ 8/ misc 12396/ 2351/ 3539/ 9/ modules ... 12615/ 3078/ 3714/ cmdline sched_debug 12616/ 3096/ 3715/ cpuinfo self/ 1267/ 3099/ 3869/ crypto slabinfo 1296/ 3162/ 3871/ devices stat 13/ 3196/ 3992/ diskstats swaps 1371/ 3245/ 4/ dma sys/ 14/ 3253/ 404/ dri/ sysrq-trigger 149/ 3259/ 4151/ driver/ sysvipc/ 15292/ 3265/ 5/ execdomains timer_list 17/ 3278/ 555/ fb timer_stats |
#cat /proc/sys/
crypto/ debug/ dev/ fs/ kernel/ net/ vm/ |
#cat /proc/sys/net/ipv
ipv4/ ipv6/ |
#cat /proc/sys/net/ipv4/
conf/ tcp_fack icmp_echo_ignore_all tcp_fin_timeout icmp_echo_ignore_broadcasts tcp_frto icmp_errors_use_inbound_ifaddr tcp_frto_response icmp_ignore_bogus_error_responses tcp_keepalive_intvl icmp_ratelimit tcp_keepalive_probes icmp_ratemask tcp_keepalive_time igmp_max_memberships tcp_low_latency igmp_max_msf tcp_max_orphans inet_peer_gc_maxtime tcp_max_ssthresh ... inet_peer_threshold tcp_moderate_rcvbuf ip_default_ttl tcp_mtu_probing ip_dynaddr tcp_no_metrics_save ip_forward tcp_orphan_retries ipfrag_high_thresh tcp_reordering ipfrag_low_thresh tcp_retrans_collapse ipfrag_max_dist tcp_retries1 ipfrag_secret_interval tcp_retries2 ipfrag_time tcp_rfc1337 ip_local_port_range tcp_rmem |
#cat /proc/sys/net/ipv4/ip_forward
1 |
#netstat -nr
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.208.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.208 192.168.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.108 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.208.1 0.0.0.0 UG 0 0 0 eth0.208 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ip route
192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 default via 192.168.208.1 dev eth0.208 default via 192.168.15.254 dev eth0 |
#ping 192.168.102.1
PING 192.168.102.1 (192.168.102.1) 56(84) bytes of data. ^C^C --- 192.168.102.1 ping statistics --- 7 packets transmitted, 0 received, 100% packet loss, time 6047ms |
#traceroute 192.168.102.1
traceroute to 192.168.102.1 (192.168.102.1), 30 hops max, 60 byte packets 1 (192.168.15.254) 1.765 ms 2.020 ms 2.373 ms 2 * * * 3 (10.0.35.22) 2.613 ms 2.859 ms 3.104 ms 4 * * * ^C |
#route delete default via 192.168.15.254
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 del default via 192.168.15.254
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 del default
|
#netstat -nr
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.208.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.208 192.168.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.108 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ip route
192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 default via 192.168.15.254 dev eth0 |
#route del default
|
#ip route
192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 |
#ip route
192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 default via 192.168.208.1 dev eth0.208 |
#traceroute 192.168.202.1
traceroute to 192.168.202.1 (192.168.202.1), 30 hops max, 60 byte packets 1 (192.168.202.1) 2.503 ms 2.769 ms 3.024 ms |
#ping 192.168.207.1
PING 192.168.207.1 (192.168.207.1) 56(84) bytes of data. 64 bytes from 192.168.207.1: icmp_seq=1 ttl=64 time=2.04 ms 64 bytes from 192.168.207.1: icmp_seq=2 ttl=64 time=0.584 ms 64 bytes from 192.168.207.1: icmp_seq=3 ttl=64 time=0.592 ms ^C --- 192.168.207.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.584/1.073/2.044/0.686 ms |
#man openvpn
|
#ls -la /etc/openvpn/
итого 12 drwxr-xr-x 2 root root 4096 Июн 3 14:49 . drwxr-xr-x 97 root root 4096 Июн 3 14:49 .. -rwxr-xr-x 1 root root 1352 Май 1 15:25 update-resolv-conf |
#cat /etc/openvpn/update-resolv-conf
#!/bin/bash # # Parses DHCP options from openvpn to update resolv.conf # To use set as 'up' and 'down' script in your openvpn *.conf: # up /etc/openvpn/update-resolv-conf # down /etc/openvpn/update-resolv-conf # # Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk> # and Chris Hanson # Licensed under the GNU GPL. See /usr/share/common-licenses/GPL. ... for NS in $IF_DNS_NAMESERVERS ; do R="${R}nameserver $NS " done echo -n "$R" | /sbin/resolvconf -a "${dev}.inet" ;; down) /sbin/resolvconf -d "${dev}.inet" ;; esac |
#vi /etc/hosts.allow
--- /tmp/l3-saved-12616.25996.24452 2009-06-03 17:48:07.000000000 +0300 +++ /etc/hosts.allow 2009-06-03 17:48:37.000000000 +0300 @@ -11,4 +11,6 @@ # for further information. # ALL: 10.0.35.100 +ALL: 192.168.15.16 +ALL: 192.168.108.* |
#traceroute 10.0.35.100.
^C |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. ^C --- 10.0.35.100 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 2999ms |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. ^C --- 10.0.35.100 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4030ms |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. 64 bytes from 10.0.35.100: icmp_seq=1 ttl=62 time=0.170 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=62 time=0.172 ms ^C --- 10.0.35.100 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.170/0.171/0.172/0.001 ms |
#traceroute 10.0.35.100
traceroute to 10.0.35.100 (10.0.35.100), 30 hops max, 60 byte packets 1 (192.168.208.1) 0.666 ms 1.169 ms 1.437 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * *^C |
#route add -host 10.0.35.100 gw 192.168.15.254
|
#ssh 10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Jun 3 18:05:11 2009 from linux1.unix.nt l3-agent is already running: pid=4804; pidfile=/root/.lilalo/l3-agent.pid |
#ip route
10.0.35.100 via 192.168.15.254 dev eth0 192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 default via 192.168.208.1 dev eth0.208 |
#openvpn --genkey --secret linux_108.key
|
#screen
|
#clear
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:86631 errors:0 dropped:0 overruns:0 frame:0 TX packets:70123 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57908743 (55.2 MiB) TX bytes:7424204 (7.0 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... collisions:0 txqueuelen:0 RX bytes:10823 (10.5 KiB) TX bytes:103975 (101.5 KiB) 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:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) |
#rm /etc/openvpn/linux_108.key
rm: невозможно удалить `/etc/openvpn/linux_108.key': Нет такого файла или каталога |
#rm /root/linux_108.key
rm: невозможно удалить `/root/linux_108.key': Нет такого файла или каталога |
#scp 192.168.207.2 :/etc/openvpn/my.key /etc/openvpn/
cp: невозможно выполнить stat для `192.168.207.2': Нет такого файла или каталога cp: невозможно выполнить stat для `:/etc/openvpn/my.key': Нет такого файла или каталога |
#ping 192.168.207.2
PING 192.168.207.2 (192.168.207.2) 56(84) bytes of data. 64 bytes from 192.168.207.2: icmp_seq=1 ttl=63 time=0.099 ms 64 bytes from 192.168.207.2: icmp_seq=2 ttl=63 time=0.078 ms 64 bytes from 192.168.207.2: icmp_seq=3 ttl=63 time=0.081 ms ^C --- 192.168.207.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1998ms rtt min/avg/max/mdev = 0.078/0.086/0.099/0.009 ms |
#scp 192.168.207.2:/etc/openvpn/my.key /etc/openvpn/
The authenticity of host '192.168.207.2 (192.168.207.2)' can't be established. RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.207.2' (RSA) to the list of known hosts. my.key 100% 636 0.6KB/s 00:00 |
#vi /etc/openvpn/client.conf
--- /dev/null 2009-06-03 09:21:48.502060605 +0300 +++ /etc/openvpn/client.conf 2009-06-03 18:04:43.000000000 +0300 @@ -0,0 +1,5 @@ +port 443 +dev tun +## ifconfig 172.16.1.8 172.16.1.7 +secret my.key + |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:86599 errors:0 dropped:0 overruns:0 frame:0 TX packets:70093 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57905719 (55.2 MiB) TX bytes:7421593 (7.0 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... collisions:0 txqueuelen:0 RX bytes:10689 (10.4 KiB) TX bytes:102432 (100.0 KiB) 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:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) |
#vi /etc/openvpn/client.conf
--- /tmp/l3-saved-12616.32259.20275 2009-06-03 18:05:57.000000000 +0300 +++ /etc/openvpn/client.conf 2009-06-03 18:07:01.000000000 +0300 @@ -2,4 +2,5 @@ dev tun ## ifconfig 172.16.1.8 172.16.1.7 secret my.key +remote 192.168.207.2 |
#ping 192.168.107.1
PING 192.168.107.1 (192.168.107.1) 56(84) bytes of data. From 10.0.35.1 icmp_seq=1 Time to live exceeded From 10.0.35.1 icmp_seq=2 Time to live exceeded ^C --- 192.168.107.1 ping statistics --- 2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1001ms |
#traceroute 192.168.107.1
traceroute to 192.168.107.1 (192.168.107.1), 30 hops max, 60 byte packets 1 192.168.208.1 (192.168.208.1) 1.436 ms 1.689 ms 1.938 ms 2 10.0.35.1 (10.0.35.1) 0.261 ms 0.264 ms 0.276 ms 3 10.0.35.22 (10.0.35.22) 3.258 ms 3.522 ms 3.769 ms 4 10.0.35.1 (10.0.35.1) 0.497 ms 0.502 ms 0.547 ms 5 10.0.35.22 (10.0.35.22) 4.002 ms 4.250 ms 4.504 ms 6 * * * 7 10.0.35.22 (10.0.35.22) 4.516 ms 4.521 ms 4.764 ms 8 * * * 9 10.0.35.22 (10.0.35.22) 1.602 ms 1.869 ms 2.118 ms ... 21 10.0.35.22 (10.0.35.22) 6.119 ms 6.368 ms 4.449 ms 22 * * * 23 10.0.35.22 (10.0.35.22) 4.727 ms 4.182 ms 3.882 ms 24 * * * 25 10.0.35.22 (10.0.35.22) 3.123 ms 3.152 ms 3.150 ms 26 * * * 27 10.0.35.22 (10.0.35.22) 2.105 ms 2.172 ms 2.496 ms 28 * * * 29 10.0.35.22 (10.0.35.22) 1.971 ms 1.829 ms 1.850 ms 30 * 10.0.35.1 (10.0.35.1) 1.449 ms 1.452 ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms |
#openvpn start
Options error: In [CMD-LINE]:1: Error opening configuration file: start Use --help for more information. |
#/etc/init.d/openvpn start
Starting virtual private network daemon: client. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:86972 errors:0 dropped:0 overruns:0 frame:0 TX packets:70479 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57941370 (55.2 MiB) TX bytes:7460662 (7.1 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... collisions:0 txqueuelen:0 RX bytes:18177 (17.7 KiB) TX bytes:121187 (118.3 KiB) 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:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) |
#tail /var/log/daemon.log
Jun 3 18:08:37 linux15 ovpn-client[23187]: /usr/sbin/openvpn-vulnkey -q my.key Jun 3 18:08:37 linux15 ovpn-client[23187]: TUN/TAP device tun0 opened Jun 3 18:08:37 linux15 ovpn-client[23196]: UDPv4 link local (bound): [undef]:443 Jun 3 18:08:37 linux15 ovpn-client[23196]: UDPv4 link remote: 192.168.207.2:443 Jun 3 18:08:37 linux15 monit[3305]: 'cron' failed to start Jun 3 18:08:37 linux15 monit[3305]: 'cron' process is not running Jun 3 18:08:37 linux15 monit[3305]: 'cron' trying to restart Jun 3 18:08:37 linux15 monit[3305]: 'cron' start: /etc/init.d/ssh Jun 3 18:08:47 linux15 ovpn-client[23196]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111) Jun 3 18:08:57 linux15 ovpn-client[23196]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:87039 errors:0 dropped:0 overruns:0 frame:0 TX packets:70553 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57947969 (55.2 MiB) TX bytes:7466700 (7.1 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.8 P-t-P:172.16.1.7 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#ping 172.16.1.7
PING 172.16.1.7 (172.16.1.7) 56(84) bytes of data. ^C --- 172.16.1.7 ping statistics --- 25 packets transmitted, 0 received, 100% packet loss, time 24192ms |
#tail -f /var/log/daemon.log
Jun 3 18:57:58 linux15 ovpn-client[26599]: TCP connection established with 192.168.207.2:443 Jun 3 18:57:58 linux15 ovpn-client[26599]: TCPv4_CLIENT link local: [undef] Jun 3 18:57:58 linux15 ovpn-client[26599]: TCPv4_CLIENT link remote: 192.168.207.2:443 Jun 3 18:58:07 linux15 ovpn-client[26599]: Peer Connection Initiated with 192.168.207.2:443 Jun 3 18:58:08 linux15 ovpn-client[26599]: Initialization Sequence Completed Jun 3 18:58:08 linux15 monit[3305]: 'cron' process is not running Jun 3 18:58:08 linux15 monit[3305]: 'cron' trying to restart Jun 3 18:58:08 linux15 monit[3305]: 'cron' start: /etc/init.d/ssh Jun 3 18:58:08 linux15 monit[3305]: 'cron' failed to start Jun 3 18:58:38 linux15 ovpn-client[26599]: Inactivity timeout (--ping-restart), restarting ... Jun 3 19:03:08 linux15 monit[3305]: 'cron' failed to start Jun 3 19:03:11 linux15 ovpn-client[26768]: Peer Connection Initiated with 192.168.207.2:443 Jun 3 19:03:12 linux15 ovpn-client[26768]: Initialization Sequence Completed Jun 3 19:03:38 linux15 monit[3305]: 'cron' process is not running Jun 3 19:03:38 linux15 monit[3305]: 'cron' trying to restart Jun 3 19:03:38 linux15 monit[3305]: 'cron' start: /etc/init.d/ssh Jun 3 19:03:38 linux15 monit[3305]: 'cron' failed to start Jun 3 19:03:43 linux15 ovpn-client[26768]: Inactivity timeout (--ping-restart), restarting Jun 3 19:03:43 linux15 ovpn-client[26768]: /sbin/ifconfig tun0 0.0.0.0 Jun 3 19:03:43 linux15 ovpn-client[26768]: SIGUSR1[soft,ping-restart] received, process restarting |
#ping 172.16.1.8
PING 172.16.1.8 (172.16.1.8) 56(84) bytes of data. ^C --- 172.16.1.8 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:87202 errors:0 dropped:0 overruns:0 frame:0 TX packets:70818 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:57966504 (55.2 MiB) TX bytes:7496437 (7.1 MiB) Interrupt:28 Base address:0xa000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... RX packets:279 errors:0 dropped:0 overruns:0 frame:0 TX packets:279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39184 (38.2 KiB) TX bytes:39184 (38.2 KiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 POINTOPOINT NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#!vi
2 dev tun ifconfig 172.16.1.8 172.16.1.7 3 proto tcp-client 4 ### ifconfig 172.16.1.8 172.16.1.7 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/openvpn/client.conf" 7L, 101C записано |
#!pi
ping 172.16.1.8 PING 172.16.1.8 (172.16.1.8) 56(84) bytes of data. 64 bytes from 172.16.1.8: icmp_seq=1 ttl=64 time=0.018 ms 64 bytes from 172.16.1.8: icmp_seq=2 ttl=64 time=0.014 ms 64 bytes from 172.16.1.8: icmp_seq=3 ttl=64 time=0.012 ms 64 bytes from 172.16.1.8: icmp_seq=4 ttl=64 time=0.013 ms 64 bytes from 172.16.1.8: icmp_seq=5 ttl=64 time=0.015 ms 64 bytes from 172.16.1.8: icmp_seq=6 ttl=64 time=0.011 ms 64 bytes from 172.16.1.8: icmp_seq=7 ttl=64 time=0.011 ms 64 bytes from 172.16.1.8: icmp_seq=8 ttl=64 time=0.011 ms 64 bytes from 172.16.1.8: icmp_seq=9 ttl=64 time=0.013 ms 64 bytes from 172.16.1.8: icmp_seq=10 ttl=64 time=0.014 ms 64 bytes from 172.16.1.8: icmp_seq=11 ttl=64 time=0.011 ms 64 bytes from 172.16.1.8: icmp_seq=12 ttl=64 time=0.012 ms 64 bytes from 172.16.1.8: icmp_seq=13 ttl=64 time=0.011 ms 64 bytes from 172.16.1.8: icmp_seq=14 ttl=64 time=0.012 ms ^C --- 172.16.1.8 ping statistics --- 14 packets transmitted, 14 received, 0% packet loss, time 12998ms rtt min/avg/max/mdev = 0.011/0.012/0.018/0.004 ms |
#route add -net 192.168.107 gw 172.16.1.7
SIOCADDRT: Недопустимый аргумент |
#route add -net 192.168.107.0 gw 172.16.1.7
SIOCADDRT: Недопустимый аргумент |
#route add -net 192.168.107.0 gw via 172.16.1.7
via: Неизвестный хост |
#route add -net 192.168.107.0 via 172.16.1.7
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 add -net 192.168.107.0/24 gw 172.16.1.7
|
#ping 192.168.107.2
PING 192.168.107.2 (192.168.107.2) 56(84) bytes of data. 64 bytes from 192.168.107.2: icmp_seq=1 ttl=63 time=0.788 ms 64 bytes from 192.168.107.2: icmp_seq=2 ttl=63 time=0.665 ms ^C --- 192.168.107.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.665/0.726/0.788/0.067 ms |
#route add -del 192.168.107.0/24 gw 172.16.1.7
route: invalid option -- 'd' route: invalid option -- 'l' 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 del -net 192.168.107.0/24 gw 172.16.1.7
|
#ip route
10.0.35.100 via 192.168.15.254 dev eth0 192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 default via 192.168.208.1 dev eth0.208 |
#ip route
10.0.35.100 via 192.168.15.254 dev eth0 172.16.1.7 dev tun0 proto kernel scope link src 172.16.1.8 192.168.208.0/24 dev eth0.208 proto kernel scope link src 192.168.208.2 192.168.108.0/24 dev eth0.108 proto kernel scope link src 192.168.108.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.15 192.168.107.0/24 via 172.16.1.7 dev tun0 default via 192.168.208.1 dev eth0.208 |
#!vi
2 dev tun 3 ###route 192.168.107.0 255.255.255.0 redirect-gateway 4 secret my.key remote 192.168.207.2 5 9 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/openvpn/client.conf" 9L, 155C записано |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. 64 bytes from 10.0.35.100: icmp_seq=1 ttl=62 time=0.194 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=62 time=0.251 ms ^C --- 10.0.35.100 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.194/0.222/0.251/0.032 ms |
#!vi
2 dev tun 3 proto tcp-client 4 ifconfig 172.16.1.8 172.16.1.7 5 ping 5te 192.168.107.0 255.255.255.0 ping-restart 30 10 11 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/openvpn/client.conf" 11L, 178C записано |
#!v
2 dev tun 3 proto tcp-client 4 ifconfig 172.16.1.8 172.16.1.7 5 ###r 5 192.168.107.0 255.255.255.0 6 redirect-gateway ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/openvpn/client.conf" 11L, 179C записано |
#!/e
/etc/init.d/openvpn restart Stopping virtual private network daemon: client. Starting virtual private network daemon: client. |
#date
Срд Июн 3 19:09:41 EEST 2009 |
#tail -f /var/log/daemon.log |grep open
Jun 3 19:05:20 linux15 ovpn-client[26768]: /usr/sbin/openvpn-vulnkey -q my.key Jun 3 19:05:20 linux15 ovpn-client[26768]: TUN/TAP device tun0 opened Jun 3 19:06:06 linux15 ovpn-client[26768]: /usr/sbin/openvpn-vulnkey -q my.key Jun 3 19:06:06 linux15 ovpn-client[26768]: TUN/TAP device tun0 opened Jun 3 19:06:52 linux15 ovpn-client[26768]: /usr/sbin/openvpn-vulnkey -q my.key Jun 3 19:06:52 linux15 ovpn-client[26768]: TUN/TAP device tun0 opened ^C |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. ^C --- 10.0.35.1 ping statistics --- 50 packets transmitted, 0 received, 100% packet loss, time 48999ms |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_seq=1 ttl=62 time=0.802 ms 64 bytes from 10.0.35.1: icmp_seq=2 ttl=62 time=0.575 ms 64 bytes from 10.0.35.1: icmp_seq=3 ttl=62 time=0.583 ms ^C --- 10.0.35.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1998ms rtt min/avg/max/mdev = 0.575/0.653/0.802/0.107 ms |
#init 0
|
#vconfig eth0 107
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Unknown command -:eth0:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. ... * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig add eth0 107
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 107 to IF -:eth0:- |
#vconfig add eth0 208
Added VLAN with VID == 208 to IF -:eth0:- |
#vconfig rem 107
ERROR: trying to remove VLAN -:107:- error: No such device |
#vconfig add eth0 108
Added VLAN with VID == 108 to IF -:eth0:- |
#ifconfig eth0.108 192.168.108.1
|
#ifconfig eth0.108 192.168.208.2
|
#ifconfig eth0.208 192.168.208.2
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:307 errors:0 dropped:0 overruns:0 frame:0 TX packets:208 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:25590 (24.9 KiB) TX bytes:26530 (25.9 KiB) Interrupt:28 Base address:0xe000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... 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) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.8 P-t-P:172.16.1.7 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:85 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:6101 (5.9 KiB) |
#ifconfig eth0.108 192.168.108.1
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 inet addr:192.168.15.15 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::222:15ff:fec8:4ed2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:319 errors:0 dropped:0 overruns:0 frame:0 TX packets:217 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:26520 (25.8 KiB) TX bytes:27342 (26.7 KiB) Interrupt:28 Base address:0xe000 eth0.108 Link encap:Ethernet HWaddr 00:22:15:c8:4e:d2 ... 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) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.8 P-t-P:172.16.1.7 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:85 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:6101 (5.9 KiB) |
#!/bin/bash # # Parses DHCP options from openvpn to update resolv.conf # To use set as 'up' and 'down' script in your openvpn *.conf: # up /etc/openvpn/update-resolv-conf # down /etc/openvpn/update-resolv-conf # # Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk> # and Chris Hanson # Licensed under the GNU GPL. See /usr/share/common-licenses/GPL. # # 05/2006 chlauber@bnc.ch # # Example envs set from openvpn: # foreign_option_1='dhcp-option DNS 193.43.27.132' # foreign_option_2='dhcp-option DNS 193.43.27.133' # foreign_option_3='dhcp-option DOMAIN be.bnc.ch' [ -x /sbin/resolvconf ] || exit 0 case $script_type in up) for optionname in ${!foreign_option_*} ; do option="${!optionname}" echo $option part1=$(echo "$option" | cut -d " " -f 1) if [ "$part1" == "dhcp-option" ] ; then part2=$(echo "$option" | cut -d " " -f 2) part3=$(echo "$option" | cut -d " " -f 3) if [ "$part2" == "DNS" ] ; then IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3" fi if [ "$part2" == "DOMAIN" ] ; then IF_DNS_SEARCH="$part3" fi fi done R="" if [ "$IF_DNS_SEARCH" ] ; then R="${R}search $IF_DNS_SEARCH " fi for NS in $IF_DNS_NAMESERVERS ; do R="${R}nameserver $NS " done echo -n "$R" | /sbin/resolvconf -a "${dev}.inet" ;; down) /sbin/resolvconf -d "${dev}.inet" ;; esac
Display all 166 possibilities? (y or n) 1/ 20062 3522/ 749/ kmsg 10/ 20063 3524/ 751/ kpagecount 1054/ 2070/ 3526/ 753/ kpageflags 1095/ 209/ 3527/ 761/ loadavg 1096/ 210/ 3528/ 763/ locks 11/ 211/ 3530/ 772/ mdstat 12/ 212/ 3531/ 773/ meminfo 12389/ 213/ 3533/ 8/ misc 12396/ 2351/ 3539/ 9/ modules 12449/ 2774/ 3541/ acpi/ mounts 12450/ 2784/ 3542/ asound/ mtrr 12502/ 2795/ 3551/ buddyinfo net/ 12510/ 3/ 3712/ bus/ pagetypeinfo 1254/ 3062/ 3713/ cgroups partitions 12615/ 3078/ 3714/ cmdline sched_debug 12616/ 3096/ 3715/ cpuinfo self/ 1267/ 3099/ 3869/ crypto slabinfo 1296/ 3162/ 3871/ devices stat 13/ 3196/ 3992/ diskstats swaps 1371/ 3245/ 4/ dma sys/ 14/ 3253/ 404/ dri/ sysrq-trigger 149/ 3259/ 4151/ driver/ sysvipc/ 15292/ 3265/ 5/ execdomains timer_list 17/ 3278/ 555/ fb timer_stats
if_inet6 igmp6 ip6_mr_cache ip_mr_cache ipv6_route igmp ip6_flowlabel ip6_mr_vif ip_mr_vif
crypto/ debug/ dev/ fs/ kernel/ net/ vm/
ipv4/ ipv6/
conf/ tcp_fack icmp_echo_ignore_all tcp_fin_timeout icmp_echo_ignore_broadcasts tcp_frto icmp_errors_use_inbound_ifaddr tcp_frto_response icmp_ignore_bogus_error_responses tcp_keepalive_intvl icmp_ratelimit tcp_keepalive_probes icmp_ratemask tcp_keepalive_time igmp_max_memberships tcp_low_latency igmp_max_msf tcp_max_orphans inet_peer_gc_maxtime tcp_max_ssthresh inet_peer_gc_mintime tcp_max_syn_backlog inet_peer_maxttl tcp_max_tw_buckets inet_peer_minttl tcp_mem inet_peer_threshold tcp_moderate_rcvbuf ip_default_ttl tcp_mtu_probing ip_dynaddr tcp_no_metrics_save ip_forward tcp_orphan_retries ipfrag_high_thresh tcp_reordering ipfrag_low_thresh tcp_retrans_collapse ipfrag_max_dist tcp_retries1 ipfrag_secret_interval tcp_retries2 ipfrag_time tcp_rfc1337 ip_local_port_range tcp_rmem
1
Время первой команды журнала | 16:34:50 2009- 6- 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:25:18 2009- 6- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 23.76 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.81 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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