EPguy
ssh 특정 IP의 접속만 허용하는 방법 본문
접속 허용할 IP 추가하기
vi /etc/hosts.allow
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "rpcbind" for the
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
#
sshd: 접속 허용할 IP
sshd: 192.168.1.1
sshd: 192.168.1.2
sshd: ALL 추가하여 나머지는 접근 불가하게 만들기
vi /etc/hosts.deny
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd: ALL
'개발 > 기타' 카테고리의 다른 글
[디자인] 앱 UI에 사용할 사진이나 일러스트 같은 이미지 무료로 구하기 (1) | 2024.09.20 |
---|---|
RSA 알고리즘과 AES 알고리즘을 혼합하여 사용하는 이유 (0) | 2024.05.24 |
[html/javascript] chrome 116 이후 disabled Input 클릭 시 버블링이 작동하지 않는 현상에 대하여 (0) | 2023.09.26 |