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.
- Key Points of Linux cluster technology
- Another Linux server cluster software for LifeKeeper
- Linux server cluster technology
- Step 7: Protect Linux servers
- Introduction to ntop configuration in Linux