Set network access permissions in linux

Source: Internet
Author: User
Article title: Set network access permissions in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

/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 server_name: hosts-list [: command] when the rule matches

/Etc/hosts. allow controls access to the local IP address, and/etc/hosts. deny controls prohibit access to the local IP address. If the configurations of the two files conflict, use/etc/hosts. deny. 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 the IP address 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. PARANOID matches the IP address you want to control and the domain name does not match (the domain name is disguised.

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.