LAMP

보안설정 hosts 및 sshd_config

영은파더♥ 2016. 1. 25. 10:19
728x90

● hosts.deny 와 hosts.allow 설정


/etc/hosts.deny 파일에 아래를 추가

ALL:ALL


/etc/hosts.allow 파일에 접근을 허용할 IP를 추가

ALL:127.0.0.1

ALL:접근허용IP1 접근허용IP2 ...


chmod 640 /etc/hosts.deny

chmod 640 /etc/hosts.allow



● root 계정 ssh 접근 막기


/etc/ssh/sshd_config 파일에서 아래 부분을 찾아서 수정


#PermitRootLogin yes

PermitRootLogin no



728x90
반응형