1. TCP Wrappers Overview TCP Wrappers "wraps" the TCP service program and listens to the port of the TCP service program on its behalf, adding a security detection process. External connection requests must first pass this layer of security detection and obtain permission before accessing the real service program. As shown in the figure below, TCP Wrappers can also record all attempts to access the protected service, providing administrators with rich security analysis information. 2. Access strategy of TCP Wrappers The TCP Wrappers mechanism protects various network service programs and performs access control on the client addresses that access the services. The two corresponding policy files are /etc/hosts.allow and /etc/hosts.deny, which are used to set the allow and deny policies respectively. 1. Policy configuration format The two policy files have opposite functions, but the format of the configuration records is the same, as follows: The service program lists and client address lists are separated by colons, and multiple items in each list are separated by commas. 1) Service program list
2) Client address list
2. Basic principles of access control Regarding the access policy of the TCP Wrappers mechanism, the following order and principles are followed when applying it: first check the /etc/hosts.allow file. If a matching policy is found, access is allowed. Otherwise, continue to check the /etc/hosts.deny file. If a matching policy is found, access is denied. If no matching policy is found in the above two files, access is allowed. 3. TCP Wrappers Configuration Example When the TCP Wrappers mechanism is actually used, a looser policy may be "allow all, deny some", and a stricter policy may be "allow some, deny all". The former only needs to add the corresponding deny policy in the hosts.deny file; the latter, in addition to adding the allow policy in host.allow, also needs to set the deny policy of "ALL:ALL" in the hosts.deny file. Here is an example: Now you only want to access the sshd service from the host with IP address 192.168.10.1 or the host in the 172.16.16 network segment. Other addresses are rejected. You can do the following: [root@centos01 ~]# vim /etc/hosts.allow sshd:192.168.10.1 172.16.16.* [root@centos01 ~]# vim /etc/hosts.deny sshd:ALL The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Some notes on modifying the innodb_data_file_path parameter of MySQL
>>: Vue realizes web online chat function
Table of contents 1. Unzip 2. Create a data folde...
Introduction When we use the MySQL database, we a...
1. --cpu=<value> 1) Specify how much availa...
1. The first parameter props of the setUp functio...
The specific steps of installing mysql5.7.18 unde...
Error occurs: When exporting the database from My...
I just saw a post titled "Flow Theory and Des...
Table of contents What is Vuex? Five properties o...
Table of contents 1. Project environment: 2: DNS ...
If you want to solve the slow problem once and fo...
Table of contents Project Creation Project Struct...
Table of contents 1. Reverse proxy preparation 1....
This article shares the shell script of mysql5.6....
There are some differences between filter and bac...
This article shares the specific code of jQuery t...