VPN 관련 작업

이 항목에서는 두 사이트 간 라우트 기반 IPSec VPN에 대한 샘플 구성에 대해 자세히 설명합니다. 이 샘플 구성에서 서버 1(사이트 A)은 서버 2(사이트 B)와 통신할 수 있으며, 각 사이트는 2단계 IPSEC 인증을 사용합니다.

사이트 간 VPN
사이트 간 VPN

IPSec VPN 터널을 설정할 때, vSRX의 기본 공인 IP를 IKE 게이트웨이 로컬 주소로 사용하는 것이 일반적입니다. 그러나 먼저 공용 고정 서브넷/IP 주문 을 vSRX의 기본 공인 IP로 라우팅하는 것이 좋습니다. 그런 다음 해당 IP 주소를 IKE 게이트웨이 로컬 주소로 사용해야 합니다. 그런 다음 IPSev VPN 터널을 마이그레이션해야 하는 경우, IP 주소를 유지한 채 다른 게이트웨이 어플라이언스로 라우팅할 수 있습니다.

vSRX 또는 게이트웨이 어플라이언스의 기본 IP를 다른 어플라이언스로 마이그레이션하는 것은 지원되지 않지만, 동일한 데이터센터 내에서는 보조 고정 서브넷 마이그레이션하기 마이그레이션이 지원됩니다.

사이트 A(달라스)를 위한 샘플 구성:

