Article Title: the Unix system determines who can access it. 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.
In Unix systems, two files can be used to centrally manage client connections. Which of the following files can access the Unix server. That is to say, the Hosts. allow and Hosts. deny files are like the "Watchdog" of the Unix server. They determine which clients can access the Unix server and which ones cannot.
If Unix System Engineers allow some computers to access this server, they can define the computers allowed to access in the Hosts. allow file. Otherwise, if the system engineer does not want a specific computer to access the server, define the computer that denies access to the server in the hosts. deny file. When a system process receives a service request from a client, the Unix system checks Hosts first. allow file to check whether access to the client is allowed. If access is allowed, the request is forwarded to a specific service program. If no record is allowed by the client in the hosts. allow file, the content of the hosts. deny file is checked. If the client IP address or other information appears in this file, the client's request will be rejected. If the request does not appear, the client request will still be forwarded to a specific server application. The workflow of the two files is as follows:
These two files seem simple, but have many functions. It is like the gate of a Unix server, which is directly related to the security of a Unix server. Therefore, System Engineers should pay attention to this file. Specifically, System Engineers should pay attention to the following points when managing this file.
1. Priority of the two files.
In Unix systems, these two files have different statuses. This is the first thing System Engineers need to clarify. The Unix system first checks the content of the Hosts. allow file. If there is a matching record here, the client will immediately forward the request without considering the content in Hosts. deny. If the system engineer has previous experience in Cisco network product management, it is easy to understand this. It works in a similar way as the access control list of a Cisco router. As long as a project that meets the requirements is found in the previous record, subsequent content will be ignored. If there is a client, its IP address is 192.168.0.4. The client information is available in the preceding two files. That is, allow the client to connect to the Unix server in the previous file, but disable the connection in the next file. Which of the conflicting settings is more effective? Because the Unix server first checks the Hosts. allow file, the Unix system allows the user to connect to the server.
The system administrator should not consider this vulnerability as a Unix system vulnerability. In fact, Unix systems are designed in this way. This feature is very effective in practical applications. For example, a financial management software server allows only four employees of the financial department and the system administrator to connect. In this case, you can put the information of these five users into hosts. in the allow file, and then in the hosts. enter ALL in the deny file (indicating that ALL computers cannot connect to Unix servers ). Because the hosts. allow file takes precedence, the final Unix system allows only five specific users to connect to the financial management software server, thus improving the security of financial management software. It can be seen that this feature is of great use in actual work.
[1] [2] [3] Next page