iptables 방화벽을 비활성화 한 경우 유용한 방화벽 설정
신뢰할 수 있는 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: 150.183. sshd: 172.16. sshd: 210.117. sshd: 210.125. sshd: 220.66. sshd: 220.92. |
[ 리눅스 최근 사용자/IP 조회 ]를 참고하여, 최근~1000번째 접속 IP를 추려내어 적용하면 안전함. IP 정보는 [ 후이즈 IP 정보 검색 ] 를 통해 확인하고 의심스러운 IP는 제외하면 됨.
# # 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. # sshd: ALL |
# CentOS sudo service sshd restart # Ubuntu sudo service ssh restart |
참고 : 특정 IP만 SSH 접속 허용하기 - 제타위키