Tips / Linux
linux permit deny hosts.allow hosts.deny services
Author: Katrame
Visits: 1580
Date: 06.12.2007
When a user tries to connect to the SSH Secure Shell server, the TCP wrapper daemon (tcpd) reads the /etc/hosts.allow file for a rule that matches the client's hostname or IP. If /etc/hosts.allow does not contain a rule allowing access, tcpd reads /etc/hosts.deny for a rule that would deny access. If neither of the files contains an accept or deny rule, access is granted by default. The syntax for the /etc/hosts.allow and /etc/hosts.deny files is as follows:
To limit ssh acces or other services:
# vi /etc/hosts.allow
add this line
sshd: 10.0.3.0/255.255.255.0 174.34.53.13 : ALLOW
10.0.3.0/255.255.255.0: a network range
174.34.53.13: a single host
Author: Katrame
Visits: 1580
Date: 06.12.2007
To limit ssh acces or other services:
# vi /etc/hosts.allow
add this line
sshd: 10.0.3.0/255.255.255.0 174.34.53.13 : ALLOW
10.0.3.0/255.255.255.0: a network range
174.34.53.13: a single host
Page 1 of 1
Se vuoi discutere con noi su questo articolo o comunque vuoi porci delle domande usa il nostro Forum

