CentOS 리눅스 서버단에서 특정 IP SSH 접속 제한 설정 가능
[설정 방법]
1. 허용 IP 설정 : /etc/hosts.allow 파일내에 접속 허용할 IP 설정
#
# hosts.allow This file contains access rules which are used to
# allow or deny connections to network services that
# either use the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
#
ALL:127.0.0.1:allow
ALL:xxx.xxx.xxx.xxx:allow
2. 차단 IP 설정 : /etc/hosts.deny 파일을 하기와 같이 설정하면 hosts.allow 내에 설정되어 있는 IP를 제외한 나머지 ALL DENY
#
# hosts.deny This file contains access rules which are used to
# deny connections to network services that either use
# the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# The rules in this file can also be set up in
# /etc/hosts.allow with a 'deny' option instead.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
#
ALL:ALL
'OS > Linux' 카테고리의 다른 글
SFTP로 백업파일 가져오는 bash shell scripts (0) | 2022.06.16 |
---|---|
Linux 물리적 메모리 free영역이 있음에도 SWAP 메모리 사용 이유 및 초기화 방법 (0) | 2022.06.16 |
CentOS IP 명령어 TIP (0) | 2022.06.16 |
서버 본딩구성 설정방법 (0) | 2022.06.15 |
레이드정보 확인. (0) | 2022.06.15 |