Tcp will preferentially read/etc/hosts. alow file, and then read/etc/hosts. in the deny file, allow has a higher priority than deny. for example, when hosts. the allow file contains the sshd: 192.168.0.8 entry, hosts. when the sshd: 192.168.0.8 entry also exists in deny, it takes effect in the allow file, that is...
Tcp preferentially reads the/etc/hosts. alow file and then the/etc/hosts. deny file.
Higher than deny
For example, if the hosts. allow file contains the sshd: 192.168.0.8 entry, hosts. deny also exists.
Sshd: 192.168.0.8 entry, which takes effect in the allow file, that is, the ip address 192.168.0.8.
You can access the local machine through the ssh service.
Check whether a service supports
Check whether a service supports tcp bypass:
Around:
Ldd/usr/sbin/sshd | grep libwrap. so
<= Only loaded
Only libwrap. so is loaded.
Module service support
Module services support tcp bypass
Will bypass
Ldd 'which vsftpd '| grep libwrap
Lsof/usr/lib/libwrap. so * (view the running super daemon). The xinetd service is
Tcp_wrappers is supported, that is, all services managed by xinetd support tcp_wrapers.
/Etc/hosts. allow
Eg1: in. telnetd: 192.168.0.254 192.168.0.253
<= The name of the control service must be
The name of the control service must be/
The service names under usr/sbin are consistent.
The service name under is the same
Eg2: sshd: 192.168.0.
Eg3: sshd: 192.168.0.
Eg4: sshd: 192.168.0.
Destination T 192.168.0.254
Deny: 192.168.0.254
<= Allow a CIDR block
Allow a CIDR block
<= Set
= 254 excluded
Excluded
<= Rejected in this CIDR block
Deny 254 in this CIDR block
This access
Access from this ip address
/Etc/hosts. deny
<= Description and
Statement and
Allow statements are basically the same.
The statement is basically the same.
ALL: ALL
Tracking access information:
<= Reject all
Reject all
Vi/etc/hosts. allow:
In. telnetd: 192.168.0.4: spawn echo 'date' from % c to % s | mail
Root-s warn
Or
In. telnetd: 192.168.0.4: spawn echo 'date' from % c to % s»
/Home/file
This article is from the "linux O & M" blog