Modify/etc/hosts. allow and/etc/hosts. deny to allow and restrict access to the linux server.

Source: Internet
Author: User

Modify/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.

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.