1. View Linux kernel information [root @ server8 ~] # Uname-aLinuxserver8.example.com2.6.32-71.el6.i686 #1SMPWedSep101: 26: 34edt2010i686i686i0000gnu/Linux host name kernel version CPU Platform
1. View Linux kernel information
[Root @ server8 ~] # Uname-
Linux server8.example.com 2.6.32-71. el6.i686 #1 SMP Wed Sep 1 01:26:34 EDT 2010 i686 i686 i386 GNU/Linux
Host Name kernel version CPU platform Compilation Time supported CPU architecture Operating System
View the linux kernel version:
[Root @ server8 ~] # Uname-r
2.6.32-71. el6.i686 main version. Minor version. Revised version-Number of compilations. description. Platform Architecture
Related reading:RHEL Server 5.5 telnet installation and configurationHttp://www.linuxidc.com/Linux/2011-09/41984.htm
2. rhel6 telnet-server installation and configuration
Related package Introduction: telnet-server is the main service package of telnet. telnet is the Client Connection Tool used to log on to the server. you can install two packages.
[Root @ server8 ~] # Yum install telnet-server telnet yum Installation
Telnet service configuration: telnet is a service based on xinetd, that is, a Super Service Management Service. Therefore, the corresponding configuration file is in the/etc/xinetd. d/directory.
Service telnet
{
Flags = REUSE
Socket_type = stream uses a TCP connection. If it is UDP, It is dgram.
Wait = no
User = root identity
Server =/usr/sbin/in. telnetd: the process for listening is in. telnetd, and TCP_Wrapper processes it according to the program name.
Log_on_failure + = USERID
Whether to disable = yes. If yes, It is disabled. If no, telnet is enabled.
}
Start telnet:
1. Modify disable = no in the/etc/xined. d/telnet configuration file to start the telnet service.
2. Use the chkconfig telnet on command to enable telnet. The functions are the same as those in the configuration file.
Note: You must restart the xinetd service to start telnet either by modifying the configuration file or by running the chkconfig command, Because telnet is a sub-service managed by xinetd! Service xinetd restart
3. Client connection test
Telnet remote_ip uses the telnet client to connect to the remote server. By default, the root user is not allowed to log on and is rejected by the PAM module in the system.
[Root @ server8 ~] # Netstat-antupl | grep: 23 telnet listens on TCP port 23 by default
Tcp 0 0: 23: * LISTEN 3899/xinetd
[Root @ server8 ~] # Telnet 172.16.1.108
Trying 172.16.1.108...
Connected to 172.16.1.108.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 6.0 (Santiago)
Kernel 2.6.32-71. el6.i686 on an i686
Login: RedHat
Password:
[Redhat @ server8 ~] $ Whoami normal user redhat successfully logged on, Super User root cannot log on
Redhat
4. telnet configuration
1. IP addresses and CIDR blocks restricted for access
Only_from = 172.16.1.0/24 IP address range
2. IP address and network segment for Access Denied
No_access = 172.16.1.1
3. Restrict Access To telnet
Access_times =-
4. Limit the number of logins
Instances = 2
5. Specify the IP address of the listener
Interface = 172.16.1.108
Conclusion: for the configuration of the telnet service, see man 5 xinetd. conf man help document, because it is a service based on xinetd, the default can be from/etc/xinetd. the conf configuration file is inherited!
5. telnet Security Settings-TCP_Wrapper this is a security mechanism that works at the network layer and can filter IP addresses and CIDR blocks, similar to acl-Access Control on the vro firewall.
1. Set the IP addresses or ip cidr blocks allowed for access
[Root @ server8 ~] # Tail-n 1/etc/hosts. allow
In. telnetd: 172.16.1.0/24: allow
2. Set IP addresses or CIDR blocks for Access Denied
[Root @ server8 ~] # Tail-n 1/etc/hosts. deny
In. telnetd: 172.16.1.108: deny
Conclusion: telnet is a service based on xinetd. All services based on xinetd support the TCP_Wrapper mechanism, that is, through/etc/hosts. allow and/etc/hosts. deny files for access control.
The execution sequence is: If/etc/hosts. if the allow file has an entry match, it is allowed. If there is no entry, it will query/etc/hosts. deny file. If it matches, it is rejected. If none matches, all are allowed!
Generally, the allowed IP addresses are set in/etc/hosts. in the allow file, the rejected IP address is set in/etc/hosts. in the deny file, of course, both files can exist at the same time, or you can set only one file, and you can also write denial entries!