Do you know Linux hosts. allow and hosts. deny?

Source: Internet
Author: User

Network technology has entered our lives, so many people began to learn computer knowledge, so Linux is becoming more and more mainstream. Do you know about Linux systems? This article describes Linux hosts. allow and hosts. deny restricted access in detail, and plays a role in learning Linux hosts. allow and hosts. deny restricted access.

/Etc/hosts. allow and/etc/hosts. deny

These two files are the configuration files of The tcpd server. The tcpd server can control access to the local service by external IP addresses. The two configuration files are in the following format:

# Service process name: Host list: optional command operation when the rule matches

Server_name: hosts-list [: command]

/Etc/hosts. allow control can access the local IP address,/etc/hosts. deny controls the IP addresses that prohibit access to the local machine. if the configurations of the two files conflict, use/etc/hosts. deny prevails. The following is an example of/etc/hosts. allow:

ALL: 127.0.0.1 # Allow the local machine to access ALL service processes on the local machine

Smbd: 192.168.0.0/255.255.255.0 # Allow IP addresses of the 192.168.0. network segment to access the smbd service

The "ALL" keyword matches ALL cases. The "Deny t" keyword matches ALL cases EXCEPT some items, and the "PARANOID" keyword matches the IP address you want to control and the domain name does not match.

The above is the access restriction knowledge for Linux hosts. allow and hosts. deny.

  1. Key Points of Linux cluster technology
  2. Another Linux server cluster software for LifeKeeper
  3. Linux server cluster technology
  4. Step 7: Protect Linux servers
  5. Introduction to ntop configuration in Linux

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.