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.