EdgeRouter - EdgeRouter와 Juniper SRX 과의 IPsec 정책기반 사이트 투 사이트 VPN ================================================================= download at 2017-08-30T17:46:00Z `origin `_  Overview -------------- 이 문서는 EdgeRouter와 Juniper SRX 사이의 정책 기반 사이트 투 사이트 IPsec VPN을 구성하는 방법에 대하여 서술합니다. 정책 기반 VPN 은 로컬, 원격지 서브넷 정의에 따라서 특징지을 수 있습니다. 정책 기반 VPN 타입과 달리 경로 기반 VPN은 가상 터널 인터페이스 (VTI)와 라우팅 엔트리 사용도에 따라서 특징 지을 수 있습니다. |book_25x25.png| **NOTES & REQUIREMENTS:** EdgeOS 1.9.7 이상의 펌웨어가 설치된 모든 EdgeRouter 모델에서 적용 가능합니다. 커맨드라인 인터페이스와 Juno, 상급 네트워킹에 대한 지식이 요구됩니다. 해당 주제에 대한 내용은 `관련 문서 <#related%20articles>`__ 섹션의 문서를 확인하시기 바랍니다. 이 문서에서 사용한 장비: - `EdgeRouter-X (ER-X) `__ - Juniper SRX - 피어의 테스트 클라이언트 (Host1 and Server1) Table of Contents -------------- #. `네트워크 다이어그램 <#diagram>`__ #. `Steps: 정책기반 VPN <#policy%20vpn>`__ #. `Steps: Juniper SRX VPN <#juniper%20vpn>`__ #. `Steps: 테스트 및 검증 <#testing%20verification>`__ #. `관련 문서 <#related%20articles>`__ -------------- 네트워크 다이어그램 -------------- `맨위로 가기 <#top>`__ 네트워크 토폴로지는 아래와 같습니다. EdgeRouter와 Juniper SRX에서 사용하는 인터페이스는 다음과 같습니다: **ER-X** #. eth0 (WAN) - 203.0.113.1 #. eth1 (LAN) - 192.168.1.1/24 **Juniper SRX** #. ge-0/0/0 (WAN) - 192.0.2.1 #. ge-0/0/1 (LAN) - 172.16.1.1/24 |image1| -------------- Steps: 정책기반 VPN -------------- `맨위로 가기 <#top>`__ 이 문서에서는 라우팅, 인터페이스 설정이 완료되어 서로 통신이 가능하다고 가정합니다. IPsec에 관련된 UDP 포트와 프로토콜은 다음과 같습니다: #. UDP 500 (IKE) #. ESP (프로토콜 50) #. UDP 4500 (NAT-T) 생성할 VPN 타입은 정책 기반 VPN이며, 원격지, 로컬 서브넷을 사용하며 해당 서브넷 정보가 없으면 프록시 ID를 사용합니다. 이 값들은 정확하게 두 피어간에 일치해야하며, 서로 동일한 내용을 가지고 있어야합니다. 터널을 통해서 미리 정해진 값들만 프록시 ID에서 전송 가능합니다. ER 예제에서는 192.168.1.0/24 가 LAN에서 존재하며, Juniper에서는 172.16.1.0/24를 사용합니다. 처음은 ER 설정을 수행하고, 다음에는 SRX 설정을 수행합니다. |CLI_circle.png| **CLI STEPS:** 커맨드라인 인터페이스에 접속합니다. GUI의 CLI 버튼을 사용하거나 PuTTY와 같은 프로그램을 사용합니다. 1. 환경설정 모드로 진입합니다. :: configure 2. 방화벽 룰 자동생성을 허용하고, IPsec 트래픽을 NAT에서 제외합니다. :: set vpn ipsec auto-firewall-nat-exclude enable 3. IKE 프로포절 (P1)과 보안 설정을 생성합니다. :: set vpn ipsec ike-group FOO0 lifetime 86400 set vpn ipsec ike-group FOO0 proposal 1 dh-group 14 set vpn ipsec ike-group FOO0 proposal 1 encryption aes256 set vpn ipsec ike-group FOO0 proposal 1 hash sha256 4. ESP 프로포절 (P2)과 보안 설정을 생성합니다. :: set vpn ipsec esp-group FOO0 lifetime 43200 set vpn ipsec esp-group FOO0 pfs disable set vpn ipsec esp-group FOO0 proposal 1 encryption aes128 set vpn ipsec esp-group FOO0 proposal 1 hash md5 |info_i_25x25.png| .. Note:: 이 예제에서 보안 설정은 VPN 성능, 지속성, 보안을 극대화하기위해 선택하였습니다. IKE 프로포절은 보안 (AES256 + SHA256)에 주안점을 두고, ESP 프로포절은 성능 (AES128 + MD5)에 주안점을 두었습니다. 보안 설정으로 어떤 설정을 선택하던지, 단계 1 (P1)와 단계 2 (P2)는 양쪽 커넥션에 동일하게 설정해야 합니다. 5. 피어 주소와 미리 공유할 키를 정의합니다. (은 원하는 패스워드로 변경합니다.) :: set vpn ipsec site-to-site peer 192.0.2.1 authentication mode pre-shared-secret set vpn ipsec site-to-site peer 192.0.2.1 authentication pre-shared-secret set vpn ipsec site-to-site peer 192.0.2.1 description IPsec 6. 사이트 투 사이트 VPN 커넥션의 로컬 소스 주소 (퍼블릭 IP)를 정의합니다. :: set vpn ipsec site-to-site peer 192.0.2.1 local-address 203.0.113.1 |info_i_25x25.png| .. Note:: 고정되지 않은 IP 주소를 WAN 커넥션에서 사용할 수도 있습니다. DHCP의 경우에는 **set ... peer 192.0.2.1** **dhcp-interface eth0** 명령어를 사용합니다. PPPoE 인터페이스와 로드밸런싱에서는 **set ... peer 192.0.2.1 local-address 0.0.0.0** 와 **local-address any** 명령어 사용을 권장합니다. 7. IKE 프로포절을 사이트 투 사이트 커넥션에 연결합니다. :: set vpn ipsec site-to-site peer 192.0.2.1 ike-group FOO0 8. 터널을 생성하여 원격지와 로컬 서브넷을 정의하고, ESP 프로포절과 연결합니다. :: set vpn ipsec site-to-site peer 192.0.2.1 tunnel 1 esp-group FOO0 set vpn ipsec site-to-site peer 192.0.2.1 tunnel 1 local prefix 192.168.1.0/24 set vpn ipsec site-to-site peer 192.0.2.1 tunnel 1 remote prefix 172.16.1.0/24 9. (선택사항) IPsec 오프로딩 기능은 ESP 성능을 향상시킬 수 있습니다. :: set system offload ipsec enable (this requires a reboot to become active) 10. 변경사항을 커밋합니다. :: commit 11. 환경설정을 저장합니다. :: save -------------- Steps: Juniper SRX VPN -------------- `맨위로 가기 <#top>`__ Junos의 최신 버전을 사용하며, 장비가 인터넷과 연결되어 있다고 가정합니다. Juniper의 사이트 투 사이트 VPN 커넥션은 \ `Configuring a Policy-Based VPN `__ 문서를 기초로 합니다. |CLI_circle.png|  **CLI STEPS:** Junos 커맨드라인 인터페이스에 접속합니다. 1. 설정 모드로 진입합니다. :: configure 2. WAN 인터페이스에서 관련있는 존에 연결하고, IKE (UDP500)을 허용합니다. :: set security zones security-zone trust interfaces ge-0/0/1.0 set security zones security-zone untrust interfaces ge-0/0/0.0 set security zones security-zone untrust host-inbound-traffic system-services ike |info_i_25x25.png| .. Note:: 이 문서에서는 \ **unit 0**\ 을 모든 관련있는 인터페이스에 사용합니다. 존은 'untrust', 'trust'를 기본 존으로 사용하며, 다른 환경과 똑같이 진행할 필요가 없습니다. 3. address-book에서 로컬, 원격지 서브넷 주소 범위를 정의합니다. :: set security address-book global address remote 192.168.1.0/24 set security address-book global address local 172.16.1.0/24 4. ‘untrust’과 ‘trust’ 존 사이에서 IPsec 트래픽을 허용하도록 하고, address book 과 연결합니다. :: set security policies from-zone trust to-zone untrust policy trust-to-ipsec match source-address local set security policies from-zone trust to-zone untrust policy trust-to-ipsec match destination-address remote set security policies from-zone trust to-zone untrust policy trust-to-ipsec match application any set security policies from-zone trust to-zone untrust policy trust-to-ipsec then permit tunnel ipsec-vpn IPsec set security policies from-zone trust to-zone untrust policy trust-to-ipsec then permit tunnel pair-policy ipsec-to-trust set security policies from-zone untrust to-zone trust policy ipsec-to-trust match source-address remote set security policies from-zone untrust to-zone trust policy ipsec-to-trust match destination-address local set security policies from-zone untrust to-zone trust policy ipsec-to-trust match application any set security policies from-zone untrust to-zone trust policy ipsec-to-trust then permit tunnel ipsec-vpn IPsec set security policies from-zone untrust to-zone trust policy ipsec-to-trust then permit tunnel pair-policy trust-to-ipsec |info_i_25x25.png| .. Note:: **The tunnel pair-policy**\ 구문은 ‘untrust to-zone trust’ 와 ‘trust to-zone untrust’ 정책을 연결합니다. 이 정책은 기본적으로 address book을 IPsec 터널에 연결하고 로컬, 원격지 서브넷을 정의합니다. 5. IPsec 트래픽 정책이 이전의 기존 정책 룰과 동일하도록 합니다. :: insert security policies from-zone trust to-zone untrust policy trust-to-ipsec before policy default-permit insert security policies from-zone untrust to-zone trust policy ipsec-to-trust before policy default-deny 6. NAT에서 변환된 주소로부터 IPsec 트래픽을 제외합니다. :: set security nat source rule-set sourcenat from zone trust set security nat source rule-set sourcenat to zone untrust set security nat source rule-set sourcenat rule nat match source-address 0.0.0.0/0 set security nat source rule-set sourcenat rule nat match destination-address 0.0.0.0/0 set security nat source rule-set sourcenat rule nat then source-nat interface set security nat source rule-set sourcenat rule ipsec match source-address-name local set security nat source rule-set sourcenat rule ipsec match destination-address-name remote set security nat source rule-set sourcenat rule ipsec then source-nat off 7. IPsec NAT 제외 룰이 이전의 소스 NAT 룰과 동일한지 확인합니다. :: insert security nat source rule-set sourcenat rule ipsec before rule nat |info_i_25x25.png| .. Note:: 이 문서는 소스-NAT가 이미 장치에 설정되었다고 가정합니다. NAT 룰이 이미 존재한다면, 새로운 IPsec 룰을 생성하고 기존 NAT룰보다 \ **insert**\ 명령어를 사용하여 앞에 삽입합니다. 8. IKE 프로포절 (IKEProposal)을 EdgeRouter에 미리 정의한 보안 규칙과 함께 생성합니다. :: set security ike proposal IKEProposal authentication-method pre-shared-keys set security ike proposal IKEProposal dh-group group14 set security ike proposal IKEProposal authentication-algorithm sha-256 set security ike proposal IKEProposal encryption-algorithm aes-256-cbc set security ike proposal IKEProposal lifetime-seconds 86400 9. IKE 정책(IKEPolicy)을 생성하고 IKE 프로포절에 연결합니다. (을 원하는 비밀번호로 변경합니다.) :: set security ike policy IKEPolicy mode main set security ike policy IKEPolicy proposals IKEProposal set security ike policy IKEPolicy pre-shared-key ascii-text 10. IKE 게이트웨이 (IKEGateway)를 생성하고 IKE 정책과 연결합니다. :: set security ike gateway IKEGateway ike-policy IKEPolicy set security ike gateway IKEGateway address 203.0.113.1 set security ike gateway IKEGateway external-interface ge-0/0/0 set security ike gateway IKEGateway local-address 192.0.2.1 11. EdgeRouter에 미리 정의한 보안규칙과 함께 ESP 프로포절 (ESPProposal)을 생성하합니다. :: set security ipsec proposal ESPProposal protocol esp set security ipsec proposal ESPProposal authentication-algorithm hmac-md5-96 set security ipsec proposal ESPProposal encryption-algorithm aes-128-cbc set security ipsec proposal ESPProposal lifetime-seconds 43200 12. 생성한 ESP 프로포절과 연결할 ESP 정책 (ESP Policy)를 생성합니다. :: set security ipsec policy ESPPolicy proposals ESPProposal 13. VPN IPsec 커넥션을 생성하고 IKE 게이트웨이와 ESP 정책과 연결합니다. :: set security ipsec vpn IPsec ike gateway IKEGateway set security ipsec vpn IPsec ike ipsec-policy ESPPolicy 14. (선택사항) IKE에 traceoptions 을 활성하 하여 로그 메시지를 출력하도록 합니다. :: set security ike traceoptions flag all set security ike traceoptions file ike.log |info_i_25x25.png| .. Note:: 필요하지 않다면, 비활성화 할 수 있습니다. (\ **deactivate security ike traceoptions**\ ) 를 사용하거나 설정을 제거합니다. 15. 변경사항을 커밋합니다. :: commit -------------- Steps: 테스팅 및 검증 -------------- `맨위로 가기 <#top>`__ IPsec VPN을 설정하고 나 이후에는 다음 명령어를 사용하여 커넥션/상태를 검증합니다. 1. IPsec 보안 옵션을 검증하고 ER의 상태를 확인합니다: :: show vpn ipsec sa peer-192.0.2.1-tunnel-1: #1, ESTABLISHED, IKEv1, 184447c009d51f80:14cc0f13aff401c0  local  '203.0.113.1' @ 203.0.113.1  remote '192.0.2.1' @ 192.0.2.1  AES_CBC-256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048  established 237s ago, reauth in 85347s  peer-192.0.2.1-tunnel-1: #1, INSTALLED, TUNNEL, ESP:AES_CBC-128/HMAC_MD5_96    installed 237 ago, rekeying in 41939s, expires in 42964s    in  cb321982,    180 bytes,     3 packets,   231s ago    out 5d4174b1,    180 bytes,     3 packets,   231s ago    local  192.168.1.0/24    remote 172.16.1.0/24  sudo ipsec statusall Status of IKE charon daemon (strongSwan 5.2.2, Linux 3.10.14-UBNT, mips):  uptime: 10 minutes, since Mar 12 09:05:48 2017  malloc: sbrk 376832, mmap 0, used 269320, free 107512  worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 2  Listening IP addresses:  203.0.113.1  192.168.1.1 Connections: peer-192.0.2.1-tunnel-1:  203.0.113.1...192.0.2.1  IKEv1 peer-192.0.2.1-tunnel-1:   local:  [203.0.113.1] uses pre-shared key authentication peer-192.0.2.1-tunnel-1:   remote: [192.0.2.1] uses pre-shared key authentication peer-192.0.2.1-tunnel-1:   child:  192.168.1.0/24 === 172.16.1.0/24 TUNNEL Routed Connections: peer-192.0.2.1-tunnel-1{1}:  ROUTED, TUNNEL peer-192.0.2.1-tunnel-1{1}:   192.168.1.0/24 === 172.16.1.0/24 Security Associations (1 up, 0 connecting): peer-192.0.2.1-tunnel-1[1]: ESTABLISHED 5 minutes ago, 203.0.113.1[203.0.113.1]...192.0.2.1[192.0.2.1] peer-192.0.2.1-tunnel-1[1]: IKEv1 SPIs: 184447c009d51f80_i* 14cc0f13aff401c0_r, pre-shared key reauthentication in 23 hours peer-192.0.2.1-tunnel-1[1]: IKE proposal: AES_CBC_256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048 peer-192.0.2.1-tunnel-1{1}:  INSTALLED, TUNNEL, ESP SPIs: cb321982_i 5d4174b1_o peer-192.0.2.1-tunnel-1{1}:  AES_CBC_128/HMAC_MD5_96, 180 bytes_i (3 pkts, 324s ago), 180 bytes_o (3 pkts, 324s ago) peer-192.0.2.1-tunnel-1{1}:   192.168.1.0/24 === 172.16.1.0/24 2. ER IPsec strongSwan 환경설정을 검증합니다: :: sudo cat /etc/ipsec.conf # generated by /opt/vyatta/sbin/vpn-config.pl config setup conn %default        keyexchange=ikev1 conn peer-192.0.2.1-tunnel-1        left=203.0.113.1        right=192.0.2.1        leftsubnet=192.168.1.0/24        rightsubnet=172.16.1.0/24        ike=aes256-sha256-modp2048!        keyexchange=ikev1        ikelifetime=86400s        esp=aes128-md5!        keylife=43200s        rekeymargin=540s        type=tunnel        compress=no        authby=secret        auto=route        keyingtries=%forever #conn peer-192.0.2.1-tunnel-1 3. ER 외부 WAN 인터페이스를 통해서 수신하는 IKE 트래픽을 캡쳐합니다: :: sudo tcpdump -i eth0 -n udp dst port 500    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes IP 203.0.113.1.500 > 192.0.2.1.500: isakmp: phase 1 I ident IP 192.0.2.1.500 > 203.0.113.1.500: isakmp: phase 1 R ident IP 203.0.113.1.500 > 192.0.2.1.500: isakmp: phase 1 I ident[E] IP 192.0.2.1.500 > 203.0.113.1.500: isakmp: phase 1 R ident[E] IP 203.0.113.1.500 > 192.0.2.1.500: isakmp: phase 2/others I oakley-quick[E] IP 192.0.2.1.500 > 203.0.113.1.500: isakmp: phase 2/others R oakley-quick[E] |info_i_25x25.png| .. Note:: 실시간 캡쳐의 결과이므로 아무런 결과가 발견되지 않는다면 클라이언트가 트래픽을 생성하지 않거나 트래픽 업스트림이 차단당한 것일수도 있습니다. 4. ER IPsec VPN 로그를 확인합니다: :: sudo swanctl --log [KNL] creating acquire job for policy 192.168.1.10/32[icmp/8] === 172.16.1.10/32[icmp/8] with reqid {1} [IKE] initiating Main Mode IKE_SA peer-192.0.2.1-tunnel-1[1] to 192.0.2.1 [ENC] generating ID_PROT request 0 [ SA V V V V ] [NET] sending packet: from 203.0.113.1[500] to 192.0.2.1[500] (160 bytes) [NET] received packet: from 192.0.2.1[500] to 203.0.113.1[500] (108 bytes) [ENC] parsed ID_PROT response 0 [ SA V ] [IKE] received NAT-T (RFC 3947) vendor ID [ENC] generating ID_PROT request 0 [ KE No NAT-D NAT-D ] [ENC] parsed ID_PROT response 0 [ KE No V V V V NAT-D NAT-D ] [ENC] generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ] [ENC] parsed ID_PROT response 0 [ ID HASH ] [IKE] IKE_SA peer-192.0.2.1-tunnel-1[1] established between 203.0.113.1[203.0.113.1]...192.0.2.1[192.0.2.1] [ENC] generating QUICK_MODE request 561157166 [ HASH SA No ID ID ] [ENC] parsed QUICK_MODE response 561157166 [ HASH SA No ID ID N((24576)) ] [IKE] CHILD_SA peer-192.0.2.1-tunnel-1{1} established with SPIs cb321982_i 5d4174b1_o and TS 192.168.1.0/24 === 172.16.1.0/24 |info_i_25x25.png| .. Note:: 실시간 캡쳐 결과이므로 출력이 보이지 않는다면, 트래픽이 방화벽을 통해서 허용되었는지 확인하십시오. 다른 방법으로는 \ **show vpn log \| no-more**\ 명령어를 통해서 전체 IPsec 로그 히스토리를 확인할 수 있습니다. 5. IPsec 보안 설정을 확인하고 SRX의 통계치를 확인합니다: :: show security ike sa Index   State  Initiator cookie  Responder cookie  Mode           Remote Address    697909  UP     9e9c73d889be2378  abbed46436bd025b  Main           203.0.113.1      show security ike sa detail IKE peer 203.0.113.1, Index 2264724, Gateway Name: IKEGateway  Role: Responder, State: UP  Initiator cookie: 091c0d059ea7afbe, Responder cookie: baf3c7ea2c2f5016  Exchange type: Main, Authentication method: Pre-shared-keys  Local: 192.0.2.1:500, Remote: 203.0.113.1:500  Lifetime: Expires in 86206 seconds  Peer ike-id: 203.0.113.1  Xauth assigned IP: 0.0.0.0  Algorithms:   Authentication        : hmac-sha256-128   Encryption            : aes256-cbc   Pseudo random function: hmac-sha256   Diffie-Hellman group  : DH-group-14  Traffic statistics:   Input  bytes  :                  928   Output bytes  :                  788   Input  packets:                    5   Output packets:                    4  Flags: IKE SA is created  IPSec security associations: 1 created, 0 deleted  Phase 2 negotiations in progress: 0    Negotiation type: Quick mode, Role: Responder, Message ID: 0    Local: 192.0.2.1:500, Remote: 203.0.113.1:500    Local identity: 192.0.2.1               Remote identity: 203.0.113.1    Flags: IKE SA is created show security ipsec sa  Total active tunnels: 1  ID    Algorithm       SPI      Life:sec/kb  Mon lsys Port  Gateway     <2    ESP:aes-cbc-128/md5 14ce38b 42981/unlim -  root 500   203.0.113.1       >2    ESP:aes-cbc-128/md5 cf29ade9 42981/unlim - root 500   203.0.113.1 show security ipsec sa detail  ID: 2 Virtual-system: root, VPN Name: IPsec  Local Gateway: 192.0.2.1, Remote Gateway: 203.0.113.1  Local Identity: ipv4_subnet(any:0,[0..7]=172.16.1.0/24)  Remote Identity: ipv4_subnet(any:0,[0..7]=192.168.1.0/24)  Version: IKEv1    DF-bit: clear    Policy-name: trust-to-ipsec  Port: 500, Nego#: 1, Fail#: 0, Def-Del#: 0 Flag: 0x600829  Last Tunnel Down Reason: SA not initiated    Direction: inbound, SPI: 14ce38b, AUX-SPI: 0                              , VPN Monitoring: -    Hard lifetime: Expires in 42965 seconds    Lifesize Remaining:  Unlimited    Soft lifetime: Expires in 42376 seconds    Mode: Tunnel(0 0), Type: dynamic, State: installed    Protocol: ESP, Authentication: hmac-md5-96, Encryption: aes-cbc (128 bits)    Anti-replay service: counter-based enabled, Replay window size: 64     Direction: outbound, SPI: cf29ade9, AUX-SPI: 0                              , VPN Monitoring: -    Hard lifetime: Expires in 42965 seconds    Lifesize Remaining:  Unlimited    Soft lifetime: Expires in 42376 seconds    Mode: Tunnel(0 0), Type: dynamic, State: installed    Protocol: ESP, Authentication: hmac-md5-96, Encryption: aes-cbc (128 bits)    Anti-replay service: counter-based enabled, Replay window size: 64  show security ipsec statistics    ESP Statistics:  Encrypted bytes:              360  Decrypted bytes:              180  Encrypted packets:              3  Decrypted packets:              3 AH Statistics:  Input bytes:                    0  Output bytes:                   0  Input packets:                  0  Output packets:                 0 Errors:  AH authentication failures: 0, Replay errors: 0  ESP authentication failures: 0, ESP decryption failures: 0  Bad headers: 0, Bad trailers: 0 6. SRX의 보안 정책을 확인합니다: :: show security policies detail                                     Policy: trust-to-ipsec, action-type: permit, State: enabled, Index: 5, Scope Policy: 0  Policy Type: Configured  Sequence number: 1  From zone: trust, To zone: untrust  Source addresses:                         local(global): 172.16.1.0/24  Destination addresses:    remote(global): 192.168.1.0/24  Application: any    IP protocol: 0, ALG: 0, Inactivity timeout: 0      Source port range: [0-0]      Destination port range: [0-0]  Per policy TCP Options: SYN check: No, SEQ check: No  Tunnel: IPsec, Type: IPSec, Index: 2    Pair policy: ipsec-to-trust Policy: ipsec-to-trust, action-type: permit, State: enabled, Index: 7, Scope Policy: 0  Policy Type: Configured  Sequence number: 1  From zone: untrust, To zone: trust  Source addresses:    remote(global): 192.168.1.0/24  Destination addresses:    local(global): 172.16.1.0/24  Application: any    IP protocol: 0, ALG: 0, Inactivity timeout: 0      Source port range: [0-0]      Destination port range: [0-0]  Per policy TCP Options: SYN check: No, SEQ check: No  Tunnel: IPsec, Type: IPSec, Index: 2    Pair policy: trust-to-ipsec 7. SRX의 IKE 로그를 분석합니다: :: file show /var/log/ike.log Successfully added SA Config iked_pm_ike_spd_notify_request: Sending Initial contact ssh_ike_connect: Start, remote_name = 203.0.113.1:500, xchg = 2, flags = 00090000 ike_init_isakmp_sa: Start, remote = 203.0.113.1:500, initiator = 1 ike_find_pre_shared_key: Find pre shared key key for 192.0.2.1:500, id = No Id -> 203.0.113.1:500, id = No Id ikev2_fb_qm_local_id: Using ipv4_subnet(any:0,[0..7]=172.16.1.0/24) as local QM identity ikev2_fb_qm_remote_id: Using ipv4_subnet(any:0,[0..7]=192.168.1.0/24) as remote QM identity ike_send_notify: Connected, SA = { 9e9c73d8 89be2378 - abbed464 36bd025b}, nego = -1 iked_pm_ike_sa_done: local:192.0.2.1, remote:203.0.113.1 IKEv1 IKE negotiation done for local:192.0.2.1, remote:203.0.113.1 IKEv1 with status: Error ok Added (spi=0x86968a35, protocol=0) entry to the spi table Added (spi=0x630753c, protocol=0) entry to the spi table Added (spi=0x86968a35, protocol=ESP dst=192.0.2.1) entry to the peer hash table Added (spi=0xcad56e88, protocol=ESP dst=203.0.113.1) entry to the peer hash table Successfully added ipsec SA PAIR IPSec  negotiation done successfully for SA-CFG IPsec for local:192.0.2.1, remote:203.0.113.1  IKEv1 8. Server1 과 Host1사이에 터널을 통해 트래픽을 전송해봅니다: :: ping 192.168.1.10 PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_seq=1 ttl=63 time=45.9 ms 64 bytes from 192.168.1.10: icmp_seq=2 ttl=63 time=45.2 ms 64 bytes from 192.168.1.10: icmp_seq=3 ttl=63 time=45.5 ms ping 172.16.1.10 PING 172.16.1.10 (172.16.1.10) 56(84) bytes of data. 64 bytes from 172.16.1.10: icmp_seq=1 ttl=63 time=43.9 ms 64 bytes from 172.16.1.10: icmp_seq=2 ttl=63 time=44.1 ms 64 bytes from 172.16.1.10: icmp_seq=3 ttl=63 time=44.4 ms -------------- 관련 문서 -------------- `맨위로 가기 <#top>`__ - `EdgeRouter - 하드웨어 오프로딩 `__ - `네트워킹 개론 - SSH로 커넥션을 생성하는 방법 `__ .. |book_25x25.png| image:: /hc/article_attachments/115018324647/book_25x25.png .. |image1| image:: /hc/article_attachments/115018331227/mceclip0.png .. |CLI_circle.png| image:: /hc/article_attachments/115018326227/CLI_circle.png .. |info_i_25x25.png| image:: /hc/article_attachments/115018420768/info_i_25x25.png