2017/03/23

Set permission (hosts.allow / hosts.deny)

It tells how to allow/deny the specific networks to access the services of Debian or Linux.

Modify hosts.allow to add white-list.

[command]
sudo vi /etc/hosts.allow

[modify]
Add the following settings.

# only allow 192.168.56.1 - 254 to access OpenSSH service
sshd: 192.168.56.0/255.255.255.0

---------------------------------------------------------------

Modify hosts.deny to add black-list.

[command]
sudo vi /etc/hosts.deny

[modify]
Add the following settings.

# deny any network to access OpenSSH service
sshd: ALL

No comments:

Post a Comment