Oracle® Solaris 11.2의 네트워크 보안

인쇄 보기 종료

업데이트 날짜: 2014년 8월
 
 

미리 공유한 키로 IKEv2를 구성하는 방법

이 절차에서는 시스템 이름을 enigmapartym으로 바꿉니다. IKE 끝점을 모두 구성합니다.

시작하기 전에

Network IPsec Management 권한 프로파일에 지정된 관리자여야 합니다. 프로파일 셸에서 입력해야 합니다. 자세한 내용은 Oracle Solaris 11.2의 사용자 및 프로세스 보안 의 지정된 관리 권한 사용을 참조하십시오.

원격으로 관리하는 경우 Example 7–1Oracle Solaris 11.2의 보안 셸 액세스 관리 의 보안 셸을 사용하여 ZFS를 원격으로 관리하는 방법에서 보안 원격 로그인 지침을 참조하십시오.

  1. 각 시스템에서 /etc/inet/ike/ikev2.config 파일을 편집합니다.
    # pfedit /etc/inet/ike/ikev2.config
  2. 파일에서 미리 공유한 키를 사용하는 규칙을 만듭니다.

    주 -  키는 Step 4에서 만듭니다.

    이 파일의 규칙 및 전역 매개변수는 시스템의 ipsecinit.conf 파일에 있는 IPsec 정책의 키를 관리해야 합니다. 다음 IKEv2 구성 예에서는 IPsec을 사용하여 두 서버 간의 네트워크 트래픽을 보호하는 방법에 있는 ipsecinit.conf 예의 키를 관리합니다.

    1. 예를 들어 enigma 시스템에서 ikev2.config 파일을 수정합니다.

      주 - 이 예에서는 전역 매개변수 섹션의 변환 두 가지를 보여줍니다. 이러한 변환 중 하나로 피어를 구성할 수 있습니다. 특정 변환을 요청하려면 해당 변환을 규칙에 포함하십시오.
      ### ikev2.config file on enigma, 192.168.116.16
      
      ## Global parameters
      # This default value will apply to all transforms that follow
      #
      ikesa_lifetime_secs 3600
      #
      # Global transform definitions.  The algorithm choices are
      # based on RFC 4921.
      #
      ## Two transforms are acceptable to this system, Group 20 and Group 19.
      ## A peer can be configured with 19 or 20.
      ## To ensure that a particular peer uses a specific transform,
      ## include the transform in the rule.
      ## 
      # Group 20 is 384-bit ECP - Elliptic Curve over Prime
      ikesa_xform { encr_alg aes(256..256) auth_alg sha384 dh_group 20 }
      # Group 19 is 256-bit ECP
      ikesa_xform { encr_alg aes(128..128) auth_alg sha256 dh_group 19 }
      #
      ## The rule to communicate with partym
      ##  Label must be unique
      { label "enigma-partym"
        auth_method preshared
        local_addr  192.168.116.16
        remote_addr 192.168.13.213
      }
    2. partym 시스템에서 ikev2.config 파일을 수정합니다.
      ## ikev2.config file on partym, 192.168.13.213
      ## Global Parameters
      #
      ...
      ikesa_xform { encr_alg aes(256..256) auth_alg sha384 dh_group 20 }
      ikesa_xform { encr_alg aes(128..128) auth_alg sha256 dh_group 19 }
      ...
      ## The rule to communicate with enigma
      ##  Label must be unique
      { label "partym-enigma"
        auth_method preshared
        local_addr  192.168.13.213
        remote_addr 192.168.116.16
      }
  3. 각 시스템에서 파일의 구문을 확인합니다.
    # /usr/lib/inet/in.ikev2d -c
  4. 각 시스템에서 미리 공유한 키를 /etc/inet/ike/ikev2.preshared 파일에 넣습니다.

    Caution

    주의  -  이 파일은 사용 권한이 특수하며 ikeuser가 소유합니다. 이 파일을 삭제하거나 대체하지 마십시오. 대신, pfedit 명령으로 내용을 편집하여 파일의 원래 등록 정보가 유지되도록 하십시오.


    1. 예를 들어, enigma 시스템에서 ikev2.preshared 파일은 다음과 유사하게 표시됩니다.
      # pfedit -s /etc/inet/ike/ikev2.preshared
      ## ikev2.preshared on enigma, 192.168.116.16
      #…
      ## label must match the rule that uses this key
      { label "enigma-partym"
      ## The preshared key can also be represented in hex
      ## as in 0xf47cb0f432e14480951095f82b
         key "This is an ASCII Cqret phrAz, use str0ng p@ssword tekniques"
      }

      pfedit 명령의 옵션에 대한 자세한 내용은 pfedit(1M) 매뉴얼 페이지를 참조하십시오.

    2. partym 시스템에서 ikev2.preshared 파일은 고유한 레이블을 제외하고는 다음과 유사합니다.
      ## ikev2.preshared on partym, 192.168.13.213
      #…
      ## label must match the label of the rule that uses this key
      { label "partym-enigma"
      ## The preshared key can also be represented in hex
      ## as in 0xf47cb0f432e14480951095f82b
      	key "This is an ASCII Cqret phrAz, use str0ng p@ssword tekniques"
      	}
  5. IKEv2 서비스 인스턴스를 사용으로 설정합니다.
    # svcadm enable ipsec/ike:ikev2

    미리 공유한 키를 대체할 경우 피어 시스템에서 미리 공유한 키 파일을 편집하고 ikev2 서비스를 다시 시작합니다.

    # svcadm restart ikev2
예 9-1  다른 로컬 및 원격 IKEv2 미리 공유한 키 사용

이 예에서는 IKEv2 관리자가 시스템별로 미리 공유한 키를 만들고, 키를 교환하고, 각 키를 미리 공유한 키 파일에 추가합니다. 미리 공유한 키 항목의 레이블은 ikev2.config 파일에 있는 규칙의 레이블과 일치합니다. 그런 다음 in.ikev2d 데몬을 다시 시작합니다.

다른 시스템의 미리 공유한 키를 수신한 후 관리자는 ikev2.preshared 파일을 편집합니다. partym의 파일은 다음과 같습니다.

# pfedit -s /etc/inet/ike/ikev2.preshared
#…
{ label "partym-enigma"
## local and remote preshared keys 
local_key  "P-LongISH key Th@t m^st Be Ch*angEd \'reguLarLy)"
remote_key "E-CHaNge lEyeGhtB+lBs et KeeS b4 2LoOoOoOoOng"
}

따라서 enigmaikev2.preshared 키 파일은 다음과 같아야 합니다.

#…
{ label "enigma-partym"
## local and remote preshared keys 
local_key  "E-CHaNge lEyeGhtB+lBs et KeeS b4 2LoOoOoOoOng"
remote_key "P-LongISH key Th@t m^st Be Ch*angEd \'reguLarLy)"
}

관리자가 각 시스템에서 IKEv2 서비스 인스턴스를 다시 시작합니다.

# svcadm restart ikev2

다음 단계

IPsec 정책 설정을 완료하지 않았으면 IPsec 정책을 사용으로 설정하거나 새로 고치는 IPsec 절차로 돌아가십시오. VPN을 보호하는 IPsec 정책의 예는 IPsec를 사용하여 VPN 보호를 참조하십시오. 다른 IPsec 정책 예는 IPsec을 사용하여 두 서버 간의 네트워크 트래픽을 보호하는 방법을 참조하십시오.

더 많은 예는 ikev2.config(4)ikev2.preshared(4) 매뉴얼 페이지를 참조하십시오.