sdn기반 port-mirroring / firewall
DESCRIPTION
SDN기반 Port-Mirroring / FireWallTRANSCRIPT
㈜유미테크
SDN 기반 Port-Mirroring / Firewall
2
목차
• SDN Network Configuration
• Port Mirroring
• Firewall
3
SDN Network Configura-tion
4
Contro
l Pla
ne
Data
Pla
ne
SDN Network
BuffaloOFS2
192.168.7.101
BuffaloOFS3
192.168.7.102
BuffaloOFS1
192.168.7.100
Raspberry PiH1
x.x.x.218
1
2
4
3
1
2
W
W
W
SDN Con-troller
192.168.7.200
Raspberry PiH2
x.x.x.219
Raspberry PiH4
x.x.x.226
Raspberry PiH3
x.x.x.220
4
3
2
S
S
HS
H
HH
SHHH
Gigabit Layer 2 Switch
ISP’s ROUTER
MikrotikRB750GL
Router (D-HCP)
x.x.x.227 Port Mir-roring HostH4
x.x.x.228
1
OTHERS
OUTER WORLD
Data Plane
Control Plane
5
Port Mirroringwith Static Flow Entry
6
Port Mirroring with Static Flow Entry
• 목적– DNS 클라이언트로부터 생성되어 DNS 서버로 유입되는 DNS 질의 패킷을 Mirror-
ing 하는 것을 목표로 하며 , 이를 위한 static flow 설정을 알아본다 .
• 구성– DNS 서버는 (Linux 기반에서 ) bind, named 를 이용하여 구성할 수 있음 .– DNS 클라이언트에서 질의는 dig@${dns-server-host} ${domain-name} 를
이용한다 .• dns-server-host: DNS 서버 접속 ip 또는 domain-name• domain-name: 검색 대상 domain name.
• Shell script for TESTwhile [ 1 ]:do
dig @192.168.10.219 example.domain-server.co.krsleep 0.5
done
7
Port Mirroring TEST
• IP 배분– DNS 클라이언트 : 192.168.10.220– DNS 서버 : 192.168.10.219– 미러링 서버 : 192.168.10.228 – DNS 질의 Protocol/ 포트 : UDP/53
• Static flow 설정– 요청 미러링
• curl -d '{"name": “dns-query-mirroring-REQ", "switch": "00:00:00:23:20:83:40:71", "prior-ity": "1000", "eth_type": "0x0800", "ipv4_dst": “192.168.10.219”, “ip_proto”: “0x11”, “udp_dst”: “53”, "instructions": [{"apply_actions":[{"output": "1"}, {"output":"2"}]}], "active": "true"}' http://localhost:8080/wm/staticflowentry/json
– 응답 미러링• curl -d '{"name": “dns-query-mirroring-REP", "switch": "00:00:00:23:20:83:40:71", "prior-
ity": "1000", "eth_type": "0x0800", "ipv4_src": “192.168.10.219”, “ip_proto”: “0x11”, “udp_src”: “53”, "instructions": [{"apply_actions":[{"output": "1"}, {"output":“4"}]}], "active": "true"}' http://localhost:8080/wm/staticflowentry/json
• 결론– DNS 요청에 대한 미러링은 DNS 서버가 연결된 OFS.port 정보를 통해서 static flow 를 구성할 수
있으나 , DNS 응답에 대한 미러링은 요청 패킷의 유입된 OFS.port 정보를 알 수 없기 때문에 매우 제한적이다 .
8
Firewall
9
Firewall
• 목적– OFS 로 유입되는 패킷을 Firewall 설정을 통해서 dummy 패킷을 drop 시키는 것을
목표로 한다 .
• 구성– DNS 서버는 (Linux 기반에서 ) bind, named 를 이용하여 구성할 수 있음 .– DNS 클라이언트에서 질의는 dig@${dns-server-host} ${domain-name} 를
이용한다 .• dns-server-host: DNS 서버 접속 ip 또는 domain-name• domain-name: 검색 대상 domain name.
• Shell script for TESTwhile [ 1 ]:do
dig @192.168.10.219 example.domain-server.co.krsleep 0.5
done
10
Firewall TEST
• IP 배분– DNS 클라이언트 : 192.168.10.220– DNS 서버 : 192.168.10.219– 미러링 서버 : 192.168.10.228 – DNS 질의 Protocol/ 포트 : UDP/53
• Firewall 설정– 요청 Firewall
• curl -d '{“tp-dst": “53”, “nw-proto”: “udp”, “action”: “ALLOW”}’ http://localhost:8080/wm/firewall/rules/json
– 응답 Firewall• curl -d '{“tp-src": “53”, “nw-proto”: “udp”, “action”: “ALLOW”}’ http://
localhost:8080/wm/firewall/rules/json
• 결론– nw-proto 를 설정하지 않는 경우 tp-dst 가 53 번이 아닌 패킷들도 OFS 의 flow record 에는
나타나는 현상이 있다 .– Firewall 관련 명령을 실행하는 경우 이전에 설정되었던 static flow 는 모두 해제된다 .