Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.6.7. IKEv2 원격 액세스 VPN Libreswan 구성
Horizon 전사에서는 랩탑과 같은 동적으로 할당된
IP
주소를 사용하는 모바일 클라이언트를 대상으로 사용자를 이동할 수 있습니다. 인증서는 인증서를 사용하여 인증됩니다. 이전 IKEv1 XAUTH 프로토콜을 사용하지 않도록 하려면 다음 예제에서 IKEv2를 사용합니다.
서버에서 다음을 수행합니다.
conn roadwarriors ikev2=insist # Support (roaming) MOBIKE clients (RFC 4555) mobike=yes fragmentation=yes left=1.2.3.4 # if access to the LAN is given, enable this, otherwise use 0.0.0.0/0 # leftsubnet=10.10.0.0/16 leftsubnet=0.0.0.0/0 leftcert=vpn-server.example.com leftid=%fromcert leftxauthserver=yes leftmodecfgserver=yes right=%any # trust our own Certificate Agency rightca=%same # pick an IP address pool to assign to remote users # 100.64.0.0/16 prevents RFC1918 clashes when remote users are behind NAT rightaddresspool=100.64.13.100-100.64.13.254 # if you want remote clients to use some local DNS zones and servers modecfgdns="1.2.3.4, 5.6.7.8" modecfgdomains="internal.company.com, corp" rightxauthclient=yes rightmodecfgclient=yes authby=rsasig # optionally, run the client X.509 ID through pam to allow/deny client # pam-authorize=yes # load connection, don't initiate auto=add # kill vanished roadwarriors dpddelay=1m dpdtimeout=5m dpdaction=%clear
다음과 같습니다.
left=1.2.3.4
- 1.2.3.4 값은 서버의 실제 IP 주소 또는 호스트 이름을 지정합니다.
leftcert=vpn-server.example.com
- 이 옵션은 인증서를 가져오는 데 사용된 친숙한 이름 또는 닉네임을 참조하는 인증서를 지정합니다. 일반적으로 이름은
.p12
파일 형식으로 PKCS #12 인증서 번들의 일부로 생성됩니다. 자세한 내용은pkcs12(1)
및pk12util(1)
매뉴얼 페이지를 참조하십시오.
모바일 클라이언트에서 도로 전사의 장치는 이전 설정의 약간의 변형을 사용합니다.
conn to-vpn-server ikev2=insist # pick up our dynamic IP left=%defaultroute leftsubnet=0.0.0.0/0 leftcert=myname.example.com leftid=%fromcert leftmodecfgclient=yes # right can also be a DNS hostname right=1.2.3.4 # if access to the remote LAN is required, enable this, otherwise use 0.0.0.0/0 # rightsubnet=10.10.0.0/16 rightsubnet=0.0.0.0/0 # trust our own Certificate Agency rightca=%same authby=rsasig # allow narrowing to the server’s suggested assigned IP and remote subnet narrowing=yes # Support (roaming) MOBIKE clients (RFC 4555) mobike=yes # Initiate connection auto=start
다음과 같습니다.
auto=start
- 이 옵션을 사용하면
ipsec
시스템 서비스가 시작될 때마다 VPN에 연결할 수 있습니다. 나중에 연결을 설정하려는 경우auto=add
로 바꿉니다.