Linux prohibits an IP access

  
                  

The /etc/hosts.allow and /etc/hosts.deny files control the remote access settings, allowing you to allow or deny a client of an ip or ip segment to access a linux service. \\ If the hostname or IP requesting access is not included in /etc/hosts.allow, the tcpd process checks /etc/hosts.deny. See if the host name or IP requesting access is included in the hosts.deny file. If included, access is denied; if neither is included in /etc/hosts.allow nor included in /etc/hosts.deny, then this access is also allowed.

:[:

daemon list Service process name list, such as telnet service process name in.telnetd client list Access control client list, can write domain name, host name or network segment Such as .trubolinux.com.cn or 192.168.1. option Optional options, here can be some commands, or the specified log file

Example: hosts.allow in.telnetd:.vpser. Net vsftpd: 192.168.0. sshd:192.168.0.0/255.255.255.0

The first line in /etc/hosts.allow vpser.net means that only hosts in the vpser.net domain are allowed to access the TELNET service. , pay attention to the point (.) in front of vpser.net. The second line in /etc/hosts.allow indicates that only users on the network segment 192.168.0 are allowed to access the FTP service, paying attention to the dot (.) after 0. The third line in /etc/hosts.allow indicates that only users on the network segment 192.168.0 are allowed to access the SSH service. Note that this cannot be written as 192.168.0.0/24. Although the two are written in the CISCO router, they are equivalent.

Add in /etc/hosts.deny:

sshd:62.75.214.93 sshd:203.215.252.189 sshd:219.143.200.169 sshd:60.12.193.134 sshd:201.83.220.44 sshd:c953dc2c .virtua.com.br sshd:gera125.server4you.de

Refused all of them to access SSH, Linux GFW is also very strong.

Copyright © Windows knowledge All Rights Reserved