1. 라우팅 프로토콜 메커니즘 및 와일드카드 마스크 이론
인프라 망의 확장성과 장애 복구 자동화를 위해 정적(Static) 및 동적(Dynamic) 라우팅 체계를 비교 분석하고, OSPF 스케일아웃에 필수적인 와일드카드 마스크(Wildcard Mask) 비트 반전 연산을 정립했다.
- 정적 라우팅 (Static): 관리자가 목적지 경로를 수동 지정. 오버헤드가 없고 보안성이 높으나 토폴로지 변경 시 유연성 결여.
- 동적 라우팅 (Dynamic): 라우터 간 프로토콜(RIP, OSPF)을 통해 경로 정보를 교환, 최적 경로(Metric)를 자동 계산 및 수렴(Convergence).
비트 반전 기반 와일드카드 마스크(Wildcard Mask) 매핑 테이블
| 서브넷 마스크 (Subnet Mask) | 와일드카드 마스크 (Wildcard Mask) | 검사 비트 및 적용 타겟 역할 범위 |
|---|---|---|
255.0.0.0 |
0.255.255.255 |
A 클래스 전체 대역 필터링 및 대규모 매칭 |
255.255.0.0 |
0.0.255.255 |
B 클래스 전체 대역 필터링 및 중규모 매칭 |
255.255.255.0 |
0.0.0.255 |
C 클래스 단일 서브넷 대역 지정 (/24) |
255.255.255.252 |
0.0.0.3 |
Point-to-Point 시리얼 링크 구간 정밀 타겟팅 (/30) |
2. GNS3 인프라 아키텍처 다중 라우팅 빌드 시나리오
4대 코어 라우터 아키텍처 환경에서 호스트 및 인터페이스 주소를 할당한 뒤, 정적 라우팅 단계부터 RIP v2, OSPF 단계까지 라우팅 다변화 고도화 테스트를 처리했다.
① 인터페이스 기본 IP 주소 수립 체계 (R1 ~ R4)
# PC 가상 호스트 엔드포인트 세팅 정보
PC-1 IP : 10.10.10.1 255.255.255.0 (GW: 10.10.10.254)
PC-2 IP : 20.20.20.1 255.255.255.0 (GW: 20.20.20.254)
PC-3 IP : 30.30.30.1 255.255.255.0 (GW: 30.30.30.254)
PC-4 IP : 40.40.40.1 255.255.255.0 (GW: 40.40.40.254)
# [R1 라우터 활성화]
R1(config)# hostname R1
R1(config)# interface FastEthernet0/0
R1(config-if)# ip address 10.10.10.254 255.255.255.0
R1(config-if)# no shutdown
R1(config)# interface Serial1/0
R1(config-if)# ip address 1.1.1.1 255.255.255.252
R1(config-if)# clock rate 64000
R1(config-if)# no shutdown
R1(config)# interface Serial1/1
R1(config-if)# ip address 4.4.4.2 255.255.255.252
R1(config-if)# no shutdown
# [R2 라우터 활성화]
R2(config)# hostname R2
R2(config)# interface FastEthernet0/0
R2(config-if)# ip address 20.20.20.254 255.255.255.0
R2(config-if)# no shutdown
R2(config)# interface Serial1/1
R2(config-if)# ip address 1.1.1.2 255.255.255.252
R2(config-if)# no shutdown
R2(config)# interface Serial1/0
R2(config-if)# ip address 2.2.2.1 255.255.255.252
R2(config-if)# no shutdown
# [R3 라우터 활성화]
R3(config)# hostname R3
R3(config)# interface FastEthernet0/0
R3(config-if)# ip address 30.30.30.254 255.255.255.0
R3(config-if)# no shutdown
R3(config)# interface Serial1/1
R3(config-if)# ip address 2.2.2.2 255.255.255.252
R3(config-if)# no shutdown
R3(config)# interface Serial1/0
R3(config-if)# ip address 3.3.3.1 255.255.255.252
R3(config-if)# no shutdown
# [R4 라우터 활성화]
R4(config)# hostname R4
R4(config)# interface FastEthernet0/0
R4(config-if)# ip address 40.40.40.254 255.255.255.0
R4(config-if)# no shutdown
R4(config)# interface Serial1/1
R4(config-if)# ip address 3.3.3.2 255.255.255.252
R4(config-if)# no shutdown
R4(config)# interface Serial1/0
R4(config-if)# ip address 4.4.4.1 255.255.255.252
R4(config-if)# no shutdown
② 정적(Static) 라우팅 파이프라인 수동 수립
# R1 수동 경로 업데이트
R1(config)# ip route 20.20.20.0 255.255.255.0 1.1.1.2
R1(config)# ip route 30.30.30.0 255.255.255.0 1.1.1.2
R1(config)# ip route 40.40.40.0 255.255.255.0 4.4.4.1
# R2 수동 경로 업데이트
R2(config)# ip route 10.10.10.0 255.255.255.0 1.1.1.1
R2(config)# ip route 30.30.30.0 255.255.255.0 2.2.2.2
R2(config)# ip route 40.40.40.0 255.255.255.0 2.2.2.2
# R3 수동 경로 업데이트
R3(config)# ip route 10.10.10.0 255.255.255.0 3.3.3.2
R3(config)# ip route 20.20.20.0 255.255.255.0 2.2.2.1
R3(config)# ip route 40.40.40.0 255.255.255.0 3.3.3.2
# R4 수동 경로 업데이트
R4(config)# ip route 10.10.10.0 255.255.255.0 4.4.4.2
R4(config)# ip route 20.20.20.0 255.255.255.0 3.3.3.1
R4(config)# ip route 30.30.30.0 255.255.255.0 3.3.3.1
③ RIP v2 주소 축약 비활성화 기반 동적 라우팅 업데이트
# R1 RIP 동적 라우팅 선언
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# no auto-summary
R1(config-router)# network 10.0.0.0
R1(config-router)# network 1.0.0.0
R1(config-router)# network 4.0.0.0
# R2 RIP 동적 라우팅 선언
R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# no auto-summary
R2(config-router)# network 20.0.0.0
R2(config-router)# network 1.0.0.0
R2(config-router)# network 2.0.0.0
# R3 RIP 동적 라우팅 선언
R3(config)# router rip
R3(config-router)# version 2
R3(config-router)# no auto-summary
R3(config-router)# network 30.0.0.0
R3(config-router)# network 2.0.0.0
R3(config-router)# network 3.0.0.0
# R4 RIP 동적 라우팅 선언
R4(config)# router rip
R4(config-router)# version 2
R4(config-router)# no auto-summary
R4(config-router)# network 40.0.0.0
R4(config-router)# network 3.0.0.0
R4(config-router)# network 4.0.0.0
④ OSPF 링크 상태(Link-State) 동적 라우팅 스케일 아웃
# R1 OSPF 프로세스 주입 (Area 0 백본 영역 할당 및 와일드카드 선언)
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 200.200.200.0 0.0.0.255 area 0
R1(config-router)# network 1.1.1.0 0.0.0.7 area 0
R1(config-router)# network 2.2.2.0 0.0.0.7 area 0
# R2 OSPF 프로세스 주입
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 125.XXX.XX.0 0.0.0.255 area 0
R2(config-router)# network 1.1.1.0 0.0.0.7 area 0
R2(config-router)# network 3.3.3.0 0.0.0.7 area 0
# R3 OSPF 프로세스 주입
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 168.XXX.XX.0 0.0.0.255 area 0
R3(config-router)# network 2.2.2.0 0.0.0.7 area 0
R3(config-router)# network 3.3.3.0 0.0.0.7 area 0
3. 인프라 보안 통제 관제: Cisco ACL 접근제어 목록 정책 수립
모의 해커측 자산(200.200.200.1)에서 사내 우분투 웹 서버로 접근하는 비정상적인 HTTP(TCP 80) 공격 트래픽을 차단하기 위해 라우터 경계단에 ACL(Access Control List) 하드닝 보안 정책을 실현했다.
# Extended ACL 120 정책 수립 (특정 호스트의 80포트 차단 후 나머지는 유통 허용)
HACKER(config)# access-list 120 deny tcp host 200.200.200.1 any eq 80
HACKER(config)# access-list 120 permit ip any any
# 바운드 인터페이스 진입 지점(Inbound) 정책 연동 및 모니터링 검증
HACKER(config)# interface FastEthernet0/0
HACKER(config-if)# ip access-group 120 in
HACKER(config-if)# exit
HACKER# show access-lists 120
# [Tip] 기 설정된 보안 필터 방화벽 해제 처리 스크립트
HACKER(config)# interface Serial1/1
HACKER(config-if)# no ip access-group 10 in
4. BIND9 내부 네임서버(DNS) 다중 존 파일 구축 및 메일 연동
웹 서버 내부 보안 인프라 서비스 파이프라인의 명확한 네임 해상도를 위해 BIND9 도메인 존 레이아웃을 생성하고, 사내 알람 통보를 위한 Postfix 메일 패키지 토대를 빌드했다.
# Step 1. 도메인 별칭 영역(Zone Mapping) 스키마 정의
# 명세서 위치: /etc/bind/named.conf.local
zone "XXXXX.kr" {
type master;
file "/etc/bind/XXXXX.kr";
};
zone "XXX.kr" {
type master;
file "/etc/bind/XXX.kr";
};
# 기존 로컬 템플릿 기반 존 마운트 파일 복사 이관 및 권한 위임
sudo cp db.local /etc/bind/XXXXX.kr
sudo cp db.local /etc/bind/XXX.kr
# Step 2. 외부 질의 허용 및 보안 검증 통과를 위한 설정 튜닝
# 명세서 위치: /etc/bind/named.conf.options
dnssec-validation no;
recursion yes;
allow-query { any; };
# 내부 인프라 반영 및 네임 서비스 데몬 리스타트 트래킹
sudo systemctl restart named
# Step 3. 칼리 리눅스 타겟 DNS 지정 및 자산 조회(Banner Grab/NSLookup) 검증
# 내부 어댑터 타겟 DNS 주소를 125.XXX.XX.X 로 하드코딩
nslookup jjh.kr
sudo systemctl restart apache2
# Step 4. 사내 이메일 경보 텔레메트리 파이프라인 구축 (Mailutils & Postfix)
sudo apt update && sudo apt install -y mailutils postfix evolution thunderbird
배운 점 및 총평
10일차 실습은 대규모 토폴로지 인프라 환경에서 데이터를 목적지까지 전송하기 위한 다각적 라우팅 스위칭 메커니즘을 마스터한 기념비적인 세션이었다. 정적 경로 할당의 장단점을 명확히 인지한 뒤, 소규모 망에 적합한 RIP v2와 대규모 백본 스케일에 필적하는 OSPF 프로토콜을 연속 수립하며 링크 상태 전송 및 비트 반전 기반의 와일드카드 연산 로직을 완벽히 체득했다.
아울러 단순한 네트워크 구성을 넘어, 라우터 경계단에서 침투 차단을 위한 보안 정책(ACL 방화벽)을 적용하고 내부 자산 식별을 위한 BIND9 DNS 존 파일 설계 구조까지 핸들링해 냄으로써 실제 보안관제 및 침투 테스트 인프라 환경의 엔드투엔드 파이프라인을 견고하게 완성시켰다.