/l3/users/bas/2011-03/linux4.unix.bas/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) |
#exit
|
#whoami
root |
#exit
|
$su -
Password: l3-agent is already running: pid=3793; pidfile=/root/.lilalo/l3-agent.pid |
#man bash
|
#netstat -lp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 localhost.localdomain:2208 *:* LISTEN 2656/hpiod tcp 0 0 *:nfs *:* LISTEN - tcp 0 0 *:803 *:* LISTEN 2745/rpc.mountd tcp 0 0 *:cycleserv2 *:* LISTEN 2712/rpc.rquotad tcp 0 0 *:echo *:* LISTEN 6719/xinetd tcp 0 0 *:finger *:* LISTEN 6719/xinetd tcp 0 0 *:xact-backup *:* LISTEN 2425/rpc.statd tcp 0 0 *:sunrpc *:* LISTEN 2390/portmap ... unix 2 [ ACC ] STREAM LISTENING 11774 3422/trashapplet /tmp/orbit-user/linc-d5e-0-67b4e872d2d1a unix 2 [ ACC ] STREAM LISTENING 11799 3401/python /tmp/orbit-user/linc-d49-0-58b84f19d5ca5 unix 2 [ ACC ] STREAM LISTENING 11857 3451/notification-a /tmp/orbit-user/linc-d7b-0-4b1e797a28a81 unix 2 [ ACC ] STREAM LISTENING 11883 3455/mixer_applet2 /tmp/orbit-user/linc-d7f-0-4b1e797a2ada4 unix 2 [ ACC ] STREAM LISTENING 11893 3453/clock-applet /tmp/orbit-user/linc-d7d-0-4b1e797a2b39f unix 2 [ ACC ] STREAM LISTENING 13331 3487/gnome-terminal /tmp/orbit-user/linc-d9f-0-1ce87d9ea2e08 unix 2 [ ACC ] STREAM LISTENING 13763 3589/gnome-screensa /tmp/orbit-user/linc-e04-0-4ce7d0938f1b5 unix 2 [ ACC ] STREAM LISTENING 14227 3591/notification-d /tmp/orbit-user/linc-e07-0-485069ec85df5 unix 2 [ ACC ] STREAM LISTENING 14308 3628/firefox /tmp/orbit-user/linc-e2c-0-7cf65da91e70e unix 2 [ ACC ] STREAM LISTENING 11008 3330/dbus-daemon @/tmp/dbus-IQuv0IGfTy |
#netstat -lp | grep finger
tcp 0 0 *:finger *:* LISTEN 6719/xinetd |
#man pkill
|
#yum -y install telnet-server
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz Setting up Install Process Resolving Dependencies --> Running transaction check ... telnet-server-0.17-39.el5.x86_64.rpm | 36 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : telnet-server 1/1 Installed: telnet-server.x86_64 1:0.17-39.el5 Complete! |
#chkconfig
chkconfig version 1.3.30.2 - Copyright (C) 1997-2000 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities> |
#chkconfig --list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off bluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... finger: on gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off telnet: off time-dgram: off time-stream: off |
#chkconfig telnet on
|
#pkill -q xinetd
pkill: invalid option -- q Usage: pkill [-SIGNAL] [-fvx] [-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST] [-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] [PATTERN] |
#pkill -1 xinetd
|
#nc 127.0.0.1 21
|
#nc 127.0.0.1 23
ÿýÿý ÿý#ÿý'e das |
#man telnet
|
#more /etc/services | grep telnet
telnet 23/tcp telnet 23/udp rtelnet 107/tcp # Remote Telnet rtelnet 107/udp telnets 992/tcp telnets 992/udp skytelnet 1618/tcp # skytelnet skytelnet 1618/udp # skytelnet hp-3000-telnet 2564/tcp # HP 3000 NS/VT block mode telnet tl1-telnet 3083/tcp # TL1-TELNET tl1-telnet 3083/udp # TL1-TELNET telnetcpcd 3696/tcp # Telnet Com Port Control telnetcpcd 3696/udp # Telnet Com Port Control scpi-telnet 5024/tcp # SCPI-TELNET scpi-telnet 5024/udp # SCPI-TELNET ktelnet 6623/tcp # Kerberos V5 Telnet ktelnet 6623/udp # Kerberos V5 Telnet |
#vim /etc/xinetd.d/telnet
|
#~
Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. CentOS release 5.5 (Final) Kernel 2.6.18-194.el5 on an x86_64 login: user Password: Last login: Wed Apr 6 10:01:58 on :0 l3-agent is already running: pid=3320; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
Connection closed by foreign host. |
#telnet 127.0.0.1
Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. CentOS release 5.5 (Final) Kernel 2.6.18-194.el5 on an x86_64 login: ^C Login incorrect login: user Password: Last login: Wed Apr 6 11:50:08 from localhost.localdomain l3-agent is already running: pid=3320; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
Connection closed by foreign host. |
#chkconfig telnet off
|
#chkconfig --list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off bluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... finger: on gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off telnet: off time-dgram: off time-stream: off |
#chkconfig finger off
|
#chkconfig echo-stream off
|
#chkconfig --list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off bluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... finger: off gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off telnet: off time-dgram: off time-stream: off |
#ssh root@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. RSA key fingerprint is 19:4c:6c:24:e0:65:29:18:56:ba:a7:2b:05:df:e8:26. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts. root@127.0.0.1's password: Last login: Wed Apr 6 10:41:05 2011 from linux253.unix.bas l3-agent is already running: pid=3793; pidfile=/root/.lilalo/l3-agent.pid |
#exit
Connection to 127.0.0.1 closed. |
#vim /etc/xinetd.d/finger
|
#chkconfig finger on
|
#pkill -1 xinetd
|
#nc 127.0.0.1 79
|
#exit
exit |
#netstat -lp | grep finger
|
#netstat -lpn
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 2656/hpiod tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:803 0.0.0.0:* LISTEN 2745/rpc.mountd tcp 0 0 0.0.0.0:772 0.0.0.0:* LISTEN 2712/rpc.rquotad tcp 0 0 127.0.0.1:79 0.0.0.0:* LISTEN 6719/xinetd tcp 0 0 0.0.0.0:911 0.0.0.0:* LISTEN 2425/rpc.statd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2390/portmap tcp 0 0 0.0.0.0:52945 0.0.0.0:* LISTEN - ... unix 2 [ ACC ] STREAM LISTENING 11774 3422/trashapplet /tmp/orbit-user/linc-d5e-0-67b4e872d2d1a unix 2 [ ACC ] STREAM LISTENING 11799 3401/python /tmp/orbit-user/linc-d49-0-58b84f19d5ca5 unix 2 [ ACC ] STREAM LISTENING 11857 3451/notification-a /tmp/orbit-user/linc-d7b-0-4b1e797a28a81 unix 2 [ ACC ] STREAM LISTENING 11883 3455/mixer_applet2 /tmp/orbit-user/linc-d7f-0-4b1e797a2ada4 unix 2 [ ACC ] STREAM LISTENING 11893 3453/clock-applet /tmp/orbit-user/linc-d7d-0-4b1e797a2b39f unix 2 [ ACC ] STREAM LISTENING 13331 3487/gnome-terminal /tmp/orbit-user/linc-d9f-0-1ce87d9ea2e08 unix 2 [ ACC ] STREAM LISTENING 13763 3589/gnome-screensa /tmp/orbit-user/linc-e04-0-4ce7d0938f1b5 unix 2 [ ACC ] STREAM LISTENING 14227 3591/notification-d /tmp/orbit-user/linc-e07-0-485069ec85df5 unix 2 [ ACC ] STREAM LISTENING 14308 3628/firefox /tmp/orbit-user/linc-e2c-0-7cf65da91e70e unix 2 [ ACC ] STREAM LISTENING 11008 3330/dbus-daemon @/tmp/dbus-IQuv0IGfTy |
#netstat -lpn | grep finger
|
#netstat -lpn | grep :7
tcp 0 0 0.0.0.0:772 0.0.0.0:* LISTEN 2712/rpc.rquotad tcp 0 0 127.0.0.1:79 0.0.0.0:* LISTEN 6719/xinetd udp 0 0 0.0.0.0:769 0.0.0.0:* 2712/rpc.rquotad |
#netstat -lp | grep finger
tcp 0 0 localhost.localdomai:finger *:* LISTEN 6719/xinetd |
#vim /etc/xinetd.d/finger
|
#nc 192.168.15.4 79
|
#nc 192.168.15.4 79
|
#pkill -1 xinetd
|
#nc 192.168.15.4 79
|
#nc 127.0.0.1 79
|
#^[[A^[[B
|
#exit
exit |
#/etc/init.d/xinetd restart
Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#exit
exit |
#telnet 192.168.15.4
Trying 192.168.15.4... telnet: connect to address 192.168.15.4: Connection refused telnet: Unable to connect to remote host: Connection refused |
#telnet 192.168.15.4 79
Trying 192.168.15.4... Connected to linux4.unix.bas (192.168.15.4). Escape character is '^]'. |
#exit
exit Connection closed by foreign host. |
#telnet 192.168.15.4 78
Trying 192.168.15.4... telnet: connect to address 192.168.15.4: Connection refused telnet: Unable to connect to remote host: Connection refused |
#telnet 192.168.15.3 79
Trying 192.168.15.3... Connected to linux3.unix.bas (192.168.15.3). Escape character is '^]'. Connection closed by foreign host. |
#telnet 192.168.15.3 78
Trying 192.168.15.3... telnet: connect to address 192.168.15.3: Connection refused telnet: Unable to connect to remote host: Connection refused |
#dmesg
Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010 Command line: ro root=LABEL=/ rhgb quiet BIOS-provided physical RAM map: BIOS-e820: 0000000000010000 - 000000000009fc00 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 00000000ddd80000 (usable) BIOS-e820: 00000000ddd80000 - 00000000ddd8e000 (ACPI data) BIOS-e820: 00000000ddd8e000 - 00000000dddd0000 (ACPI NVS) BIOS-e820: 00000000dddd0000 - 00000000dde00000 (reserved) ... Bridge firewalling registered ip_tables: (C) 2000-2006 Netfilter Core Team Netfilter messages via NETLINK v0.30. ip_conntrack version 2.4 (8192 buckets, 65536 max) - 304 bytes per conntrack virbr0: no IPv6 routers present [drm] Initialized drm 1.0.1 20051102 ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 169 [drm] Initialized i915 1.8.0 20060929 on minor 0 mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining set status page addr 0x02220000 |
#cat /proc/cmdline
ro root=LABEL=/ rhgb quiet |
#vim /etc/xinetd.d/finger
|
#/etc/init.d/xinetd restart
Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#telnet 127.0.0.1 79
Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 78
Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host: Connection refused |
#telnet 192.168.15.3 79
Trying 192.168.15.3... Connected to linux3.unix.bas (192.168.15.3). Escape character is '^]'. |
#vim /etc/hosts.allow
|
#exit
Connection closed by foreign host. |
#vim /etc/hosts.deny
|
#/etc/init.d/sshd restart
Stopping sshd: [ OK ] Starting sshd: [ OK ] |
#ssh 192.168.15.4
ssh_exchange_identification: Connection closed by remote host |
#ssh 192.168.15.3
The authenticity of host '192.168.15.3 (192.168.15.3)' can't be established. RSA key fingerprint is f4:5c:ee:e9:ef:b7:bd:94:2a:1a:de:fd:ad:43:a7:f7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.3' (RSA) to the list of known hosts. root@192.168.15.3's password: Last login: Wed Apr 6 10:07:43 2011 from linux253.unix.bas l3-agent is already running: pid=3431; pidfile=/root/.lilalo/l3-agent.pid |
#yum install nmap
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz Setting up Install Process Package 2:nmap-4.11-1.1.x86_64 already installed and latest version Nothing to do |
#exit
Connection to 192.168.15.3 closed. |
#man nmap
|
#nmap 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:26 ALMT Failed to lookup subnet/netmask for device (eth0): eth0: no IPv4 address assigned QUITTING! |
#nmap 192.168.15.2
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:27 ALMT Failed to lookup subnet/netmask for device (eth0): eth0: no IPv4 address assigned QUITTING! |
#nmap
anaconda-ks.cfg .l3rc backups/ .lesshst .bash_history .lilalo/ .bash_logout Mail/ .bash_profile .mc/ .bashrc mdadm/ .config/ .metacity/ cpumem.info .mozilla/ .crontab.swp .nautilus/ .cshrc .recently-used ... .gconf/ .tcshrc .gconfd/ .thumbnails/ .gnome/ .Trash/ .gnome2/ .viminfo .gnome2_private/ .vimrc .gstreamer-0.10/ .xauth90BekF .gtkrc-1.2-gnome2 .xauthl6XiOi .ICEauthority .xauthXGrFub install.log .xsession-errors install.log.syslog |
#nmap 192.168.15.2
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:27 ALMT Failed to lookup subnet/netmask for device (eth0): eth0: no IPv4 address assigned QUITTING! |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21453 errors:0 dropped:0 overruns:0 frame:0 TX packets:20548 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:10035227 (9.5 MiB) TX bytes:1520045 (1.4 MiB) Interrupt:66 Memory:feac0000-feb00000 eth0:0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:0 RX bytes:2000150 (1.9 MiB) TX bytes:2000150 (1.9 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:8316 (8.1 KiB) |
#vim /etc/sysconfig/network-scripts/if
|
#vim /etc/sysconfig/network-scripts/if
|
#vim /etc/sysconfig/network-scripts/ifcfg-eth0
|
#ifdown eth0
|
#ifc
bash: ifc: command not found |
#ifconfig
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:2359 errors:0 dropped:0 overruns:0 frame:0 TX packets:2359 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2035238 (1.9 MiB) TX bytes:2035238 (1.9 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:8316 (8.1 KiB) |
#ifup eth0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:E4:56:60 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21483 errors:0 dropped:0 overruns:0 frame:0 TX packets:20605 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10039861 (9.5 MiB) TX bytes:1529084 (1.4 MiB) Interrupt:74 Memory:feac0000-feb00000 lo Link encap:Local Loopback ... collisions:0 txqueuelen:0 RX bytes:2046946 (1.9 MiB) TX bytes:2046946 (1.9 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:8316 (8.1 KiB) |
#nmap -p 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:30 ALMT Error #487: Your port specifications are illegal. Example of proper form: "-100,200-1024,3000-4000,60000-" QUITTING! |
#nmap -p 1-65000 192.168.15.3
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-04-06 12:31 ALMT Interesting ports on linux3.unix.bas (192.168.15.3): Not shown: 64995 closed ports PORT STATE SERVICE 22/tcp open ssh 23/tcp open telnet 79/tcp open finger 111/tcp open rpcbind 791/tcp open unknown MAC Address: 00:26:18:CA:E8:DC (Unknown) Nmap finished: 1 IP address (1 host up) scanned in 2.385 seconds |
#more /etc/sysconfig/iptables-config
|
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:41:13 2011 *nat :PREROUTING ACCEPT [70:12925] :POSTROUTING ACCEPT [72609:3294672] :OUTPUT ACCEPT [72611:3294857] -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 12:41:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:41:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:02 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72673:3298256] :OUTPUT ACCEPT [72675:3298441] -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 12:45:02 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:02 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:11 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:11 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:11 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:12 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:12 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:12 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:13 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:13 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:13 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:14 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:14 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:14 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:15 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72675:3298368] :OUTPUT ACCEPT [72677:3298553] -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 12:45:15 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:15 2011 |
#iptables -Z
|
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:31 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -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 12:45:31 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:31 2011 |
#iptables-save
# Generated by iptables-save v1.3.5 on Wed Apr 6 12:45:32 2011 *nat :PREROUTING ACCEPT [71:13165] :POSTROUTING ACCEPT [72681:3298704] :OUTPUT ACCEPT [72683:3298889] -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 12:45:32 2011 ... -A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT -A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT -A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT -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 12:45:32 2011 |
ro root=LABEL=/ rhgb quiet
Время первой команды журнала | 07:41:52 2011- 4- 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 08:45:31 2011- 4- 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 19.80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.06 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.59 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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