Linux host. allow host. Deny

Source: Internet
Author: User

Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this statement
Http://lnote.blogbus.com/logs/10183525.html

For network services that can be started through the xinetd program, 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.
In this way, all customers from the 218.24.129. * domain are allowed to access the service. This is just an example. In fact, by default, the system can use these network servers.

If we add it to/etc/hosts. Deny, all IP addresses from the 218.24.129. * domain are restricted.
ALL: 218.24.129.

If we add
ALL: 218.24.129.134, which limits 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

 

Not any service program can use TCP_WRAPPERS. For example, use the command LDD/usr/sbin/sshd. If libwrap is in the 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.