Skip to content

조회 수 8394 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
주의사항: 본 팁 은 선의에 입각하여 제공합니다. 아래의 작업중 발생하는 어떠한 책임도 지지 않습니다.

#개요 :
리눅스 서버는 원격제어를 하는데 SSH 라는 전송프로토콜을 사용합니다. 매우 편리한 방법입니다. 하지만 서버를 공격하는 크래커 역시 SSH로 접속하여 서버에 위혐을 줄 수 있습니다.

# 보안방법:
따 라서, 여러가지 보안 방법중에 한가지 방법은 비록 아이디 와 암호가 맞더라도 SSH 로그인 안되게 하는것입니다.  admin, support,등을 포함하여 일반적으로 많이 사용하는 아이디에 암호를 푸는 프로그램을 이용하여 암호를 알아낼 확률이 매우 높습니다. 따라서, 아예 SSH를 막고 필요시 해당 IP 에만 열어주는 것입니다.

#방법:
1) 서버에 접속하여 /etc/hosts.deny 파일을 열어서 아래처럼 수정합니다. 아래는  ssh 로 접속하는 모든사용자를 거부한다는 의미 입니다.
#
# 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
sshd : ALL

2) 다음 /etc/hosts.allow 파일을 열어서 아래처럼 수정합니다. 아래는 아래에 있는 IP만 ssh 로 접속할 수 있다는 의미 입니다. 2번째는 111.111.111. 인데, 의미는  111.111.111.* 다음에 어떤 번호가 와도 접속이 된다는 뜻 입니다. 예로, DHCP를 이용하며 대체적으로 마지막 IP 주소가 변경됩니다. 이 경우를 위하여 넣어줍니다. 111.111.111.111. 은 예로 든 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 : ALLOW
sshd : 111.111.111.: ALLOW

3) 마지막으로 ssh 데몬 (프로그램)을 재 시작하여 줍니다.
[root@mbkang ~]# service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
[root@mbkang ~]#

#참고 :
위를 hosts.allow에 꼭 본인의 IP를 넣어주세요.. 그렇지 않으면 본인도 접속이 되지 않습니다. 그리고 필요시 이곳에 IP 를 넣어주 임시로 SSH 접속을 허용하시고 작업이 끝나면 삭제하면 됩니다.

  1. SSL 인증서문제

    Date2009.07.19 ByADMINPLAY Views9480
    Read More
  2. SSH(Security SHell) 보안쉘

    Date2009.10.20 ByADMINPLAY Views8407
    Read More
  3. SSH 공격막아내기 방법

    Date2010.03.08 Byl2zeo Views8394
    Read More
  4. SQL 인젝션(injection) 프로그램 15종

    Date2009.05.22 ByADMINPLAY Views12542
    Read More
  5. SQL Injection tools 15종

    Date2009.09.25 ByADMINPLAY Views12287
    Read More
  6. rootkit 검색 프로그램 rkhunter-1.3.4.tar.gz

    Date2009.09.22 ByADMINPLAY Views9449
    Read More
  7. rootkit 검색 프로그램 rkhunter-1.2.9.tar.gz

    Date2009.09.22 ByADMINPLAY Views9196
    Read More
  8. Portsentry 1.1 설치하기

    Date2012.01.16 ByADMINPLAY Views15108
    Read More
  9. php.ini 보안 설정

    Date2010.05.03 ByADMINPLAY Views20387
    Read More
  10. php 수호신 설치

    Date2010.05.03 ByADMINPLAY Views20838
    Read More
  11. PHP 보안의 약방의 감초 open_basedir

    Date2014.01.02 ByADMINPLAY Views7534
    Read More
  12. PHP 보안관련 설정 권고사항

    Date2010.05.19 ByADMINPLAY Views20222
    Read More
  13. pam_abl 을 통한 SSH 무작위 공격 방어

    Date2009.06.04 ByADMINPLAY Views8734
    Read More
  14. ossec 로그 분석 툴 설치

    Date2009.10.20 ByADMINPLAY Views11530
    Read More
  15. mod_security 설치 2.X

    Date2009.06.04 ByADMINPLAY Views9413
    Read More
  16. mod_evasive를 이용한 웹Dos 공격을 막자

    Date2009.05.07 ByADMINPLAY Views9429
    Read More
  17. Modsecurity-apache 2.5.X 설치중 에러 server: /usr/lib/...

    Date2010.09.12 ByADMINPLAY Views21300
    Read More
  18. Modsecurity-apache 2.5.12

    Date2010.09.12 ByADMINPLAY Views18721
    Read More
  19. modsecurity-2.5 configure: *** apr library not found.

    Date2010.09.12 ByADMINPLAY Views21146
    Read More
  20. Modsecurity 무료 웹방화벽 설치

    Date2010.09.12 ByADMINPLAY Views24063
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234