hosts.allow / deny
특정한 클라이언트에게만 서비스를 허용(allow) 또는 차단(deny)할 수 있다.
특정 ip 허용하기 : allow
# vi /etc/hosts.allow
sshd: 허용할 ip
특정 ip 차단하기: deny
# vi /etc/hosts.deny
sshd: 차단할 ip
sshd: ALL
ALL로 차단하고, allow에서 특정 ip만 허용하면 모든 ip차단/허용된ip만 접속 되게 할 수 있다.
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
sshd: 111.111.111.111
sshd: '아이피주소'를 입력하면 된다. 전체 입력하지 않으면 해당 대역대가 적용되고, 한 개가 아니라 여러개도 쓸 수 있다. ,(콤마)로 구분하거나 여러 줄로 나누어 입력해도 된다.
더보기
ex) 1.
sshd: 111.111.111.111, 222.222.222
sshd: 111.111.111.111
ex) 2.
sshd: 222.222.222.
'Development' 카테고리의 다른 글
구글 차트 Other로 뜰 때 (0) | 2022.12.15 |
---|---|
자바 설치 및 환경 변수 설정 (0) | 2022.12.09 |
[SSH] MobaXterm 프로그램 추천 (0) | 2022.03.21 |
[Linux] 환경변수 확인 (0) | 2022.03.17 |
OpenSSL 업그레이드 (0) | 2022.03.17 |