Linux settings allow and disallow access to IP Host.allow and Host.deny

Source: Internet
Author: User

for network services that can be started by xinetd programs, such as FTP telnet, we can modify the configuration of/etc/hosts.allow and/etc/hosts.deny to license or deny which IP, host, user can access.

For example, we are/etc/hosts.allowJoin in
all:218.24.129.
This will allow you to come from218.24.129.*access to all clients of the domain. This is just an example, in fact, the system by default, are able to use these network services

If we are in/etc/hosts.denyrestrictions on the inclusion of218.24.129.*All of the IP for the domain.
all:218.24.129.

If we are in/etc/hosts.denyJoin in
all:218.24.129.134, which limits all218.24.129.134access to all users in the.

When Hosts.allow and Host.deny conflict, the optimization is set with Hosts.allow.

After setting up, to restart
#/etc/rc.d/init.d/xinetd Restart
#/etc/rc.d/init.d/network Restart

Not all service programs can be used tcp_wrappers , such as the use of commands ldd/usr/sbin/sshd , if the output has LibWrap , you can use tcp_wrappers, which means that the service can use/etc/hosts.allow and/etc/hosts.deny, which is not available if the output is not libwrap

Linux settings allow and disallow access to IP Host.allow and Host.deny

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.