안전한 로컬 브랜치 연결 구성
이제 LAN/WAN 연결을 확인했으므로 Junos CLI를 사용하여 VLAN 및 관련 정책을 구축하여 LAN 및 WAN 연결을 보호할 수 있습니다.
SRX 플랫폼은 모두 보안에 관한 것입니다. 그것은 그들이 하는 일입니다. 이러한 현대 사회에서 로컬 및 인터넷 연결을 보호하는 것은 매우 중요합니다. 보안 요구 사항에 맞게 SRX를 구성하는 방법을 보여 드리겠습니다.
VLAN 및 보안 정책 구성
로컬 브랜치 연결 목표
그림 1 은 이러한 절차에서 사용되는 로컬 지사 연결 목표를 자세히 설명합니다.

다음과 같은 목표를 달성할 수 있습니다.
- 직원을 Trust VLAN()/trustzone에vlan-trust 배치합니다. 완전한 인터넷 액세스와 존 내 장치에 contractors 대한 특정 연결을 시작하는 기능을 지원합니다.
- 브랜치는 소매 판매를 처리하고 후원자에게 무료 Wi-Fi를 제공합니다. 존에 guests VLAN을 guests 배치하고 제한된 인터넷 액세스를 허용합니다.
- 계약업체는 로컬 지사에서 새로운 웹 기반 비즈니스 애플리케이션을 제공하고 있습니다. 계약자를 VLAN/존에 contractors 배치하고 인터넷 액세스를 허용하지 않습니다. 계약자는 해당 지역 또는 guests 구역으로 통신을 trust 개시할 수 없습니다.
다음 표는 VLAN 연결 요구 사항을 요약합니다.
VLAN ID | 이름/존 | 서브넷 | 인터넷 액세스? | 보안 정책 |
---|---|---|---|---|
3 * | vlan-trust/trust * | 192.168.2.0/24 * | 전체 * |
|
20 | 손님 | 192.168.20.0/24 | HTTP 및 HTTPS 전용 |
|
30 | 계약자 | 192.168.30.0/24 | 아니요 |
|
"*" vlan-trust 로 표시된 테이블의 항목은 공장 기본 구성을 통해 이미 설정되었습니다. 우리는 이것이 쉬울 것이라고 말했습니다! 공장 기본 trust 존에 필요한 것은 존에서 trust 존까지 지정된 프로토콜을 허용하는 보안 정책을 추가하는 것입니다 contractors .
계약자 존 트래픽에 대한 신뢰 허용
명시된 연결 목표를 달성하려면 존에서 존 contractors 까지 특정 트래픽(HTTP/HTTPS 및 핑)을 trust 허용하는 보안 정책을 만듭니다. 보안 어플라이언스인 SRX는 상호 존(inter-zone) 트래픽에 대한 기본 거부 정책을 가지고 있습니다. 공장 기본 구성에서는 트래픽이 존 간에 trust untrust 만 허용됩니다.
set security policies from-zone trust to-zone contractors policy trust-to-contractors match source-address any set security policies from-zone trust to-zone contractors policy trust-to-contractors match destination-address any set security policies from-zone trust to-zone contractors policy trust-to-contractors match application junos-http set security policies from-zone trust to-zone contractors policy trust-to-contractors match application junos-https set security policies from-zone trust to-zone contractors policy trust-to-contractors match application junos-ping set security policies from-zone trust to-zone contractors policy trust-to-contractors then permit
이 예에서는 단순하게 유지하며 모든 소스 또는 대상 IP 주소와 일치합니다. 여기에서는 정책 제어를 위해 소스 존과 대상 존에 맞추기만 하면 됩니다. 보안을 향상하기 위해 이 지사에서 192.168.2.0/24 및 contractors 192.168.30.0/24 접두사인 및 서브넷에 대한 주소록 항목을 trust 정의하는 것을 고려해 보십시오. 주소록 항목에서 일치 source-address trust
할 수 있습니다destination-address contractors
.
또한 호스트별 주소록 항목을 추가하여 존 간에 통신할 수 있는 특정 IP 주소를 제어할 수 있습니다. 정책에서 호스트별 IP 주소를 사용하는 경우, 정적 IP 주소를 관련 호스트에 할당해야 합니다. 기억하시는다면 이 예에서 DHCP를 사용합니다. 따라서 리스 시간이 부족하거나 클라이언트 시스템이 재부팅되는 경우, 관련 호스트에 정적 IP 주소를 할당하지 않는 한 클라이언트 머신에 새 IP 주소가 자동으로 할당됩니다.
게스트 VLAN, 보안 존 및 보안 정책 구성
게스트를 시작해보겠습니다. 결국, 그들은 할 웹 쇼핑이! 높은 수준에서 이 작업에는 다음과 같은 핵심 부분이 포함됩니다.
- VLAN을 guest 정의하고 하나 이상의 LAN 인터페이스와 연결
- VLAN의 IRB(Integrated Routing and Bridging) 인터페이스 정의
- VLAN의 구성원에게 IP 주소를 할당하도록 DHCP 서버를 구성합니다.
- VLAN에 대한 연결 요구에 따라 보안 존 및 정책 정의
- SRX 디바이스에 루트로 로그인합니다. 콘솔 또는 SSH 액세스를 사용할 수 있습니다. CLI를 시작하고 구성 모드를 입력합니다.
login: branch_SRX (ttyu0) root@branch_SRX% cli root@branch_SRX> configure Entering configuration mode [edit] root@branch_SRX#
- VLAN을 guests 정의하고 IRB 인터페이스와 연결합니다. 이 IRB 인터페이스는 VLAN상의 디바이스를 위한 기본 게이트웨이 역할을 합니다.
[edit] root@branch_SRX# set vlans guests vlan-id 20 root@branch_SRX# set vlans guests l3-interface irb.20
- ge-0/0/1 인터페이스를 VLAN에 배치합니다 guests . 기본 구성에서 이 인터페이스는 대부분과 마찬가지로 VLAN에 trust 속합니다. 먼저 인터페이스의 현재 VLAN 연결을 삭제하여 업데이트 guests 된 VLAN으로 교체할 수 있습니다.
[edit] root@branch_SRX# delete interfaces ge-0/0/1 unit 0 root@branch_SRX# set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members guests
- VLAN에 대한 IRB 인터페이스를 구성합니다 guests . 이 단계에서는 VLAN에 IP 서브넷을 할당합니다. 이 예에서는 VLAN ID를 IRB 단위 번호와 일치시기 때문에 보다 쉽게 기억할 수 있습니다. 이 연결은 편리하게만 가능합니다. 이 단계에 사용하지 않은 단위 번호를 사용할 수 있습니다.
[edit] root@branch_SRX# set interfaces irb unit 20 family inet address 192.168.20.1/24
- VLAN에 대한 DHCP 서버를 구성합니다 guests . VLAN의 IRB 인터페이스는 DHCP 서버 인터페이스로 구성됩니다. 이 구성은 지정된 범위의 IP 주소를 할당하고 클라이언트에 기본 경로 및 공용 DNS 서버 주소를 할당합니다. 기본 경로는 모든 비-로컬(VLAN 간 및 LAN에서 WAN 간) 트래픽에 대한 다음 홉으로서 VLAN의 IRB를 가리킵니다.
[edit] root@branch_SRX# set system services dhcp-local-server group GUEST-POOL interface irb.20 root@branch_SRX# set access address-assignment pool GUEST-POOL family inet network 192.168.20.0/24 root@branch_SRX# set access address-assignment pool GUEST-POOL family inet range GUEST-POOL-IP-RANGE low 192.168.20.10 root@branch_SRX# set access address-assignment pool GUEST-POOL family inet range GUEST-POOL-IP-RANGE high 192.168.20.100 root@branch_SRX# set access address-assignment pool GUEST-POOL family inet dhcp-attributes domain-name srx-branch.com root@branch_SRX# set access address-assignment pool GUEST-POOL family inet dhcp-attributes name-server 8.8.8.8 root@branch_SRX# set access address-assignment pool GUEST-POOL family inet dhcp-attributes router 192.168.20.1
- VLAN의 guests 구성원은 인터넷 액세스를 제공합니다. 로컬 브랜치에서 로컬 사용 전용 RFC-1918 IP 주소를 사용하기 때문에 인터넷 액세스를 위해서는 SRX가 WAN 인터페이스 IP 주소로 소스 NAT를 수행해야 합니다. 전 세계적으로 라우팅이 가능한 IP 주소만 인터넷을 통해 사용될 수 있습니다. VLAN에 대한 guests 소스 NAT 정책을 정의하는 방법은 다음과 같습니다.
[edit] root@branch_SRX# set security nat source rule-set guests-to-untrust from zone guests root@branch_SRX# set security nat source rule-set guests-to-untrust to zone untrust root@branch_SRX# set security nat source rule-set guests-to-untrust rule guest-nat-rule match source-address 0.0.0.0/0 root@branch_SRX# set security nat source rule-set guests-to-untrust rule guest-nat-rule then source-nat interface
- 거의 끝났습니다. 다음으로 보안 존을 만듭니다 guests . 이 프로세스의 일환으로 관련 VLAN의 IRB를 새 존에 배치합니다. 존의 정의 중 하나는 해당 존에서 SRX 디바이스의 컨트롤 플레인으로 흐를 수 있는 프로토콜과 서비스를 지정하는 것입니다.
이 예에서는 VLAN의 guests 사용자가 로컬 컨트롤 플레인에 DHCP 및 핑 트래픽을 시작할 수 있도록 허용합니다. 이를 통해 게스트는 DHCP를 사용하여 IP 주소를 요청하고 디버깅 목적으로 VLAN의 IRB를 핑하는 동시에 다른 모든 서비스와 프로토콜을 로컬 호스트로 차단할 수 있습니다. 결과적으로 존의 guest 사용자는 Telnet 또는 SSH를 브랜치 SRX로 시작하지 못하도록 차단됩니다. 이와 반대로 존의 trust 사용자는 SRX에 대한 SSH 연결을 시작할 수 있습니다.
[edit] root@branch_SRX# set security zones security-zone guests interfaces irb.20 root@branch_SRX# set security zones security-zone guests host-inbound-traffic system-services dhcp root@branch_SRX# set security zones security-zone guests host-inbound-traffic system-services ping
- 마지막 단계는 VLAN에 대한 guests 보안 정책을 정의하는 것입니다. 구성 문장을 짧게 유지하기 위해 우리는 계층 구조에
[edit security policies]
"주차"합니다. 인터넷 액세스를 제한하기 위해 정책은 HTTP, HTTPS, DNS 및 핑에 대해서만 지원을 제공합니다.[edit security policies ] root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match source-address any root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match destination-address any root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match application junos-http root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match application junos-https root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match application junos-ping root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust match application junos-dns-udp root@branch_SRX# set from-zone guests to-zone untrust policy guests-to-untrust then permit
빠른 구성
게스트 VLAN 빠른 구성
여기 VLAN과 보안 정책을 세트 형식으로 정의하기 guests 위한 전체 구성이 있습니다. 빠르게 시작 및 실행하려면 필요에 따라 구성 명령문을 편집하고 SRX에 붙여넣기만 하면 됩니다.
set vlans guests vlan-id 20 set vlans guests l3-interface irb.20 delete interfaces ge-0/0/1 unit 0 set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members guests set interfaces irb unit 20 family inet address 192.168.20.1/24 set system services dhcp-local-server group GUEST-POOL interface irb.20 set access address-assignment pool GUEST-POOL family inet network 192.168.20.0/24 set access address-assignment pool GUEST-POOL family inet range GUEST-POOL---IP-RANGE low 192.168.20.10 set access address-assignment pool GUEST-POOL family inet range GUEST-POOL---IP-RANGE high 192.168.20.100 set access address-assignment pool GUEST-POOL family inet dhcp-attributes domain-name srx-branch.com set access address-assignment pool GUEST-POOL family inet dhcp-attributes name-server 8.8.8.8 set access address-assignment pool GUEST-POOL family inet dhcp-attributes router 192.168.20.1 set security nat source rule-set guests-to-untrust from zone guests set security nat source rule-set guests-to-untrust to zone untrust set security nat source rule-set guests-to-untrust rule guest-nat-rule match source-address 0.0.0.0/0 set security nat source rule-set guests-to-untrust rule guest-nat-rule then source-nat interface set security zones security-zone guests interfaces irb.20 set security zones security-zone guests host-inbound-traffic system-services dhcp set security zones security-zone guests host-inbound-traffic system-services ping set security policies from-zone guests to-zone untrust policy guests-to-untrust match source-address any set security policies from-zone guests to-zone untrust policy guests-to-untrust match destination-address any set security policies from-zone guests to-zone untrust policy guests-to-untrust match application junos-http set security policies from-zone guests to-zone untrust policy guests-to-untrust match application junos-https set security policies from-zone guests to-zone untrust policy guests-to-untrust match application junos-ping set security policies from-zone guests to-zone untrust policy guests-to-untrust match application junos-dns-udp set security policies from-zone guests to-zone untrust policy guests-to-untrust then permit
하청업체 VLAN 빠른 구성
contractors VLAN 및 관련 보안 존은 VLAN에 대해 guests 위에서 설명한 것과 유사합니다. VLAN을 위한 빠른 구성으로 직진하여 일부 용지를 저장합니다contractors.
존에 대한 보안 정책 정의의 contractors 부재는 매우 중요합니다. 명시적 정책을 적용하면 기본 거부 모든 정책이 이 존에서 시작된 모든 영역 간 트래픽에 대해 완전한 효과를 발휘합니다! 그 결과 존에서 contractors 시작되는 모든 트래픽이 다른 모든 존에 진입하지 못하도록 차단됩니다.
set vlans contractors vlan-id 30 set vlans contractors l3-interface irb.30 delete interfaces ge-0/0/3 unit 0 set interfaces ge-0/0/3 unit 0 family ethernet-switching vlan members contractors set interfaces irb unit 30 family inet address 192.168.30.1/24 set system services dhcp-local-server group CONTRACTORS-POOL interface irb.30 set access address-assignment pool CONTRACTORS-POOL family inet network 192.168.30.0/24 set access address-assignment pool CONTRACTORS-POOL family inet range CONTRACTORS-POOL-IP-RANGE low 192.168.30.10 set access address-assignment pool CONTRACTORS-POOL family inet range CONTRACTORS-POOL-IP-RANGE high 192.168.30.100 set access address-assignment pool CONTRACTORS-POOL family inet dhcp-attributes domain-name srx-branch.com set access address-assignment pool CONTRACTORS-POOL family inet dhcp-attributes name-server 8.8.8.8 set access address-assignment pool CONTRACTORS-POOL family inet dhcp-attributes router 192.168.30.1 set security zones security-zone contractors interfaces irb.30 set security zones security-zone contractors host-inbound-traffic system-services dhcp set security zones security-zone contractors host-inbound-traffic system-services ping
SRX 디바이스의 변경을 활성화하기 위해 구성을 커밋해야 합니다.
결과
보안 VLAN 구성의 결과는 Junos Curly brace 형식으로 표시됩니다. 간결성을 위해 아래의 기본 공장 구성을 생략했습니다.
root@branch_SRX# [edit] root@branch-srx# show interfaces irb . . . unit 20 { family inet { address 192.168.20.1/24; } } unit 30 { family inet { address 192.168.30.1/24; } } [edit] root@branch-srx# show vlans contractors { vlan-id 30; l3-interface irb.30; } guests { vlan-id 20; l3-interface irb.20; } . . . group CONTRACTORS-POOL { interface irb.30; } group GUEST-POOL { interface irb.20; } [edit] root@branch-srx# show access address-assignment . . . pool CONTRACTORS-POOL { family inet { network 192.168.30.0/24; range CONTRACTORS-POOL-IP-RANGE { low 192.168.30.10; high 192.168.30.100; } dhcp-attributes { domain-name srx-branch.com; name-server { 8.8.8.8; } router { 192.168.30.1; } } } } pool GUEST-POOL { family inet { network 192.168.20.0/24; range GUEST-POOL---IP-RANGE { low 192.168.20.10; high 192.168.20.100; } dhcp-attributes { domain-name srx-branch.com; name-server { 8.8.8.8; } router { 192.168.20.1; } } } } . . . nat { source { rule-set guests-to-untrust { from zone guests; to zone untrust; rule guest-nat-rule { match { source-address 0.0.0.0/0; } then { source-nat { interface; } } } } } } policies { . . . from-zone guests to-zone untrust { policy guests-to-untrust { match { source-address any; destination-address any; application [ junos-http junos-https junos-ping junos-dns-udp ]; } then { permit; } } } } zones { . . . security-zone contractors { host-inbound-traffic { system-services { dhcp; ping; } } interfaces { irb.30; } } security-zone guests { host-inbound-traffic { system-services { dhcp; ping; } } interfaces { irb.20; } } }
다음으로, 로컬 지사 통신을 보호하기 위해 구성이 예상대로 작동하는지 확인하는 방법을 보여 드리겠습니다.