본문 바로가기
Technical/Network

CISCO 네트워크 보안 취약점 조치 방법(2)

by 알 수 없는 사용자 2021. 9. 6.
분류 점검항목 항목중요도
접근관리 VTY 접근(ACL) 설정
Session Timeout 설정
VTY 접속 시 안전한 프로토콜 사용
불필요한 보조 입.출력 포트 사용 금지
로그온 시 경고 메시지 설정

 

■  VTY 접근(ACL) 설정

 

1) 접근 ACL 설정 방법 1

 

switch# conf t

switch(config)# access-list ( 1~99 ) ( permit or deny ) ( Source Network ) ( WildcardMask )

 

예시 )

관리자 IP 10.10.10.10 만 허용

switch(config)# access-list 2 permit 10.10.10.10   // WildcardMask 미 입력시 0.0.0.0 으로 자동 입력

                                                               // 마지막 줄은 deny any 가 default 로 들어가 있기 때문에 설정에
                                                                   주의 필요.

 

2) 접근 ACL 설정 방법 2

 

switch# conf t

switch(config)#  ip access-list ( extended or standard ) ( ip_access_list_number ro name )

switch(config-ext-nacl)# (sequence_number) ( permit or deny ) ( source address or any or host IP )

 

예시 )

관리자 IP 20.20.20.20 , 20.20.20.21 만 허용

switch(config)#  ip access-list extended admin_IP

switch(config-ext-nacl)# 1 permit host 20.20.20.20

switch(config-ext-nacl)# 2 permit host 20.20.20.21

 

3) 생성한 접근 ACL 적용 방법

 

switch# conf t

switch(config)# line vty 0 4

switch(config-line)# access-class ( 1~199 or access_list_name) ( in or out )

 

예시 1)

관리자 IP 10.10.10.10 만 허용하기로한 acl 적용

switch(config)# access-list 2 permit 10.10.10.10 

switch(config)# line vty 0 4

switch(config-line)# access-class 2 in

 

예시 2)

관리자 IP 20.20.20.20 , 20.20.20.21 만 허용하기로한 acl 적용

switch(config)#  ip access-list extended admin_IP

switch(config-ext-nacl)# 1 permit host 20.20.20.20

switch(config-ext-nacl)# 2 permit host 20.20.20.21

switch(config-ext-nacl)# exit

switch(config)# line vty 0 4

switch(config-line)# access-class admin_IP in

 

■  Session Timeout 설정

 

1) 콘솔 session timeout 설정

 

switch# conf t

switch(config)# line cone 0

switch(config-line)# exec-timeout 5 0     // 5분 0초 동안 무응답시간이 흐르면 세션 종료

 

2) VTY session timeout 설정

 

switch# conf t

switch(config)# line VTY 0 4

switch(config-line)# exec-timeout 5 0  // 5분 0초 동안 무응답시간이 흐르면 세션 종료

 

 

■  VTY 접속 시 안전한 프로토콜 사용

 

1) ssh 접속 설정 전 준비 과정

( 보다 자세한 설명은 해당 링크를 참고하시기 바랍니다. https://blog.innern.net/55 )

 

switch# conf t

switch(config)# hostname (호스트명)

switch(config)# ip domain-name (도메인명)

switch(config)# username (아이디) password (패스워드)

switch(config)# crypto key generate rsa

!

How many bit in the modulus [512] :   1024   <- 1024를 입력할것

!

 

2) SSH 접속 설정 방법

 

switch# conf t

switch(config)# line VTY 0 4

switch(config-line)# login local               // 패스워드가 아닌 장비에 설정한 계정을 물어보는 명령어

switch(config-line)# transport input ssh    // 원격 접속 시 ssh를 이용한 접근만 허용

 

■불필요한 보조 입.출력 포트 사용 금지

 

1) AUX 포트 접속 차단

 

Router# conf t

Router(config)# line aux 0                           

Router(config-line)# no password                 // 어떤 사용자도 접속 금지

Router(config-line)# transport input none      // 어떤 외부접속도 받지 않음

Router(config-line)# no exec                       // 어떤 명령도 실행 안됨

Router(config-line)# exec-timeout 0 1           // 0분 1초 지나면 타임아웃

 

2) 미사용 인터페이스 차단

( ※ gi 1/0/1 이 미사용 포트인 경우 )

 

switch(config)# int gi 1/0/1     

switch(config-if)# shutdown

 

■로그온 시 경고 메시지 설정

 

1) 설정 시 주의사항

 

- 비인가 접속자에 대한 경고 메시지이기 때문에 경고 메시지 중 welcome, 환영합니다. 어서오세요 등의 환영 문구는 들어가 있으면 안됨. 

- 허가된 사용자만 접속이 가능하며, 로그를 남기고 추적이 가능함을 경고.
- 허가되지 않은 사용자는 법적인 조치 등을 취할 수 있다는 경고.

 

2) 설정 방법

 

Router# conf t

Router(config)#  banner motd   #     // 장비 접속 시 나타나는 경고 메시지 설정

Enter TEXT message. End with the character '#'.    //메시지 작성이 끝난 경우 # 을 입력하여 메시지 입력 종료.

경고 메시지 #

Router(config)# 

 

Router# conf t

Router(config)#  banner login  #    // 로그인 하기 전 경고 메시지 설정

Enter TEXT message. End with the character '#'.  

경고 메시지 #

Router(config)# 

 

Router# conf t

Router(config)#  banner exec  #    // 로그인 후 경고 메시지 설정

Enter TEXT message. End with the character '#'.  

경고 메시지 #

Router(config)# 

 

3) 배너 설정 예시

 

Router# conf t

Router(config)#  banner motd   #

this system have to access authorized user and only use for officially. 
During using equipment, privacy of individuals in not guaranteed.
all access and usage is monitored and recorded and can be provided evidence as courtor related organization. 
Use of this system constitutes consent to monitoring for these purposes. #

Router(config)# 

댓글