Tcp-wrapper and telnet knowledge points

Source: Internet
Author: User

Tcp wrapper access control based on tcpd Process
This is a mechanism that is simpler than iptables to set access control.
Perform simple settings in the/etc/hosts. allow and/etc/hosts. deny files.
To implement certain access control policies.
There are two requirements for this access control. First, you must accept the tpc wrapper
Control, followed by the tcp protocol.
View the library files on which the service depends
Ldd 'which command' if it depends on the libwrap library file, the tcp wrapper control can be explained.
String 'which command' as long as the/etc/hosts. allow and/etc/hosts. deny files appear
It indicates that the libwrap library is connected, and tcp wrapper control is also accepted.
Eg: [root @ mail ~] # Ldd 'which vsftpd '| grep libwrap
Libwrap. so.0 =>/lib/libwrap. so.0 (0x00110000)
First, you need to understand the hosts. allow and hosts. deny files. The rules are in these two files.
Define, one is deny, and the other is allow. The system will find matching entries in these two files.
The sequence is as follows: hosts. allow --> hosts. deny. If none of them exist, it is allowed by default.
The two files are in the following format:
Daemon_list: client_list [: options]
Eg: vsftpd: 192.168.1.100 // disable ftp service for 1.100 of hosts
Commonly used daemon_list formats include the following:
If there are multiple processes in vsftpd, sshd, in. tlenetd, they are separated by commas (,).
ALL
Vsftpd@192.168.1.100 // specifies the process for the specified address

The client_list format is as follows:
IP
NETWORK
Eg: 192.168.1.0/255.255.255.0 or 192.168.1.
HOSTNAME
FQDN eg: mail.luowe.com
.A.org
MACRO
ALL
LOCAL host
Hosts that can be parsed by KNOWN
UNKNOWN cannot be parsed
PARANOID can be parsed and cannot be matched.
EXCEPT t
Options
Spawn
Example:
In. telnetd: ALL records t 172.16.100.1: spawn echo "Login attempt ('data') % u from % a attempt to login %, the daemon is % d ">/var/log/telnet. log
 
Little telnet knowledge:
Telnet is a remote Logon Service and a non-independent daemon process. It is managed by the super daemon process.
Install the telnet Service
# Yum install telnet-server
The default settings for telnet in/etc/xinted. d/telnet are as follows:
# Vim/etc/xinted. d/telnet modify the content
Disable = no
# Service xinetd restart
By default, telnet does not allow the root user to log on directly, but uses the common user su.


 
This article is from the "IT dream-qi-sharing" blog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.