/l3/users/12-03-2007/nt-lnet/linux1.net.nt/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 |
|
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.allow
14c14 < ALL: EXEPT LOCAL : deny --- > #ALL: EXEPT LOCAL : deny |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 2+2# 4 ^] telnet> q Connection closed. |
#vim /etc/hosts.allow
13c13,14 < calc: LOCAL --- > calc: linux1.net.nt : allow > ALL : ALL : deny |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#hostname
linux1 |
#vim /etc/hosts.allow
13c13 < calc: linux1.net.nt : allow --- > calc: 127.0.0.1 : allow |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#grep calc /etc/services
various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# calc 22222/tcp #Calc netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.allow
|
#vim /etc/hosts.deny
20c20 < #ALL: ALL --- > ALL: ALL |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.deny
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.deny
20c20 < ALL EXEPT LOCAL: ALL --- > ALL EXEPT 127.0.0.1 : ALL |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.deny
20c20 < ALL EXEPT 127.0.0.1 : ALL --- > ALL EXCEPT 127.0.0.1: ALL |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.deny
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#telnet 127.0.0.1 22222
and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ^] telnet> q Connection closed. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#telnet linux1.net.nt 22222
and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. ^] telnet> q Connection closed. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.deny
19c19,20 < ALL: PARANOID --- > #ALL: PARANOID > ALL : ALL |
#telnet linux1.net.nt 22222
Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.allow
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#telnet linux1.net.nt 22222
Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.allow
|
#tail /var/log/daemon.log
Mar 13 11:17:58 linux1 xinetd[10135]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:18:19 linux1 xinetd[10172]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:10 linux1 xinetd[10237]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:11 linux1 xinetd[10247]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:30 linux1 xinetd[10276]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:43 linux1 xinetd[10305]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:20:11 linux1 xinetd[10340]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:21:06 linux1 xinetd[10415]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:33 linux1 xinetd[10449]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:40 linux1 xinetd[10458]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 |
#vim /etc/hosts.allow
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#telnet 127.0.0.1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#tail /var/log/daemon.log
Mar 13 11:18:19 linux1 xinetd[10172]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:10 linux1 xinetd[10237]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:11 linux1 xinetd[10247]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:30 linux1 xinetd[10276]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:43 linux1 xinetd[10305]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:20:11 linux1 xinetd[10340]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:21:06 linux1 xinetd[10415]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:33 linux1 xinetd[10449]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:40 linux1 xinetd[10458]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:22:45 linux1 xinetd[10529]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 |
#telnet 192.168.16.1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 192.168.16.1... Connected to 192.168.16.1. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#tail /var/log/daemon.log
Mar 13 11:19:10 linux1 xinetd[10237]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:11 linux1 xinetd[10247]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:30 linux1 xinetd[10276]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:19:43 linux1 xinetd[10305]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:20:11 linux1 xinetd[10340]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:21:06 linux1 xinetd[10415]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:33 linux1 xinetd[10449]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:21:40 linux1 xinetd[10458]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:22:45 linux1 xinetd[10529]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:23:03 linux1 xinetd[10550]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 |
#vim /etc/hosts.allow
13c13 < calc: 127.0.0.1 --- > ALL: 127.0.0.1 : allow |
#telnet 192.168.16.1 22222
Trying 192.168.16.1... Connected to 192.168.16.1. Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 22222
[root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 2+2# 4 ^] telnet> q Connection closed. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 2+2# 4 ^] telnet> q Connection closed. |
#telnet 192.168.16.1 22222
Trying 192.168.16.1... Connected to 192.168.16.1. Escape character is '^]'. Connection closed by foreign host. |
#cat /etc/hosts.allow
# and /usr/doc/netbase/portmapper.txt.gz # # Example: ALL: LOCAL @some_netgroup # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu # # If you're going to protect the portmapper use the name "portmap" for the # daemon name. Remember that you can only use the keyword "ALL" and IP # addresses (NOT host or domain names) for the portmapper, as well as for # rpc.mountd (the NFS mount daemon). See portmap(8), rpc.mountd(8) and # /usr/share/doc/portmap/portmapper.txt.gz for further information. ALL: 127.0.0.1 : allow netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#cat /etc/hosts.deny
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system. # See the manual pages hosts_access(5), hosts_options(5) # and /usr/doc/netbase/portmapper.txt.gz # # Example: ALL: some.host.name, .some.domain # ALL EXCEPT in.fingerd: other.host.name, .other.domain # # If you're going to protect the portmapper use the name "portmap" for the # daemon name. Remember that you can only use the keyword "ALL" and IP # addresses (NOT host or domain names) for the portmapper. See portmap(8) # and /usr/doc/portmap/portmapper.txt.gz for further information. # # The PARANOID wildcard matches any host whose name does not match its # address. # You may wish to enable this to ensure any programs that don't # validate looked up hostnames still leave understandable logs. In past # versions of Debian this has been the default. #ALL: PARANOID ALL : ALL |
#vim /etc/hosts.allow
13c13,14 < ALL: 127.0.0.1 : allow --- > #ALL: 127.0.0.1 : allow > calc: 127.0.0.1 : allow |
#telnet 192.168.16.1 22222
Trying 192.168.16.1... Connected to 192.168.16.1. Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/xinetd.conf
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#vim /etc/hosts.allow
|
#man host_access
|
#. /etc/bash_completion
Efforts have been made to have netcat "do the right thing" in all its various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#man host
|
#man hosts_access
|
#vim /etc/hosts.allow
14a15 > calc: LOCAL : allow |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.allow
14,15c14,15 < calc: 127.0.0.1 : allow < calc: LOCAL : allow --- > ALL: 127.0.0.1 : allow > ALL: LOCAL : allow |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ^] telnet> q Connection closed. |
#telnet linux1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.allow
15d14 < ALL: LOCAL : allow |
#man hosts_access
|
#vim /etc/hosts.allow
14c14 < ALL: 127.0.0.1 : allow --- > ALL: @net.nt : allow |
#telnet linux1 22222
Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. |
#telnet linux1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#man hosts_access
|
#vim /etc/hosts.allow
14c14 < ALL: @net.nt : allow --- > ALL: .net.nt : allow |
#telnet linux1 22222
Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. 2+2# 4 ^] telnet> q Connection closed. |
#vim /etc/hosts.allow
14c14 < ALL: .net.nt : allow --- > ALL: .net.nt EXCEPT linux1.net.nt: allow |
#telnet linux1 22222
Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#ping linux1
improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# PING linux1.net.nt (192.168.16.1) 56(84) bytes of data. 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=1 ttl=64 time=0.063 ms 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=2 ttl=64 time=0.051 ms --- linux1.net.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.051/0.057/0.063/0.006 ms netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.allow
14c14 < ALL: .net.nt EXCEPT linux1.net.nt: allow --- > ALL: 127.0.0.1 .net.nt EXCEPT linux1.net.nt: allow |
#telnet 127.0.0.1 22222
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 2+2# 4 ^] telnet> q Connection closed. |
#telnet linux1 22222
minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Trying 192.168.16.1... Connected to linux1.net.nt. Escape character is '^]'. Connection closed by foreign host. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/hosts.allow
|
#apt-get install xinetd
Efforts have been made to have netcat "do the right thing" in all its various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/inetd.conf
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#ls -l /etc/init.d/*inetd*
should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# -rwxr-xr-x 1 root root 222 2007-03-13 11:04 /etc/init.d/inetd -rwxr-xr-x 1 root root 2354 2006-09-10 23:41 /etc/init.d/openbsd-inetd -rwxr-xr-x 1 root root 1481 2006-05-08 19:09 /etc/init.d/xinetd netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vimdiff /etc/init.d/inetd /etc/init.d/openbsd-inetd
[ -x $DAEMON -a -e /etc/inetd.conf ] -------------------------------------- # doesn't need to be run. [ -e /etc/default/openbsd-inetd ] && -------------------------------------- -------------------------------------- . /lib/lsb/init-functions -------------------------------------- checkportmap () { -------------------------------------- if ! grep -v -s "^ *#" /etc/inetd.c return 0 -------------------------------------- fi ... log_action_msg " disable -------------------------------------- elif ! /usr/bin/rpcinfo -u localhos log_action_msg "WARNING: portmapp -------------------------------------- log_action_msg " (Comment log_action_msg " disable -------------------------------------- fi } -------------------------------------- 5,1 66% <nit.d/openbsd-inetd 36,0-1 22% -------------------------------------- |
#vimdiff /etc/init.d/inetd /etc/init.d/openbsd-i
|
#vim /etc/init.d/openbsd-inetd
|
#vim /etc/init.d/inetd
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#/etc/init.d/xinetd restart
whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Stopping internet superserver: xinetd. Starting internet superserver: xinetd. netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#vim /etc/xinetd.conf
|
#ls -lm /etc/xinetd.d/
chargen, daytime, discard, echo, time |
#ls -l
итого 5 -rw-r--r-- 1 root root 798 2006-05-09 14:40 chargen -rw-r--r-- 1 root root 660 2006-05-09 14:40 daytime -rw-r--r-- 1 root root 536 2006-05-09 14:40 discard -rw-r--r-- 1 root root 580 2006-05-09 14:40 echo -rw-r--r-- 1 root root 727 2006-05-09 14:40 time |
#vim /etc/xinetd.d/chargen
30c30 < --- > bc dgram udp wait root /usr/bin/bc |
#pkill -1 xinetd
Efforts have been made to have netcat "do the right thing" in all its various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#tail /var/log/daemon.log
Mar 13 11:24:33 linux1 xinetd[10672]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:24:36 linux1 xinetd[10679]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:26:36 linux1 xinetd[10854]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:27:09 linux1 xinetd[10898]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:29:01 linux1 xinetd[11000]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:29:06 linux1 xinetd[11007]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:30:40 linux1 xinetd[11110]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:30:49 linux1 xinetd[11121]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:31:38 linux1 xinetd[11179]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:34:29 linux1 xinetd[9623]: Exiting... |
#tail /var/log/daemon.log
Mar 13 11:24:33 linux1 xinetd[10672]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:24:36 linux1 xinetd[10679]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:26:36 linux1 xinetd[10854]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:27:09 linux1 xinetd[10898]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:29:01 linux1 xinetd[11000]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:29:06 linux1 xinetd[11007]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:30:40 linux1 xinetd[11110]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:30:49 linux1 xinetd[11121]: libwrap refused connection to calc (libwrap=bc) from 127.0.0.1 Mar 13 11:31:38 linux1 xinetd[11179]: libwrap refused connection to calc (libwrap=bc) from 192.168.16.1 Mar 13 11:34:29 linux1 xinetd[9623]: Exiting... |
#date
various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# Вто Мар 13 11:36:42 EET 2007 netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#/etc/init.d/xinetd start
Starting internet superserver: xinetd. |
#tail /var/log/daemon.log
Mar 13 11:36:49 linux1 xinetd[11635]: removing daytime Mar 13 11:36:49 linux1 xinetd[11635]: removing daytime Mar 13 11:36:49 linux1 xinetd[11635]: removing discard Mar 13 11:36:49 linux1 xinetd[11635]: removing discard Mar 13 11:36:49 linux1 xinetd[11635]: removing echo Mar 13 11:36:49 linux1 xinetd[11635]: removing echo Mar 13 11:36:49 linux1 xinetd[11635]: removing time Mar 13 11:36:49 linux1 xinetd[11635]: removing time Mar 13 11:36:49 linux1 xinetd[11635]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Mar 13 11:36:49 linux1 xinetd[11635]: Started working: 2 available services |
#grep chargen /etc/services
whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# chargen 19/tcp ttytst source chargen 19/udp ttytst source netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#netstat -lnp | grep :19
tcp 0 0 0.0.0.0:19 0.0.0.0:* LISTEN 11635/xinetd |
#teelnet 127.0.0.1 19
various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# bash: teelnet: command not found netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#telnet 127.0.0.1 19
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi #$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl &'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq +,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr ... NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./012345678 OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789 PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789: QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:; RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;< STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<= TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=> ^] telnet> q Connection closed. |
#vim /etc/xinetd.d/chargen
|
#vim /etc/xinetd.conf
|
#telnet linux1 22222
Efforts have been made to have netcat "do the right thing" in all its various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#nmap
Nmap 4.11 ( http://www.insecure.org/nmap/ ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: ... --datadir <dirname>: Specify custom Nmap data file location --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sP 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -P0 -p 80 SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES |
#nmap 10.0.17.2
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-03-13 12:06 EET Interesting ports on 10.0.17.2: Not shown: 1667 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 111/tcp open rpcbind 389/tcp open ldap 427/tcp open svrloc 524/tcp open ncp 636/tcp open ldapssl 5801/tcp open vnc-http-1 5901/tcp open vnc-1 5902/tcp open vnc-2 6002/tcp open X11:2 8080/tcp open http-proxy 8443/tcp open https-alt Nmap finished: 1 IP address (1 host up) scanned in 0.383 seconds |
#X
various modes. If you believe that it is doing the wrong thing under whatever circumstances, please notify me and tell me how you think it should behave. If netcat is not able to do some task you think up, minor tweaks to the code will probably fix that. It provides a basic and easily-modified template for writing other network applications, and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# X X11 Xorg netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
#apt-cache search xvnc
and I certainly encourage people to make custom mods and send in any improvements they make to it. Continued feedback from the Internet [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# linuxvnc - VNC server to monitor a tty tkvnc - Displays a list of (defined) machines to start VNC to xtightvncviewer - virtual network computing client software for X xvnc4viewer - Virtual network computing client software for X xvncviewer - Virtual network computing client software for X xwnc - Mix of Xvnc and XDarwin with improved protocol netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1) |
# and /usr/doc/netbase/portmapper.txt.gz # # Example: ALL: LOCAL @some_netgroup # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu # # If you're going to protect the portmapper use the name "portmap" for the # daemon name. Remember that you can only use the keyword "ALL" and IP # addresses (NOT host or domain names) for the portmapper, as well as for # rpc.mountd (the NFS mount daemon). See portmap(8), rpc.mountd(8) and # /usr/share/doc/portmap/portmapper.txt.gz for further information. ALL: 127.0.0.1 : allow netscsid nroff netstat nslookup network-admin nstat newaliases nsupdate [root@linux1:~]# man nc Переформатирование nc(1), подождите... NC(1) NC(1)
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system. # See the manual pages hosts_access(5), hosts_options(5) # and /usr/doc/netbase/portmapper.txt.gz # # Example: ALL: some.host.name, .some.domain # ALL EXCEPT in.fingerd: other.host.name, .other.domain # # If you're going to protect the portmapper use the name "portmap" for the # daemon name. Remember that you can only use the keyword "ALL" and IP # addresses (NOT host or domain names) for the portmapper. See portmap(8) # and /usr/doc/portmap/portmapper.txt.gz for further information. # # The PARANOID wildcard matches any host whose name does not match its # address. # You may wish to enable this to ensure any programs that don't # validate looked up hostnames still leave understandable logs. In past # versions of Debian this has been the default. #ALL: PARANOID ALL : ALL
Время первой команды журнала | 11:17:10 2007- 3-13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:08:05 2007- 3-13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 62.38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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