Modify/etc/hosts. allow and/etc/hosts. deny to allow and restrict access to the linux server.
Source: Internet
Author: User
Modify etchostsallow and etchostsdeny to allow and restrict access to network services that can be started by xinetd programs on linux servers. for example, ftptelnet, we can modify the configurations of etchostsallow and etchostsdeny, which IP addresses are allowed or rejected, and the master modifies/etc/hosts. allow and/etc/hosts. deny allows linux servers to allow and restrict access to network services that can be started using xinetd programs, such as ftp telnet. we can modify/etc/hosts. allow and/etc/hosts. deny configuration to permit or deny access to IP addresses, hosts, and users. For example, we add all: 218.24.129 to/etc/hosts. allow. This will allow all customers from the 218.24.129. * domain to access it. This is just an example. In fact, by default, the system can use these network servers if we are in/etc/hosts. if deny is added, it is restricted from 218.24.129. * all IP addresses of the domain. All: 218.24.129. if we add all: 218.24.129.134 to/etc/hosts. deny, this restricts the access of all users in 218.24.129.134. When hosts. allow conflicts with host. deny, the hosts. allow settings are optimized. After setting, restart #/etc/rc. d/init. d/xinetd restart #/etc/rc. d/init. d/network restart does not allow any service program to use TCP_wrappers. for example, use the command ldd/usr/sbin/sshd. if libwrap is output, TCP_wrappers can be used, that is, the service can use/etc/hosts. allow and/etc/hosts. deny. it is unavailable if the output does not contain libwrap.
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.