/l3/users/bas/2011-03/linux3.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 |
|
#passwd
Changing password for user root. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#netstat -ln -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:785 0.0.0.0:* udp 0 0 0.0.0.0:788 0.0.0.0:* udp 0 0 0.0.0.0:42054 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:631 0.0.0.0:* |
#netstat -ln -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:785 0.0.0.0:* udp 0 0 0.0.0.0:788 0.0.0.0:* udp 0 0 0.0.0.0:42054 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:631 0.0.0.0:* |
#grep ssh /etc/services
ssh 22/tcp # SSH Remote Login Protocol ssh 22/udp # SSH Remote Login Protocol x11-ssh-offset 6010/tcp # SSH X11 forwarding offset sshell 614/tcp # SSLshell sshell 614/udp # SSLshell sdo-ssh 3897/tcp # Simple Distributed Objects over SSH sdo-ssh 3897/udp # Simple Distributed Objects over SSH ssh-mgmt 17235/tcp # SSH Tectia Manager ssh-mgmt 17235/udp # SSH Tectia Manager |
#grep portmap /etc/services
sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP rpc2portmap 369/tcp rpc2portmap 369/udp # Coda portmapper mdc-portmapper 685/tcp # MDC Port Mapper mdc-portmapper 685/udp # MDC Port Mapper bmap 3421/tcp # Bull Apprise portmapper bmap 3421/udp # Bull Apprise portmapper sdp-portmapper 3935/tcp # SDP Port Mapper Protocol sdp-portmapper 3935/udp # SDP Port Mapper Protocol fsportmap 4349/tcp # File System Port Map fsportmap 4349/udp # File System Port Map |
#netstat -lnp -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2533/hpiod tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2270/portmap tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2560/cupsd tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN 2305/rpc.statd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2583/sendmail: acce tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2538/python udp 0 0 0.0.0.0:785 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:788 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:42054 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:111 0.0.0.0:* 2270/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 2560/cupsd |
#netstat -lnp -A inet | grep :631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2560/cupsd udp 0 0 0.0.0.0:631 0.0.0.0:* 2560/cupsd |
#nc 127.0.0.1 631
sfdf |
#nc 127.0.0.1 634
![]() |
#nc 127.0.0.1 25
![]() 220 linux3.unix.bas ESMTP Sendmail 8.13.8/8.13.8; Wed, 6 Apr 2011 10:29:51 +0600 |
#yum install xinetd
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * rpmforge: fr2.rpmfind.net * updates: mirror.neolabs.kz Setting up Install Process Resolving Dependencies --> Running transaction check ... xinetd-2.3.14-10.el5.x86_64.rpm | 125 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : xinetd 1/1 Installed: xinetd.x86_64 2:2.3.14-10.el5 Complete! |
#netstat -lnp -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2533/hpiod tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2270/portmap tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2560/cupsd tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN 2305/rpc.statd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2583/sendmail: acce tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2538/python udp 0 0 0.0.0.0:785 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:788 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:42054 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:111 0.0.0.0:* 2270/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 2560/cupsd |
#ls /etc/xinetd.d/
chargen-dgram daytime-dgram discard-dgram echo-dgram eklogin gssftp krb5-telnet rsync time-dgram chargen-stream daytime-stream discard-stream echo-stream ekrb5-telnet klogin kshell tcpmux-server time-stream |
#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 ... eklogin: off ekrb5-telnet: off gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off time-dgram: off time-stream: off |
#chkconfig echo-stream on
|
#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 ... eklogin: off ekrb5-telnet: off gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off time-dgram: off time-stream: off |
#/etc/init.d/xinetd start
Starting xinetd: [ OK ] |
#grep ^echo /etc/services
echo 7/tcp echo 7/udp echo 4/ddp # AppleTalk Echo Protocol echonet 3610/tcp # ECHONET echonet 3610/udp # ECHONET |
#netstat -lnp | grep :7
tcp 0 0 0.0.0.0:7 0.0.0.0:* LISTEN 3850/xinetd tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN 2305/rpc.statd udp 0 0 0.0.0.0:785 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:788 0.0.0.0:* 2305/rpc.statd |
#nc 127.0.0.01 7
![]() gfd gfd dsfsd gf dsfsd gf df df sdf sdf |
#grep ^finger /etc/services
finger 79/tcp finger 79/udp |
#grep -v ^# /etc/xinetd.d/echo-stream
service echo { disable = no id = echo-stream type = INTERNAL wait = no socket_type = stream } |
#grep -v ^# /etc/xinetd.d/echo-stream | grep -xv '' >/etc/xinetd.d/finger
|
#cat /etc/xinetd.d/finger
service echo { disable = no id = echo-stream type = INTERNAL wait = no socket_type = stream } You have new mail in /var/spool/mail/root |
#vim /etc/xinetd.d/finger
--- /tmp/l3-saved-3570.12966.14063 2011-04-05 10:44:29.000000000 +0600 +++ /etc/sysconfig/network-scripts/ifcfg-eth0:0 2011-04-05 10:45:36.000000000 +0600 @@ -1,8 +1,7 @@ # Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller -DEVICE=eth0 +DEVICE=eth0:0 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.255.0 -IPADDR=192.168.15.3 -GATEWAY=192.168.15.253 +IPADDR=192.168.16.3 TYPE=Ethernet |
#/etc/init.d/xinetd restart
\Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#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 ... ekrb5-telnet: off finger: on gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off time-dgram: off time-stream: off |
#nc 127.0.0.1:79
![]() usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port] [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version] [-x proxy_address[:port]] [hostname] [port[s]] |
#tail /var/lo
![]() local/ lock/ log/ lost+found/ |
#tail /var/log/messages
Apr 6 10:37:29 linux3 yum: Installed: 2:xinetd-2.3.14-10.el5.x86_64 Apr 6 10:52:34 linux3 xinetd[3850]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. Apr 6 10:52:34 linux3 xinetd[3850]: Started working: 1 available service Apr 6 10:54:12 linux3 xinetd[3850]: START: echo-stream pid=3881 from=127.0.0.1 Apr 6 10:54:19 linux3 xinetd[3850]: EXIT: echo-stream status=0 pid=3881 duration=7(sec) Apr 6 11:08:35 linux3 xinetd[3850]: Exiting... Apr 6 11:08:35 linux3 xinetd[5676]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. Apr 6 11:08:35 linux3 xinetd[5676]: Started working: 2 available services Apr 6 11:10:40 linux3 xinetd[5676]: START: finger pid=5706 from=127.0.0.1 Apr 6 11:10:43 linux3 xinetd[5676]: EXIT: finger status=0 pid=5706 duration=3(sec) |
#vim /etc/xinetd.d/finger
|
#vim /etc/xinetd.d/finger
--- /tmp/l3-saved-3570.8365.10493 2011-04-06 11:40:37.000000000 +0600 +++ /etc/xinetd.d/finger 2011-04-06 11:41:07.000000000 +0600 @@ -3,6 +3,7 @@ disable = no id = finger server = /bin/bash + server_args = -i wait = no socket_type = stream user = root |
#pkill -1 xinetd
|
#ls
![]() bin lib64 proc sys boot lost+found root tmp data7 media rpmforge-release-0.5.2-2.el5.rf.i386.rpm usr dev misc rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm var etc mnt sbin vol1 home net selinux vol1snap lib opt srv |
#bin lib64 proc sys
boot lost+found root tmp data7 media rpmforge-release-0.5.2-2.el5.rf.i386.rpm usr dev misc rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm var etc mnt sbin vol1 home net selinux vol1snap lib opt srv |
#ls -l
total 16 drwx------ 3 Masanja Masanja 4096 Apr 2 16:32 Masanja drwx------ 21 user user 4096 Apr 6 10:02 user |
#cd /
|
#pwd
/ |
#more /etc/xinetd.d/telnet
|
#chk
![]() chkconfig chkfontpath |
#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 --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: on time-dgram: off time-stream: off |
#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: user Password: Last login: Wed Apr 6 10:02:44 on :0 l3-agent is already running: pid=2972; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
![]() exit Connection closed by foreign host. |
#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: on time-dgram: off time-stream: off |
#chkconfig echo-stream off
|
#chkconfig finger 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 ... finger: off gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off telnet: on time-dgram: off time-stream: off |
#chkconfig telnet off
|
#pkill -1 xinetd
|
#vim /etc/xinetd.d/finger
|
#nc 127.0.0.1 79
![]() |
#net
![]() net netplugd netreport netstat |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 192.168.15.253 0.0.0.0 UG 0 0 0 eth0 |
#exit
exit |
#/etc/init.d/xinetd restart
Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#exit
exit |
#chkconfig telnet on
|
#telnet 192.168.15.3
Trying 192.168.15.3... Connected to linux3.unix.bas (192.168.15.3). Escape character is '^]'. CentOS release 5.5 (Final) Kernel 2.6.18-194.el5 on an x86_64 login: ^X \Login incorrect login: d Password: Login incorrect login: user Password: Last login: Wed Apr 6 11:52:44 from localhost.localdomain l3-agent is already running: pid=2972; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
![]() exit Connection closed by foreign host. |
#telnet 192.168.15.4 79
![]() Trying 192.168.15.4... Connected to linux4.unix.bas (192.168.15.4). Escape character is '^]'. Connection closed by foreign host. |
#exit
exit |
#telnet 192.168.15.3
Trying 192.168.15.3... Connected to linux3.unix.bas (192.168.15.3). 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 12:02:17 from linux3 l3-agent is already running: pid=2972; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection closed by foreign host. |
#netstat -lnp -A inet
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2533/hpiod tcp 0 0 0.0.0.0:79 0.0.0.0:* LISTEN 6479/xinetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2270/portmap tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 6479/xinetd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2560/cupsd tcp 0 0 0.0.0.0:791 0.0.0.0:* LISTEN 2305/rpc.statd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2583/sendmail: acce tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2538/python udp 0 0 0.0.0.0:785 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:788 0.0.0.0:* 2305/rpc.statd udp 0 0 0.0.0.0:42054 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2683/avahi-daemon: udp 0 0 0.0.0.0:111 0.0.0.0:* 2270/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 2560/cupsd |
#telnet 172.0.0.1 79
![]() Trying 172.0.0.1... |
#exit
![]() exit Connection closed by foreign host. |
#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 192.168.15.4 79
Trying 192.168.15.4... Connected to linux4.unix.bas (192.168.15.4). Escape character is '^]'. |
|