본문 바로가기
정보보안

정보보안4 7차시

by 뭔가해보겠습니다 2024. 7. 27.

GNS3 에서 실습

 

오른쪽은 기존의 로키 리눅스를 활용. nmtui 에서 주소를 바꾸고 재부팅해주었음.

 

스위치 설정

conf t
int vlan 1
ip add 10.10.11.252 255.255.255.0
no sh
ip default-gateway 10.10.11.253
conf t
int vlan 1
ip add 10.10.12.252 255.255.255.0
no sh
ip default-gateway 10.10.12.253

 

라우터 설정

conf t
int f0/0
ip add 10.10.11.253 255.255.255.0
no sh
int s1/0
ip add 1.1.1.1 255.255.255.252
no sh
conf t
int f0/0
ip add 10.10.12.253 255.255.255.0
no sh
int s1/0
ip add 1.1.1.2 255.255.255.252
no sh

 

장비에 ssh 설정하기

enable secret cisco (gns에서는 생략가능)
hostname 장비별칭 (gns에서 생략)


username admin secret cisco
ip domain-name 도메인명 아무거나
crypto key generate rsa
=>여기서 2048 입력

ip ssh version 2
line vty 0 4
login local
transport input ssh

 

그런데 cmd에서 ssh 접속이 안됨

오른쪽에 연결한 로키 리눅스에서 시도

 

1트

# ssh admin@10.10.12.252
Unable to negotiate with 10.10.12.252 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

 

2트
# ssh -oKexAlgorithms=diffie-hellman-group-exchange-sha1 admin@10.10.12.252
Unable to negotiate with 10.10.12.252 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

 

3트

vi /etc/ssh/ssh_config

맨 아랫줄에 KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 추가

 

# ssh admin@10.10.12.252
The authenticity of host '10.10.12.252 (10.10.12.252)' can't be established.
RSA key fingerprint is SHA256:4rwbLcoNf8PCxsclgO8ehoHXA0roPdOux9hkbPi8lcM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.10.12.252' (RSA) to the list of known hosts.
Password:

 

비밀번호 입력하니 접속성공.

 

( 참고한 블로그 https://green-bin.tistory.com/122 )

 

윈도우 cmd는 완전히 외부 네트워크라서 gns로 접속이 안되는 모양이다.

 

동적 라우팅 rip

conf t
router rip
version 2
no auto-summary
network 10.10.11.0
network 1.1.1.0
passive-interface f0/0
exit
conf t
router rip
version 2
no auto-summary
network 10.10.12.0
network 1.1.1.0
passive-interface f0/0
exit

 

R RIP 라우팅 경로 확인

 

rip 설정후 10.10.11.2 -> 10.10.12.2 ping 성공

 

rip 삭제

no router rip

 

 

자동축약 예시 https://blog.naver.com/kdh3850/220395384494

+ no auto summary를 주는 이유
rip이나 eigrp는 기본적으로 auto summary(자동축약)가 활성화상태
5.5.5.3 이런주소를 5.0.0.0 으로 축약해버린다
때문에 auto summary 기능을 해제하고, RIP v2를 사용한다
( 수동축약도 가능, 예) ip summary-address rip 5.5.0.0 255.255.224.0
이렇게 하면 5.5.0.0/19보다 세분화된 네트웍은 전부 5.5.0.0/19로 보낸다 

참고 블로그 : https://m.blog.naver.com/dltlahs007/100039235920 )

 

 

동적 라우팅 ospf

router ospf 1
network 10.10.11.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.3 area 0
passive-interface f0/0
exit
router ospf 1
network 10.10.12.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.3 area 0
passive-interface f0/0
exit

 

 

 

외부 네트워크 확장하기

Cloud -> 이더넷 삭제. VMware Network Adapter VMnet8 선택하여 셋팅, R3으로 별칭함

이미지는 인터넷으로 주로 표현하는 구름 그대로.

 

vmnetcfg.exe VMnet8 Type NAT, .2 로 설정

 

 

인터페이스 셋팅은 기존과 똑같이 한 것에

R1 라우터에 

int f0/0
ip add 192.168.100.3 255.255.255.0
no sh

만 추가해 준다

 

동적라우팅도

conf t
router rip
version 2
no auto-summary
network 10.10.11.0
network 1.1.1.0

network 192.168.100.0
passive-interface f0/0
exit

추가된 네트워크 대역을 추가함

 

외부 네트워크에 대한 디폴트 라우팅도 추가

R1

ip route 0.0.0.0 0.0.0.0 192.168.100.2

R2

ip route 0.0.0.0 0.0.0.0 1.1.1.1

(왜냐면, R2는 무조건 R1을 거쳐서 나가야 하기 때문)

 

연결은 했는데 테스트는 시간상 못했다

 

gnsVMnet8.zip
0.03MB

'정보보안' 카테고리의 다른 글

정보보안5 2차시  (0) 2024.08.04
정보보안4 8차시  (0) 2024.07.29
정보보안4 6차시  (0) 2024.07.21
정보보안4 5차시  (0) 2024.07.20
사전학습) 파이썬 2  (0) 2024.07.16