diff options
Diffstat (limited to 'docs/configuration/vpn/ipsec.rst')
-rw-r--r-- | docs/configuration/vpn/ipsec.rst | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/docs/configuration/vpn/ipsec.rst b/docs/configuration/vpn/ipsec.rst index c1ec645f..08282a44 100644 --- a/docs/configuration/vpn/ipsec.rst +++ b/docs/configuration/vpn/ipsec.rst @@ -13,10 +13,10 @@ address, which makes it easier to setup static routes or use dynamic routing protocols without having to modify IPsec policies. The other advantage is that it greatly simplifies router to router communication, which can be tricky with plain IPsec because the external outgoing address of the router usually doesn't -match the IPsec policy of typical site-to-site setup and you need to add special -configuration for it, or adjust the source address for outgoing traffic of your -applications. GRE/IPsec has no such problem and is completely transparent for -the applications. +match the IPsec policy of a typical site-to-site setup and you would need to +add special configuration for it, or adjust the source address of the outgoing +traffic of your applications. GRE/IPsec has no such problem and is completely +transparent for applications. GRE/IPIP/SIT and IPsec are widely accepted standards, which make this scheme easy to implement between VyOS and virtually any other router. @@ -163,13 +163,29 @@ Options (Global IPsec settings) Attributes * ``options`` - * ``disable-route-autoinstall`` Do not automatically install routes to remote networks; - - * ``flexvpn`` Allows FlexVPN vendor ID payload (IKEv2 only). Send the Cisco FlexVPN vendor ID payload (IKEv2 only), which is required in order to make Cisco brand devices allow negotiating a local traffic selector (from strongSwan's point of view) that is not the assigned virtual IP address if such an address is requested by strongSwan. Sending the Cisco FlexVPN vendor ID prevents the peer from narrowing the initiator's local traffic selector and allows it to e.g. negotiate a TS of 0.0.0.0/0 == 0.0.0.0/0 instead. This has been tested with a "tunnel mode ipsec ipv4" Cisco template but should also work for GRE encapsulation; - - * ``interface`` Interface Name to use. The name of the interface on which virtual IP addresses should be installed. If not specified the addresses will be installed on the outbound interface; - - * ``virtual-ip`` Allows to install virtual-ip addresses. Comma separated list of virtual IPs to request in IKEv2 configuration payloads or IKEv1 Mode Config. The wildcard addresses 0.0.0.0 and :: request an arbitrary address, specific addresses may be defined. The responder may return a different address, though, or none at all. Define the ``virtual-address`` option to configure the IP address in site-to-site hierarchy. + * ``disable-route-autoinstall`` Do not automatically install routes to remote + networks; + + * ``flexvpn`` Allows FlexVPN vendor ID payload (IKEv2 only). Send the Cisco + FlexVPN vendor ID payload (IKEv2 only), which is required in order to make + Cisco brand devices allow negotiating a local traffic selector (from + strongSwan's point of view) that is not the assigned virtual IP address if + such an address is requested by strongSwan. Sending the Cisco FlexVPN + vendor ID prevents the peer from narrowing the initiator's local traffic + selector and allows it to e.g. negotiate a TS of 0.0.0.0/0 == 0.0.0.0/0 + instead. This has been tested with a "tunnel mode ipsec ipv4" Cisco + template but should also work for GRE encapsulation; + + * ``interface`` Interface Name to use. The name of the interface on which + virtual IP addresses should be installed. If not specified the addresses + will be installed on the outbound interface; + + * ``virtual-ip`` Allows the installation of virtual-ip addresses. A comma + separated list of virtual IPs to request in IKEv2 configuration payloads or + IKEv1 Mode Config. The wildcard addresses 0.0.0.0 and :: request an + arbitrary address, specific addresses may be defined. The responder may + return a different address, or none at all. Define the ``virtual-address`` + option to configure the IP address in a site-to-site hierarchy. ************************* IPsec policy matching GRE @@ -372,8 +388,8 @@ IKEv2 IPSec road-warriors remote-access VPN ******************************************* Internet Key Exchange version 2, IKEv2 for short, is a request/response -protocol developed by both Cisco and Microsoft. It is used to establish -and secure IPv4/IPv6 connections, be it a site-to-site VPN or from a +protocol developed by both Cisco and Microsoft. It is used to establish and +secure IPv4/IPv6 connections, be it a site-to-site VPN or from a road-warrior connecting to a hub site. IKEv2, when run in point-to-multipoint, or remote-access/road-warrior mode, secures the server-side with another layer by using an x509 signed server certificate. @@ -396,11 +412,11 @@ This example uses CACert as certificate authority. set pki ca CAcert_Class_3_Root certificate 'MIIGPTCCBCWgAwIBAgIDFOIoMA0GCSqGSIb3DQEBDQUAMHkxEDAOBgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dG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26aqyWPaIdc8E4ck7Sk08WrFrHIK3EHr4n1FZwmLpFAvucKqgl0hr+2jypyh5puA3KksHF3CsUzjMUvzxMhykh9zrMxQAHLBVrGwc=' -After you obtained your server certificate you can import it from a file -on the local filesystem, or paste it into the CLI. Please note that -when entering the certificate manually you need to strip the -``-----BEGIN KEY-----`` and ``-----END KEY-----`` tags. Also, the certificate -or key needs to be presented in a single line without line breaks (``\n``). +After you obtain your server certificate you can import it from a file on the +local filesystem, or paste it into the CLI. Please note that when entering the +certificate manually you need to strip the ``-----BEGIN KEY-----`` and +``-----END KEY-----`` tags. Also, the certificate or key needs to be presented +in a single line without line breaks (``\n``). To import it from the filesystem use: @@ -440,7 +456,7 @@ Every connection/remote-access pool we configure also needs a pool where we can draw our client IP addresses from. We provide one IPv4 and IPv6 pool. Authorized clients will receive an IPv4 address from the 192.0.2.128/25 prefix and an IPv6 address from the 2001:db8:2000::/64 prefix. We can also send some -DNS nameservers down to our clients used on their connection. +DNS nameservers down for our clients to use with their connection. .. code-block:: @@ -450,8 +466,8 @@ DNS nameservers down to our clients used on their connection. set vpn ipsec remote-access pool ra-rw-ipv6 prefix '2001:db8:2000::/64' VyOS supports multiple IKEv2 remote-access connections. Every connection can -have its dedicated IKE/ESP ciphers, certificates or local listen address for -e.g. inbound load balancing. +have its own dedicated IKE/ESP ciphers, certificates or local listen address +for e.g. inbound load balancing. We configure a new connection named ``rw`` for road-warrior, that identifies itself as ``192.0.2.1`` to the clients and uses the ``vyos`` certificate |