/l3/users/eb/2009/linux6/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 |
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 14:49:31 2009 *filter :INPUT ACCEPT [3818:1152062] :FORWARD ACCEPT [2292:800904] :OUTPUT ACCEPT [3601:267046] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 14:49:31 2009 |
#iptables -L -n
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#netstat -nlp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2500/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2767/exim4 tcp6 0 0 :::22 :::* LISTEN 2500/sshd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 6942 2479/syslog-ng /dev/log ... unix 2 [ ACC ] STREAM LISTENING 9818 3229/gam_server @/tmp/fam-user- unix 2 [ ACC ] STREAM LISTENING 9633 3204/dbus-daemon @/tmp/dbus-EC6zISBDvc unix 2 [ ACC ] STREAM LISTENING 8003 2969/X /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 8939 3075/gnome-keyring- /tmp/keyring-rvHTC9/socket unix 2 [ ACC ] STREAM LISTENING 9618 3200/ssh-agent /tmp/ssh-FHfjyZ3088/agent.3088 unix 2 [ ACC ] STREAM LISTENING 9664 3088/x-session-mana /tmp/.ICE-unix/3088 unix 2 [ ACC ] STREAM LISTENING 41723 9233/gconfd-2 /tmp/orbit-user/linc-2411-0-a2ed27f5d697 unix 2 [ ACC ] STREAM LISTENING 41744 9229/firefox-bin /tmp/orbit-user/linc-240d-0-bd3c1d668904 unix 2 [ ACC ] STREAM LISTENING 309516 26488/notification- /tmp/orbit-user/linc-6778-0-6fcbd4f611dd1 unix 2 [ ACC ] STREAM LISTENING 7312 2798/hald @/var/run/hald/dbus-qn33AKyYVr |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2500/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2767/exim4 tcp6 0 0 :::22 :::* LISTEN 2500/sshd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 6942 2479/syslog-ng /dev/log ... unix 2 [ ACC ] STREAM LISTENING 9818 3229/gam_server @/tmp/fam-user- unix 2 [ ACC ] STREAM LISTENING 9633 3204/dbus-daemon @/tmp/dbus-EC6zISBDvc unix 2 [ ACC ] STREAM LISTENING 8003 2969/X /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 8939 3075/gnome-keyring- /tmp/keyring-rvHTC9/socket unix 2 [ ACC ] STREAM LISTENING 9618 3200/ssh-agent /tmp/ssh-FHfjyZ3088/agent.3088 unix 2 [ ACC ] STREAM LISTENING 9664 3088/x-session-mana /tmp/.ICE-unix/3088 unix 2 [ ACC ] STREAM LISTENING 41723 9233/gconfd-2 /tmp/orbit-user/linc-2411-0-a2ed27f5d697 unix 2 [ ACC ] STREAM LISTENING 41744 9229/firefox-bin /tmp/orbit-user/linc-240d-0-bd3c1d668904 unix 2 [ ACC ] STREAM LISTENING 309516 26488/notification- /tmp/orbit-user/linc-6778-0-6fcbd4f611dd1 unix 2 [ ACC ] STREAM LISTENING 7312 2798/hald @/var/run/hald/dbus-qn33AKyYVr |
#iptables -A INPUT -p tcp --syn -j DROP
|
#шзiptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:03:44 2009 *filter :INPUT ACCEPT [6250:1980624] :FORWARD ACCEPT [4507:2025851] :OUTPUT ACCEPT [6009:424397] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP COMMIT # Completed on Tue Jun 2 15:03:44 2009 |
#ping tango.eb.co.ua
PING tango.eb.co.ua (62.80.163.45) 56(84) bytes of data. 64 bytes from alpha.eb.co.ua (62.80.163.45): icmp_seq=1 ttl=56 time=11.1 ms 64 bytes from alpha.eb.co.ua (62.80.163.45): icmp_seq=2 ttl=56 time=13.3 ms ^C --- tango.eb.co.ua ping statistics --- 3 packets transmitted, 2 received, 33% packet loss, time 2003ms rtt min/avg/max/mdev = 11.111/12.235/13.360/1.129 ms |
#усусecho @RELATED
@RELATED |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:16:04 2009 *filter :INPUT ACCEPT [7817:3428998] :FORWARD ACCEPT [5251:2465615] :OUTPUT ACCEPT [7641:580689] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP COMMIT # Completed on Tue Jun 2 15:16:04 2009 |
#iptables -D -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
iptables v1.4.3.2: Invalid rule number `INPUT' Try `iptables -h' or 'iptables --help' for more information. |
#COMMIT
bash: COMMIT: команда не найдена |
#iptables -D INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP
|
#iptables -A INPUT -p tcp RELATED -j ACCEPT
Bad argument `RELATED' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT RELATED -j ACCEPT
Bad argument `RELATED' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp --syn -j DROP
|
#iptables -A INPUT -p tcp -j DROP
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:25:13 2009 *filter :INPUT ACCEPT [9402:4089457] :FORWARD ACCEPT [7350:2816305] :OUTPUT ACCEPT [8983:676045] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 15:25:13 2009 |
#iptablessave > /etc/network/iptables
bash: iptablessave: команда не найдена |
#ssh root@10.0.35.100
ssh: connect to host 10.0.35.100 port 22: Connection timed out |
#vi /etc/network/iptables
--- /tmp/l3-saved-7021.11315.3410 2009-06-02 15:27:51.000000000 +0300 +++ /etc/network/iptables 2009-06-02 15:29:05.000000000 +0300 @@ -3,8 +3,8 @@ :INPUT ACCEPT [9411:4090841] :FORWARD ACCEPT [7940:3203227] :OUTPUT ACCEPT [9016:678795] --A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP --A INPUT -p tcp -m tcp --dport 22 -j ACCEPT --A INPUT -p tcp -j DROP +#-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT +#-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT +#-A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 15:27:40 2009 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:29:20 2009 *filter :INPUT ACCEPT [9414:4091310] :FORWARD ACCEPT [8064:3213723] :OUTPUT ACCEPT [9028:679509] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 15:29:20 2009 |
#iptables-save < /etc/network/iptables
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:29:40 2009 *filter :INPUT ACCEPT [9414:4091310] :FORWARD ACCEPT [8200:3232619] :OUTPUT ACCEPT [9028:679509] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 15:29:40 2009 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:29:44 2009 *filter :INPUT ACCEPT [9414:4091310] :FORWARD ACCEPT [8202:3232995] :OUTPUT ACCEPT [9029:679569] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j DROP COMMIT # Completed on Tue Jun 2 15:29:44 2009 |
#iptables-restore < /etc/network/i
if-down.d/ if-post-down.d/ if-pre-up.d/ if-up.d/ interfaces iptables |
#iptables-restore < /etc/network/iptables
|
#net
netcat netselect netselect-apt netstat |
#netstat -lpn
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 27942/inetd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2500/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2767/exim4 tcp6 0 0 :::22 :::* LISTEN 2500/sshd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 6942 2479/syslog-ng /dev/log ... unix 2 [ ACC ] STREAM LISTENING 9818 3229/gam_server @/tmp/fam-user- unix 2 [ ACC ] STREAM LISTENING 9633 3204/dbus-daemon @/tmp/dbus-EC6zISBDvc unix 2 [ ACC ] STREAM LISTENING 8003 2969/X /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 8939 3075/gnome-keyring- /tmp/keyring-rvHTC9/socket unix 2 [ ACC ] STREAM LISTENING 9618 3200/ssh-agent /tmp/ssh-FHfjyZ3088/agent.3088 unix 2 [ ACC ] STREAM LISTENING 9664 3088/x-session-mana /tmp/.ICE-unix/3088 unix 2 [ ACC ] STREAM LISTENING 41723 9233/gconfd-2 /tmp/orbit-user/linc-2411-0-a2ed27f5d697 unix 2 [ ACC ] STREAM LISTENING 41744 9229/firefox-bin /tmp/orbit-user/linc-240d-0-bd3c1d668904 unix 2 [ ACC ] STREAM LISTENING 309516 26488/notification- /tmp/orbit-user/linc-6778-0-6fcbd4f611dd1 unix 2 [ ACC ] STREAM LISTENING 7312 2798/hald @/var/run/hald/dbus-qn33AKyYVr |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:34:49 2009 *filter :INPUT ACCEPT [44:4012] :FORWARD ACCEPT [174:16248] :OUTPUT ACCEPT [88:7654] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT COMMIT # Completed on Tue Jun 2 15:34:49 2009 |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:45:28 2009 *filter :INPUT ACCEPT [254:77096] :FORWARD ACCEPT [222:23344] :OUTPUT ACCEPT [302:43395] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT COMMIT # Completed on Tue Jun 2 15:45:28 2009 |
#iptables -A INPUT -m conntrack -ctstate ESTABLISHED -j ACCEPT
iptables v1.4.3.2: -c packet counter not numeric Try `iptables -h' or 'iptables --help' for more information. |
#iptables -A INPUT -p tcp -m conntrack --ctstate ESTABLISHED -j ACCEPT
|
#ipt
iptables iptables-apply iptables-restore iptables-save iptables-xml iptunnel |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:49:33 2009 *filter :INPUT ACCEPT [804:799926] :FORWARD ACCEPT [999:362793] :OUTPUT ACCEPT [685:79225] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m conntrack --ctstate ESTABLISHED -j ACCEPT COMMIT # Completed on Tue Jun 2 15:49:33 2009 |
#iptables-save > /etc/network/iptables
|
#vi /etc/network/iptables
--- /tmp/l3-saved-7021.26113.23345 2009-06-02 15:50:55.000000000 +0300 +++ /etc/network/iptables 2009-06-02 15:51:37.000000000 +0300 @@ -4,7 +4,9 @@ :FORWARD ACCEPT [1003:363135] :OUTPUT ACCEPT [694:80953] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT --A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP -A INPUT -p tcp -m conntrack --ctstate ESTABLISHED -j ACCEPT +-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP + COMMIT + # Completed on Tue Jun 2 15:50:45 2009 |
#iptables-restore < /etc/network/iptables
|
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 15:52:10 2009 *filter :INPUT ACCEPT [1:182] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [9:1389] -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m conntrack --ctstate ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP COMMIT # Completed on Tue Jun 2 15:52:10 2009 |
#cat /proc/net/ip_
ip_conntrack ip_mr_cache ip_tables_matches ip_tables_targets ip_conntrack_expect ip_mr_vif ip_tables_names |
#cat /proc/net/ip_conntrack
tcp 6 431945 ESTABLISHED src=10.0.35.100 dst=192.168.103.2 sport=22 dport=55618 packets=14 bytes=1400 src=192.168.103.2 dst=10.0.35.100 sport=55618 dport=22 packets=2 bytes=200 [ASSURED] mark=0 secmark=0 use=1 tcp 6 10 TIME_WAIT src=192.168.15.6 dst=193.19.96.8 sport=60940 dport=80 packets=14 bytes=1368 src=193.19.96.8 dst=192.168.15.6 sport=80 dport=60940 packets=13 bytes=7717 [ASSURED] mark=0 secmark=0 use=1 tcp 6 77 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49222 dport=80 packets=5 bytes=781 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49222 packets=4 bytes=362 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49198 dport=80 packets=5 bytes=738 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49198 packets=4 bytes=843 [ASSURED] mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49187 dport=80 packets=5 bytes=748 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49187 packets=4 bytes=362 [ASSURED] mark=0 secmark=0 use=1 udp 17 14 src=192.168.103.2 dst=10.0.35.1 sport=44241 dport=53 packets=1 bytes=60 src=10.0.35.1 dst=192.168.103.2 sport=53 dport=44241 packets=1 bytes=110 mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56162 dport=80 packets=13 bytes=2231 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56162 packets=10 bytes=6864 [ASSURED] mark=0 secmark=0 use=1 tcp 6 85 TIME_WAIT src=192.168.15.6 dst=74.125.87.100 sport=33423 dport=80 packets=12 bytes=4704 src=74.125.87.100 dst=192.168.15.6 sport=80 dport=33423 packets=8 bytes=1736 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56158 dport=80 packets=50 bytes=5809 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56158 packets=51 bytes=66820 [ASSURED] mark=0 secmark=0 use=1 tcp 6 15 TIME_WAIT src=192.168.15.6 dst=88.212.196.66 sport=53867 dport=80 packets=5 bytes=958 src=88.212.196.66 dst=192.168.15.6 sport=80 dport=53867 packets=4 bytes=541 [ASSURED] mark=0 secmark=0 use=1 ... tcp 6 85 TIME_WAIT src=192.168.15.6 dst=193.19.96.8 sport=60921 dport=80 packets=75 bytes=7896 src=193.19.96.8 dst=192.168.15.6 sport=80 dport=60921 packets=70 bytes=74348 [ASSURED] mark=0 secmark=0 use=1 udp 17 115 src=192.168.15.6 dst=10.0.35.1 sport=49823 dport=53 packets=2 bytes=150 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=49823 packets=2 bytes=546 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=193.239.68.41 sport=57016 dport=80 packets=6 bytes=783 src=193.239.68.41 dst=192.168.15.6 sport=80 dport=57016 packets=5 bytes=1278 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=91.198.36.16 sport=47650 dport=80 packets=5 bytes=899 src=91.198.36.16 dst=192.168.15.6 sport=80 dport=47650 packets=5 bytes=1104 [ASSURED] mark=0 secmark=0 use=1 tcp 6 77 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55361 dport=80 packets=5 bytes=754 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55361 packets=4 bytes=917 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=193.19.96.5 sport=34213 dport=80 packets=7 bytes=837 src=193.19.96.5 dst=192.168.15.6 sport=80 dport=34213 packets=7 bytes=5700 [ASSURED] mark=0 secmark=0 use=1 udp 17 113 src=192.168.15.6 dst=10.0.35.1 sport=57666 dport=53 packets=2 bytes=110 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=57666 packets=2 bytes=253 [ASSURED] mark=0 secmark=0 use=1 tcp 6 40 TIME_WAIT src=192.168.15.6 dst=213.156.73.22 sport=44090 dport=80 packets=7 bytes=912 src=213.156.73.22 dst=192.168.15.6 sport=80 dport=44090 packets=6 bytes=1312 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=59465 dport=53 packets=2 bytes=146 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=59465 packets=2 bytes=552 [ASSURED] mark=0 secmark=0 use=1 tcp 6 78 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55353 dport=80 packets=7 bytes=1038 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55353 packets=4 bytes=479 [ASSURED] mark=0 secmark=0 use=1 |
#ssh root@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: Tue Jun 2 16:06:38 2009 from linux13.unix.nt l3-agent is already running: pid=1765; pidfile=/root/.lilalo/l3-agent.pid |
#cat /proc/net/ip_
ip_conntrack ip_mr_cache ip_tables_matches ip_tables_targets ip_conntrack_expect ip_mr_vif ip_tables_names |
#cat /proc/net/ip_conntrack |grep src=192.168.15.6
tcp 6 431893 ESTABLISHED src=192.168.15.7 dst=192.168.15.6 sport=42669 dport=22 packets=97 bytes=7252 src=192.168.15.6 dst=192.168.15.7 sport=22 dport=42669 packets=52 bytes=6960 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431987 ESTABLISHED src=192.168.15.6 dst=10.0.35.100 sport=54367 dport=22 packets=358 bytes=21043 src=10.0.35.100 dst=192.168.15.6 sport=22 dport=54367 packets=347 bytes=60495 [ASSURED] mark=0 secmark=0 use=1 udp 17 11 src=192.168.15.6 dst=10.0.35.1 sport=37203 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=37203 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 101 TIME_WAIT src=192.168.15.6 dst=194.150.93.78 sport=38617 dport=18030 packets=5 bytes=973 src=194.150.93.78 dst=192.168.15.6 sport=18030 dport=38617 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431975 ESTABLISHED src=192.168.15.6 dst=212.109.52.54 sport=55343 dport=5222 packets=63 bytes=9128 src=212.109.52.54 dst=192.168.15.6 sport=5222 dport=55343 packets=42 bytes=15740 [ASSURED] mark=0 secmark=0 use=1 |
#echo iptable -t nat A POSTROUTING -Ñs 192.168.103.0/24 o eth0 -j MASQUERADE
iptable -t nat A POSTROUTING -s 192.168.103.0/24 -o eth0 -j MASQUERADE |
#iptables -t nat -A POSTROUTING -s 192.168.103.0/24 -o eth0 -j MASQUERADE
|
#ssh root@192.168.15.1
root@192.168.15.1's password: Linux linux1 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jun 2 16:30:55 2009 from linux6.unix.nt l3-agent is already running: pid=4334; pidfile=/root/.lilalo/l3-agent.pid |
#who
user tty7 2009-06-02 09:29 (:0) user pts/0 2009-06-02 09:29 (:0.0) user pts/3 2009-06-02 09:29 (:0.0) root pts/6 2009-06-02 16:30 (linux6.unix.nt) root pts/8 2009-06-02 16:33 (linux6.unix.nt) |
#exit
exit Connection to 192.168.15.1 closed. |
#tcpdump -i eth0 -n host 192.168.103.1 and port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#apt-get install ap
Display all 128 possibilities? (y or n) |
#apt-get install apache2
apache2 apache2-dbg apache2-mpm-itk apache2-prefork-dev apache2-utils apache2.2 apache2-dev apache2-mpm-perchild apache2-src apache2.2-bin apache2-doc apache2-mpm-prefork apache2-suexec apache2.2-common apache2-mpm apache2-mpm-threadpool apache2-suexec-custom apache2-common apache2-mpm-event apache2-mpm-worker apache2-threaded-dev |
#ssh root@192.168.15.7
root@192.168.15.7's password: Permission denied, please try again. root@192.168.15.7's password: Linux linux7 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jun 2 10:09:02 2009 from 192.168.104.8 l3-agent is already running: pid=3464; pidfile=/root/.lilalo/l3-agent.pid |
#w
16:44:52 up 6:54, 6 users, load average: 0,11, 0,03, 0,01 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty7 :0 09:51 6:54m 3:25 0.11s x-session-manag user pts/0 :0.0 09:51 3:11 0.61s 0.29s script -f -c ba user pts/4 :0.0 16:07 37:16 0.00s 0.00s ssh root@10.0.3 root pts/5 linux6.unix.nt 16:44 0.00s 0.00s 0.00s script -f -c ba user pts/7 :0.0 16:10 14.00s 0.08s 0.08s ssh dak@klekhiv user pts/8 :0.0 14:45 37:37 0.03s 0.03s ssh root@192.16 |
#ipt
iptables iptables-restore iptables-xml iptunnel iptables-apply iptables-save iptraf |
#iptables-save
# Generated by iptables-save v1.4.3.2 on Tue Jun 2 16:45:22 2009 *nat :PREROUTING ACCEPT [116:8795] :POSTROUTING ACCEPT [25:1392] :OUTPUT ACCEPT [25:1392] -A POSTROUTING -s 192.168.104.0/24 -o eth0 -j MASQUERADE COMMIT # Completed on Tue Jun 2 16:45:22 2009 # Generated by iptables-save v1.4.3.2 on Tue Jun 2 16:45:22 2009 *filter :INPUT ACCEPT [42097:15878960] :FORWARD ACCEPT [96501:26585556] :OUTPUT ACCEPT [59393:4559268] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -j REJECT --reject-with tcp-reset COMMIT # Completed on Tue Jun 2 16:45:22 2009 |
#ne
neqn netselect netstat newgrp netcat netselect-apt newaliases newusers |
#nets
netselect netselect-apt netstat |
#netstat
unix 3 [ ] STREAM CONNECTED 60026 unix 3 [ ] STREAM CONNECTED 56147 @/tmp/.ICE-unix/3106 unix 3 [ ] STREAM CONNECTED 56146 unix 3 [ ] STREAM CONNECTED 56145 @/tmp/.X11-unix/X0 unix 3 [ ] STREAM CONNECTED 56144 unix 3 [ ] STREAM CONNECTED 56000 @/tmp/.ICE-unix/3106 unix 3 [ ] STREAM CONNECTED 55999 unix 3 [ ] STREAM CONNECTED 55998 @/tmp/.X11-unix/X0 unix 3 [ ] STREAM CONNECTED 55997 unix 3 [ ] STREAM CONNECTED 50639 @/tmp/.ICE-unix/3106 ... unix 3 [ ] STREAM CONNECTED 7264 @/var/run/hald/dbus-CAY6H274Va unix 3 [ ] STREAM CONNECTED 7263 unix 3 [ ] STREAM CONNECTED 7242 /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 7241 unix 3 [ ] STREAM CONNECTED 7228 /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 7227 unix 3 [ ] STREAM CONNECTED 7179 /dev/log unix 3 [ ] STREAM CONNECTED 7178 unix 3 [ ] STREAM CONNECTED 6908 unix 3 [ ] STREAM CONNECTED 6907 |
#exit
exit Connection to 192.168.15.7 closed. |
#iptables -t nat -A POSTROUTING -s 192.168.103.0/24 -o eth0 -j DNAT --to destination 192.168.103.2
iptables v1.4.3.2: Bad IP address "destination" Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A POSTROUTING -s 192.168.103.0/24 -o eth0 -j DNAT --to destination 192.168.103.1
iptables v1.4.3.2: Bad IP address "destination" Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A PREROUTING -s 192.168.103.0/24 -o eth0 -j DNAT --to 192.168.103.2
iptables v1.4.3.2: Can't use -o with PREROUTING Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A POSTROUTING -s 192.168.103.0/24 -o eth0 -j DNAT --to 192.168.103.2
iptables: Invalid argument. Run `dmesg' for more information. |
#iptables -t nat -A PREROUTING -p tcp dport 80 -j DNAT --to 192.168.103.2
Bad argument `dport' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.103.2
|
#echo OK
OK |
#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.254 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=62 time=0.240 ms 64 bytes from 10.0.35.100: icmp_seq=3 ttl=62 time=0.233 ms ^C --- 10.0.35.100 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2007ms rtt min/avg/max/mdev = 0.233/0.242/0.254/0.015 ms |
#tracert 10.0.35.100
traceroute to 10.0.35.100 (10.0.35.100), 30 hops max, 60 byte packets 1 192.168.15.254 (192.168.15.254) 0.851 ms 1.051 ms 1.464 ms 2 10.0.35.100 (10.0.35.100) 0.612 ms 0.608 ms 0.605 ms |
#ssh root@192.168.15.254
The authenticity of host '192.168.15.254 (192.168.15.254)' can't be established. RSA key fingerprint is 7e:ed:6a:01:cb:0b:a2:37:07:c5:64:c0:e0:23:f1:e4. Are you sure you want to continue connecting (yes/no)? no Host key verification failed. |
#ssh quiz@192.168.15.254
The authenticity of host '192.168.15.254 (192.168.15.254)' can't be established. RSA key fingerprint is 7e:ed:6a:01:cb:0b:a2:37:07:c5:64:c0:e0:23:f1:e4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.254' (RSA) to the list of known hosts. We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events Please register your products now at: www.ProCurve.com quiz@192.168.15.254's password: Permission denied, please try again. quiz@192.168.15.254's password: |
#ssh quiz@10.0.35.100
-----------------------------------------------------------------[40/40]----- Как получить полный список файлов, которые процесс 1234 открывает в ходе своей работы (не только, которые открыты сейчас). 1. strace -p 1234 -o /tmp/1234.strace; grep open /tmp/1234.strace 2. lsof -p 1234 3. strings `which 1234` 4. strings 'which 1234' --------------------------------------------------------------------------- 3 Your score: 16 Connection to 10.0.35.100 closed. |
#stri
strings strip |
#strings
^C |
#strings --help
Usage: strings [option(s)] [file(s)] Display printable strings in [file(s)] (stdin by default) The options are: -a - --all Scan the entire file, not just the data section -f --print-file-name Print the name of the file before each string -n --bytes=[number] Locate & print any NUL-terminated sequence of at -<number> least [number] characters (default 4). -t --radix={o,d,x} Print the location of the string in base 8, 10 or 16 -o An alias for --radix=o -T --target=<BFDNAME> Specify the binary file format -e --encoding={s,S,b,l,B,L} Select character size and endianness: s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit @<file> Read options from <file> -h --help Display this information -v --version Print the program's version number strings: supported targets: elf32-i386 a.out-i386-linux efi-app-ia32 efi-bsdrv-ia32 efi-rtdrv-ia32 elf32-little elf32-big elf64-x86-64 efi-app-x86_64 efi-bsdrv-x86_64 efi-rtdrv-x86_64 elf64-little elf64-big srec symbolsrec tekhex binary ihex trad-core Report bugs to <http://www.sourceware.org/bugzilla/> |
#dpkg -l stri
strigi-applet strigi-daemon strigi-plugins stripclub strigi-client strigi-dbg strigi-utils |
#man stri
|
#man strings
|
#man lsof
|
#su
|
#exit
exit |
#ssh root@10.0.35.100
[root@linux0:~]# [root@linux0:~]# screen -ls 10463.pts-13.linux0 (03.06.2009 10:03:27) (Attached) There is a screen on: 1 Socket in /var/run/screen/S-root. |
#digitemp_DS9097 -i -s /dev/ttyS0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane GNU Public License v2.0 - http://www.digitemp.com Turning off all DS2409 Couplers .. Searching the 1-Wire LAN 101DB9600108001B : DS1820/DS18S20/DS1920 Temperature Sensor 28F728640100001A : DS18B20 Temperature Sensor ROM #0 : 101DB9600108001B ROM #1 : 28F728640100001A Wrote .digitemprc |
#digitemp_DS9097 -a -q -o "%.1C"
23.7 25.0 |
#digitemp_DS9097 -a -q -o "%.1C"
24.5 25.9 |
#whois
bash: whois: команда не найдена |
#apt-get install whois
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: whois обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 21 пакетов не обновлено. Необходимо скачать 56,1kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 332kB. Получено:1 http://10.0.35.1 sid/main whois 4.7.33 [56,1kB] Получено 56,1kБ за 0s (0Б/c) Выбор ранее не выбранного пакета whois. (Чтение базы данных ... на данный момент установлено 56161 файлов и каталогов.) Распаковывается пакет whois (из файла .../archives/whois_4.7.33_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет whois (4.7.33) ... |
#whois 189.17.110.2
% Joint Whois - whois.lacnic.net fgets: Соединение сброшено другой стороной |
#whois 189.17.110.2
% Joint Whois - whois.lacnic.net % This server accepts single ASN, IPv4 or IPv6 queries % Brazilian resource: whois.registro.br % Copyright (c) Nic.br % The use of the data below is only permitted as described in % full by the terms of use (http://registro.br/termo/en.html), % being prohibited its distribution, comercialization or % reproduction, in particular, to use it for advertising or % any similar purpose. % 2009-06-03 03:52:28 (BRT -03:00) ... e-mail: vitor@jknet.com.br created: 20050308 changed: 20061003 % Security and mail abuse issues should also be addressed to % cert.br, http://www.cert.br/, respectivelly to cert@cert.br % and mail-abuse@cert.br % % whois.registro.br accepts only direct match queries. Types % of queries are: domain (.br), ticket, provider, ID, CIDR % block, IP and ASN. |
#whois 212.109.52.50
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % The RIPE Database is subject to Terms and Conditions. % See http://www.ripe.net/db/support/db-terms-conditions.pdf % Note: This output has been filtered. % To receive output for a database update, use the "-B" flag. % Information related to '212.109.52.48 - 212.109.52.55' inetnum: 212.109.52.48 - 212.109.52.55 netname: EXPRESS-BANK-GTUA ... fax-no: +380 44 2764269 e-mail: dato@express.kiev.ua nic-hdl: DG885-RIPE source: RIPE # Filtered % Information related to '212.109.32.0/19AS12530' route: 212.109.32.0/19 descr: SOL Small Delegated Block origin: AS12530 mnt-by: GTUA-RT-MNT source: RIPE # Filtered |
#host intertelecom.ua
intertelecom.ua A 195.128.182.39 |
#whois 195.128.182.39
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % The RIPE Database is subject to Terms and Conditions. % See http://www.ripe.net/db/support/db-terms-conditions.pdf % Note: This output has been filtered. % To receive output for a database update, use the "-B" flag. % Information related to '195.128.182.0 - 195.128.183.255' inetnum: 195.128.182.0 - 195.128.183.255 netname: Intertelecom ... nic-hdl: DK1403-RIPE mnt-by: INTERTELECOM-MNT source: RIPE # Filtered % Information related to '195.128.182.0/23AS31343' route: 195.128.182.0/23 descr: Intertelecom descr: ISP Specific/23 origin: AS31343 mnt-by: INTERTELECOM-MNT source: RIPE # Filtered |
#host.eb.com.ua
bash: host.eb.com.ua: команда не найдена |
#host eb.com.ua
eb.com.ua A 62.149.2.7 |
#host eb.co.ua
eb.co.ua A record currently not present |
#ls -l /etc/ssh/
итого 152 -rw-r--r-- 1 root root 125749 Май 4 23:39 moduli -rw-r--r-- 1 root root 1595 Май 4 23:39 ssh_config -rw-r--r-- 1 root root 1874 Май 24 13:23 sshd_config -rw------- 1 root root 668 Май 24 13:23 ssh_host_dsa_key -rw-r--r-- 1 root root 599 Май 24 13:23 ssh_host_dsa_key.pub -rw------- 1 root root 1675 Май 24 13:23 ssh_host_rsa_key -rw-r--r-- 1 root root 391 Май 24 13:23 ssh_host_rsa_key.pub |
ip_conntrack ip_mr_cache ip_tables_matches ip_tables_targets ip_conntrack_expect ip_mr_vif ip_tables_names
tcp 6 431945 ESTABLISHED src=10.0.35.100 dst=192.168.103.2 sport=22 dport=55618 packets=14 bytes=1400 src=192.168.103.2 dst=10.0.35.100 sport=55618 dport=22 packets=2 bytes=200 [ASSURED] mark=0 secmark=0 use=1 tcp 6 10 TIME_WAIT src=192.168.15.6 dst=193.19.96.8 sport=60940 dport=80 packets=14 bytes=1368 src=193.19.96.8 dst=192.168.15.6 sport=80 dport=60940 packets=13 bytes=7717 [ASSURED] mark=0 secmark=0 use=1 tcp 6 77 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49222 dport=80 packets=5 bytes=781 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49222 packets=4 bytes=362 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49198 dport=80 packets=5 bytes=738 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49198 packets=4 bytes=843 [ASSURED] mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49187 dport=80 packets=5 bytes=748 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49187 packets=4 bytes=362 [ASSURED] mark=0 secmark=0 use=1 udp 17 14 src=192.168.103.2 dst=10.0.35.1 sport=44241 dport=53 packets=1 bytes=60 src=10.0.35.1 dst=192.168.103.2 sport=53 dport=44241 packets=1 bytes=110 mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56162 dport=80 packets=13 bytes=2231 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56162 packets=10 bytes=6864 [ASSURED] mark=0 secmark=0 use=1 tcp 6 85 TIME_WAIT src=192.168.15.6 dst=74.125.87.100 sport=33423 dport=80 packets=12 bytes=4704 src=74.125.87.100 dst=192.168.15.6 sport=80 dport=33423 packets=8 bytes=1736 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56158 dport=80 packets=50 bytes=5809 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56158 packets=51 bytes=66820 [ASSURED] mark=0 secmark=0 use=1 tcp 6 15 TIME_WAIT src=192.168.15.6 dst=88.212.196.66 sport=53867 dport=80 packets=5 bytes=958 src=88.212.196.66 dst=192.168.15.6 sport=80 dport=53867 packets=4 bytes=541 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=34932 dport=53 packets=2 bytes=140 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=34932 packets=2 bytes=287 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=35996 dport=53 packets=2 bytes=124 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=35996 packets=2 bytes=309 [ASSURED] mark=0 secmark=0 use=1 tcp 6 55 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55347 dport=80 packets=8 bytes=866 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55347 packets=4 bytes=917 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56163 dport=80 packets=14 bytes=2942 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56163 packets=10 bytes=5217 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56161 dport=80 packets=12 bytes=1734 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56161 packets=12 bytes=10844 [ASSURED] mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.6 dst=62.80.178.139 sport=46374 dport=80 packets=7 bytes=1129 src=62.80.178.139 dst=192.168.15.6 sport=80 dport=46374 packets=7 bytes=612 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=193.19.96.3 sport=40247 dport=80 packets=7 bytes=760 src=193.19.96.3 dst=192.168.15.6 sport=80 dport=40247 packets=6 bytes=865 [ASSURED] mark=0 secmark=0 use=1 tcp 6 115 TIME_WAIT src=192.168.15.6 dst=74.125.87.156 sport=54640 dport=80 packets=8 bytes=1442 src=74.125.87.156 dst=192.168.15.6 sport=80 dport=54640 packets=7 bytes=3219 [ASSURED] mark=0 secmark=0 use=1 tcp 6 115 TIME_WAIT src=192.168.15.6 dst=74.125.87.167 sport=43991 dport=80 packets=9 bytes=2322 src=74.125.87.167 dst=192.168.15.6 sport=80 dport=43991 packets=7 bytes=4357 [ASSURED] mark=0 secmark=0 use=1 udp 17 6 src=192.168.15.6 dst=10.0.35.1 sport=51164 dport=53 packets=1 bytes=52 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=51164 packets=1 bytes=182 mark=0 secmark=0 use=1 tcp 6 13 TIME_WAIT src=192.168.15.6 dst=193.19.96.3 sport=40244 dport=80 packets=7 bytes=759 src=193.19.96.3 dst=192.168.15.6 sport=80 dport=40244 packets=7 bytes=667 [ASSURED] mark=0 secmark=0 use=1 tcp 6 40 TIME_WAIT src=192.168.15.6 dst=213.156.73.22 sport=44092 dport=80 packets=33 bytes=2333 src=213.156.73.22 dst=192.168.15.6 sport=80 dport=44092 packets=36 bytes=48105 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431980 ESTABLISHED src=192.168.15.6 dst=10.0.35.100 sport=54367 dport=22 packets=53 bytes=5183 src=10.0.35.100 dst=192.168.15.6 sport=22 dport=54367 packets=42 bytes=9435 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56157 dport=80 packets=26 bytes=5091 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56157 packets=22 bytes=20583 [ASSURED] mark=0 secmark=0 use=1 tcp 6 77 TIME_WAIT src=192.168.15.6 dst=81.19.66.32 sport=60785 dport=80 packets=6 bytes=771 src=81.19.66.32 dst=192.168.15.6 sport=80 dport=60785 packets=4 bytes=1124 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=39992 dport=53 packets=2 bytes=128 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=39992 packets=2 bytes=323 [ASSURED] mark=0 secmark=0 use=1 tcp 6 54 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55341 dport=80 packets=7 bytes=993 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55341 packets=4 bytes=479 [ASSURED] mark=0 secmark=0 use=1 udp 17 9 src=192.168.103.2 dst=10.0.35.1 sport=44275 dport=53 packets=1 bytes=60 src=10.0.35.1 dst=192.168.103.2 sport=53 dport=44275 packets=1 bytes=110 mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56156 dport=80 packets=52 bytes=6442 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56156 packets=59 bytes=72477 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56173 dport=80 packets=13 bytes=1875 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56173 packets=12 bytes=10057 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56176 dport=80 packets=6 bytes=921 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56176 packets=5 bytes=1633 [ASSURED] mark=0 secmark=0 use=1 tcp 6 54 TIME_WAIT src=192.168.15.6 dst=81.19.66.32 sport=60773 dport=80 packets=5 bytes=687 src=81.19.66.32 dst=192.168.15.6 sport=80 dport=60773 packets=4 bytes=1124 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56170 dport=80 packets=35 bytes=2993 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56170 packets=37 bytes=43414 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56174 dport=80 packets=6 bytes=921 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56174 packets=5 bytes=1159 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=57859 dport=53 packets=2 bytes=116 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=57859 packets=2 bytes=309 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=59632 dport=53 packets=2 bytes=116 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=59632 packets=2 bytes=309 [ASSURED] mark=0 secmark=0 use=1 tcp 6 96 TIME_WAIT src=192.168.15.6 dst=194.150.93.78 sport=40255 dport=18030 packets=5 bytes=1341 src=194.150.93.78 dst=192.168.15.6 sport=18030 dport=40255 packets=4 bytes=228 [ASSURED] mark=0 secmark=0 use=1 tcp 6 15 TIME_WAIT src=192.168.15.6 dst=81.19.66.35 sport=60682 dport=80 packets=5 bytes=721 src=81.19.66.35 dst=192.168.15.6 sport=80 dport=60682 packets=4 bytes=1124 [ASSURED] mark=0 secmark=0 use=1 tcp 6 15 TIME_WAIT src=192.168.15.6 dst=217.20.163.72 sport=52228 dport=80 packets=5 bytes=949 src=217.20.163.72 dst=192.168.15.6 sport=80 dport=52228 packets=5 bytes=566 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56175 dport=80 packets=6 bytes=911 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56175 packets=5 bytes=1103 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431999 ESTABLISHED src=192.168.15.6 dst=212.109.52.54 sport=55343 dport=5222 packets=31 bytes=4384 src=212.109.52.54 dst=192.168.15.6 sport=5222 dport=55343 packets=21 bytes=7926 [ASSURED] mark=0 secmark=0 use=1 tcp 6 54 TIME_WAIT src=192.168.15.6 dst=81.19.66.97 sport=41067 dport=80 packets=5 bytes=759 src=81.19.66.97 dst=192.168.15.6 sport=80 dport=41067 packets=4 bytes=1618 [ASSURED] mark=0 secmark=0 use=1 tcp 6 100 TIME_WAIT src=192.168.15.6 dst=87.118.88.125 sport=56177 dport=80 packets=6 bytes=922 src=87.118.88.125 dst=192.168.15.6 sport=80 dport=56177 packets=5 bytes=1271 [ASSURED] mark=0 secmark=0 use=1 tcp 6 54 TIME_WAIT src=192.168.15.6 dst=193.239.68.78 sport=49208 dport=80 packets=5 bytes=829 src=193.239.68.78 dst=192.168.15.6 sport=80 dport=49208 packets=4 bytes=362 [ASSURED] mark=0 secmark=0 use=1 tcp 6 85 TIME_WAIT src=192.168.15.6 dst=193.19.96.8 sport=60921 dport=80 packets=75 bytes=7896 src=193.19.96.8 dst=192.168.15.6 sport=80 dport=60921 packets=70 bytes=74348 [ASSURED] mark=0 secmark=0 use=1 udp 17 115 src=192.168.15.6 dst=10.0.35.1 sport=49823 dport=53 packets=2 bytes=150 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=49823 packets=2 bytes=546 [ASSURED] mark=0 secmark=0 use=1 tcp 6 70 TIME_WAIT src=192.168.15.6 dst=193.239.68.41 sport=57016 dport=80 packets=6 bytes=783 src=193.239.68.41 dst=192.168.15.6 sport=80 dport=57016 packets=5 bytes=1278 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=91.198.36.16 sport=47650 dport=80 packets=5 bytes=899 src=91.198.36.16 dst=192.168.15.6 sport=80 dport=47650 packets=5 bytes=1104 [ASSURED] mark=0 secmark=0 use=1 tcp 6 77 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55361 dport=80 packets=5 bytes=754 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55361 packets=4 bytes=917 [ASSURED] mark=0 secmark=0 use=1 tcp 6 14 TIME_WAIT src=192.168.15.6 dst=193.19.96.5 sport=34213 dport=80 packets=7 bytes=837 src=193.19.96.5 dst=192.168.15.6 sport=80 dport=34213 packets=7 bytes=5700 [ASSURED] mark=0 secmark=0 use=1 udp 17 113 src=192.168.15.6 dst=10.0.35.1 sport=57666 dport=53 packets=2 bytes=110 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=57666 packets=2 bytes=253 [ASSURED] mark=0 secmark=0 use=1 tcp 6 40 TIME_WAIT src=192.168.15.6 dst=213.156.73.22 sport=44090 dport=80 packets=7 bytes=912 src=213.156.73.22 dst=192.168.15.6 sport=80 dport=44090 packets=6 bytes=1312 [ASSURED] mark=0 secmark=0 use=1 udp 17 114 src=192.168.15.6 dst=10.0.35.1 sport=59465 dport=53 packets=2 bytes=146 src=10.0.35.1 dst=192.168.15.6 sport=53 dport=59465 packets=2 bytes=552 [ASSURED] mark=0 secmark=0 use=1 tcp 6 78 TIME_WAIT src=192.168.15.6 dst=88.212.196.77 sport=55353 dport=80 packets=7 bytes=1038 src=88.212.196.77 dst=192.168.15.6 sport=80 dport=55353 packets=4 bytes=479 [ASSURED] mark=0 secmark=0 use=1
Время первой команды журнала | 14:49:28 2009- 6- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:58:47 2009- 6- 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 12.87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.74 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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