Для начала надо включить pam_access модуль. Раскомментировать
строку в /etc/pam.d/login и /etc/pam.d/sshd:
account required pam_access.so
Защищаем административный логин:
Изменяем /etc/security/access.conf для запрета
удаленных соединений к административным и к другим аккаунтам:
#
# Disallow non-root logins on tty1
#
- : ALL EXCEPT root : tty1
#
# Allow root login on tty1
+ : root : tty1
#
# Disallow console logins
- : ALL : LOCAL
#
# ...
#
# User "root" should be
denied to get access from all
# other sources
- : root : ALL
Защищаем сетевые соединения:
Задаем группу, которой будет разрешен удаленный доступ
(через ssh).
groupadd -r sshusers
Изменяем
/etc/security/access.conf in order to
allow only sshusers group network
access.
# Allow group 'sshusers' get access
from everythere
+ : (sshusers) : ALL
#
# All other users should be denied
to get access from
# all sources.
- : ALL : ALL
Немає коментарів:
Дописати коментар