# show security address-book global address Network-A
10.84.237.200/29;
[edit]
# show security address-book global address Network-B
10.45.53.48/29;
# show security ike
proposal IKE-PROP {
    authentication-method pre-shared-keys;
    dh-group group5;
    authentication-algorithm sha1;
    encryption-algorithm aes-128-cbc;
    lifetime-seconds 3600;
}
policy IKE-POL {
    mode main;
    proposals IKE-PROP;
    pre-shared-key ascii-text "$9$ewkMLNs2aikPdbkP5Q9CKM8"; ## SECRET-DATA
}
gateway IKE-GW {
    ike-policy IKE-POL;
    address 158.100.100.100;
    external-interface ge-0/0/1.0;
}
# show security ipsec
proposal IPSEC-PROP {
    protocol esp;
    authentication-algorithm hmac-sha1-96;
    encryption-algorithm aes-128-cbc;
    lifetime-seconds 3600;
}
policy IPSEC-POL {
    perfect-forward-secrecy {
        keys group5;
    }
    proposals IPSEC-PROP;
}
vpn IPSEC-VPN {
    bind-interface st0.1;
    vpn-monitor;
    ike {
        gateway IKE-GW;
        ipsec-policy IPSEC-POL;
    }
    establish-tunnels immediately;
}
# show interfaces
ge-0/0/0 {
    description PRIVATE_VLANs;
    flexible-vlan-tagging;
    native-vlan-id 1121;
    unit 0 {
        vlan-id 1121;
        family inet {
            address 10.184.108.158/26;
        }
    }
    unit 10 {
        vlan-id 1811;
        family inet {
            address 10.184.237.201/29;
        }
    }
    unit 20 {
        vlan-id 1812;
        family inet {
            address 10.185.48.9/29;
        }
    }
}
st0 {
    unit 1 {
        family inet {
            address 169.254.200.0/31;
        }
    }
# show security policies
from-zone CUSTOMER-PRIVATE to-zone VPN {
    policy Custprivate-to-VPN {
        match {
            source-address any;
            destination-address Network-B;
            application any;
        }
        then {
            permit;
        }
    }
}
from-zone VPN to-zone CUSTOMER-PRIVATE {
    policy VPN-to-Custprivate {
        match {
            source-address Network-B;
            destination-address any;
            application any;
        }
        then {
            permit;
        }
    }

사이트 B(런던)를 위한 샘플 구성:

# show interfaces
ge-0/0/0 {
    description PRIVATE_VLANs;
    flexible-vlan-tagging;
    native-vlan-id 822;
    unit 0 {
        vlan-id 822;
        family inet {
            address 10.45.165.140/26;
        }
    }
    unit 10 {
        vlan-id 821;
        family inet {
            address 10.45.53.49/29;
        }
    }
}
st0 {
    unit 1 {
        family inet {
            address 169.254.200.1/31;
        }
    }
# show security ike
proposal IKE-PROP {
    authentication-method pre-shared-keys;
    dh-group group5;
    authentication-algorithm sha1;
    encryption-algorithm aes-128-cbc;
    lifetime-seconds 3600;
}
policy IKE-POL {
    mode main;
    proposals IKE-PROP;
    pre-shared-key ascii-text "$9$H.fz9A0hSe36SevW-dk.P"; ## SECRET-DATA
}
gateway IKE-GW {
    ike-policy IKE-POL;
    address 169.100.100.100;
    external-interface ge-0/0/1.0;
}
# show security ipsec
proposal IPSEC-PROP {
    protocol esp;
    authentication-algorithm hmac-sha1-96;
    encryption-algorithm aes-128-cbc;
    lifetime-seconds 3600;
}
policy IPSEC-POL {
    perfect-forward-secrecy {
        keys group5;
    }
    proposals IPSEC-PROP;
}
vpn IPSEC-VPN {
    bind-interface st0.1;
    vpn-monitor;
    ike {
        gateway IKE-GW;
        ipsec-policy IPSEC-POL;
    }
    establish-tunnels immediately;
}
# show security zone security-zone CUSTOMER_PRIVATE
security-zone CUSTOMER-PRIVATE {
    interfaces {
        ge-0/0/0.10 {
            host-inbound-traffic {
                system-services {
                    all;
                }
            }
        }
    }
}
security-zone VPN {
    interfaces {
        st0.1;
    }
}
# show security policies from-zone CUSTOMER-PRIVATE to-zone VPN
policy Custprivate-to-VPN {
    match {
        source-address any;
        destination-address Network-A;
        application any;
    }
    then {
        permit;
    }
}
 # show security zones security-zone VPN
interfaces {
    st0.1;
}
# show security policies from-zone VPN to-zone CUSTOMER-PRIVATE
policy VPN-to-Custprivate {
    match {
        source-address Network-A;
        destination-address any;
        application any;
    }
    then {
        permit;
    }
}

성능 고려사항

최상의 IPSEC VPN 성능을 달성하려면 모든 IKE 및 IPSEC 제안에 암호화 알고리즘으로서 AES-GCM을 사용하십시오.

예를 들어, 다음과 같습니다.

set security ike proposal IKE-PROP encryption-algorithm aes-128-gcm
set security ipsec proposal IPSEC-PROP encryption-algorithm aes-128-gcm

암호화 알고리즘으로서 AES-GCM을 사용하면 동일한 제안에 인증 알고리즘을 지정할 필요가 없습니다. AES-GCM은 암호화 및 인증을 모두 제공합니다.

문제 해결 명령

#show phase 1 status:
show security ike sa

#show phase 2 status:
show security ipsec sa

#show information for any inactive/erroring tunnels
show security ipsec inactive-tunnels

#send ipsec logs to file kmd-logs:
set system syslog file kmd-logs daemon info
set system syslog file kmd-logs match KMD

#show the contents of the log file created above:
show log kmd-logs

#enabling debug logging and viewing those logs
show security ike debug-status
request security ike debug-enable local <local-ip-address> remote <remote-ip-address> level <1-15>
show log kmd

#disable debug logging - this is important for avoiding performance issues
request security ike debug-disable

문제 해결 명령의 예

admin@siferg0-vsrx-vsrx-vSRX> show security ike sa
node0:
--------------------------------------------------------------------------
Index   State  Initiator cookie  Responder cookie  Mode           Remote Address
2859401 UP     f514114a799925fe  f8de58a2690993d7  IKEv2          128.168.104.229

admin@siferg0-vsrx-vsrx-vSRX> show security ipsec sa
node0:
--------------------------------------------------------------------------
  Total active tunnels: 1     Total Ipsec sas: 1
  ID    Algorithm       SPI      Life:sec/kb  Mon lsys Port  Gateway
  <131073 ESP:aes-gcm-128/None ec78f80e 2528/ unlim - root 500 128.168.104.229
  >131073 ESP:aes-gcm-128/None c674a8ac 2528/ unlim - root 500 128.168.104.229

{primary:node0}

admin@siferg0-vsrx-vsrx-vSRX> show security ipsec inactive-tunnels
node0:
--------------------------------------------------------------------------
  Total inactive tunnels: 0
  Total inactive tunnels with establish immediately: 0

{primary:node0}
admin@siferg0-vsrx-vsrx-vSRX> show security ike security-associations
node0:
--------------------------------------------------------------------------
Index   State  Initiator cookie  Responder cookie  Mode           Remote Address
2859309 DOWN   e7753a11ff890094  0000000000000000  IKEv2          128.168.104.229

{primary:node0}
admin@sifergu0-vsrx-vsrx-vSRX> show security ipsec inactive-tunnels
node0:
--------------------------------------------------------------------------
  Total inactive tunnels: 1
  Total inactive tunnels with establish immediately: 1
  ID           Port   Gateway          Pending SAs   Tunnel Down Reason
  131073       500    128.168.104.229  1             No response from peer. Negotiation failed (130 times)

{primary:node0}

추가 VPN 구성

사이트 간, 원격 액세스 VPN 및 기타 기능을 구성하려면 주니퍼에서 제공하는 이 구성 가이드를 참조하세요.

경로 기반 사이트 대 사이트를 구성하는 방법에 대한 예제 IPSec VPN는 주니퍼에서 제공하는 이 구성 가이드을 참조하세요.