Difference between revisions of "Template:Networking rut2xx manual vpn ipsec"
Gytispieze (talk | contribs) |
(Created page with "==IPsec== To create a new IPsec instance, go to the <i>Services → VPN → IPsec</i> section, enter a custom name and click "Add". An IPsec instance with the given name will...") |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 9: | Line 9: | ||
The <b>IPsec configuration</b> section is used to configure the main parameters of an IPsec connection. Refer to the figure and table below for information on the configuration fields located in the general settings section. | The <b>IPsec configuration</b> section is used to configure the main parameters of an IPsec connection. Refer to the figure and table below for information on the configuration fields located in the general settings section. | ||
− | [[File:{{{file_ipsec_config}}} | + | [[File:{{{file_ipsec_config}}}]] |
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
Line 20: | Line 20: | ||
<td>Enable</td> | <td>Enable</td> | ||
<td>yes | no; default: <b>no</b></td> | <td>yes | no; default: <b>no</b></td> | ||
− | <td>Turns the IPsec instance on or off</td> | + | <td>Turns the IPsec instance on or off.</td> |
</tr> | </tr> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<tr> | <tr> | ||
<td>IKE version</td> | <td>IKE version</td> | ||
<td>IKEv1 | IKEv2; default: <b>IKEv1</b></td> | <td>IKEv1 | IKEv2; default: <b>IKEv1</b></td> | ||
− | <td>Internet Key Exchange (IKE) version used for key exchange | + | <td>Internet Key Exchange (IKE) version used for key exchange. |
<ul> | <ul> | ||
<li><b>IKEv1</b> - more commonly used but contains known issues, for example, dealing with NAT.</li> | <li><b>IKEv1</b> - more commonly used but contains known issues, for example, dealing with NAT.</li> | ||
− | <li><b>IKEv2</b> - updated version with increased and improved capabilities, such as integrated NAT support, supported multihosting, deprecated exchange modes (does not use main or aggressive mode; only 4 messages required to establish a connection)</li> | + | <li><b>IKEv2</b> - updated version with increased and improved capabilities, such as integrated NAT support, supported multihosting, deprecated exchange modes (does not use main or aggressive mode; only 4 messages required to establish a connection).</li> |
</ul> | </ul> | ||
</td> | </td> | ||
Line 75: | Line 38: | ||
<ul> | <ul> | ||
<li><b>Main</b> - performs three two-way exchanges between the initiator and the receiver (a total of 9 messages).</li> | <li><b>Main</b> - performs three two-way exchanges between the initiator and the receiver (a total of 9 messages).</li> | ||
− | <li><b>Aggressive</b> - performs fewer exchanges than main mode (a total of 6 messages) by storing most data into the first exchange. In aggressive mode, the information is exchanged before there is a secure channel, making it less secure but faster than main mode</li> | + | <li><b>Aggressive</b> - performs fewer exchanges than main mode (a total of 6 messages) by storing most data into the first exchange. In aggressive mode, the information is exchanged before there is a secure channel, making it less secure but faster than main mode.</li> |
</ul> | </ul> | ||
</td> | </td> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 103: | Line 51: | ||
</ul> | </ul> | ||
</td> | </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>My identifier type</td> | ||
+ | <td>FQDN | User FQDN | Address; default: <b>FQDN</b></td> | ||
+ | <td>Defines the type of identity used in user (IPsec instance) authentication. | ||
+ | <ul> | ||
+ | <li><b>FQDN</b> - identity defined by fully qualified domain name. It is the complete domain name for a host (for example, <i>something.somedomain.com</i>). Only supported with IKEv2.</li> | ||
+ | <li><b>User FQDN</b> - identity defined by fully qualified username string (for example, <i>[email protected]</i>). Only supported with IKEv2.</li> | ||
+ | <li><b>Address</b> - identity by IP address.</li> | ||
+ | </ul> | ||
+ | </td> | ||
+ | </tr> | ||
<tr> | <tr> | ||
<td>On startup</td> | <td>On startup</td> | ||
Line 108: | Line 68: | ||
<td>Defines how the instance should act on router startup. | <td>Defines how the instance should act on router startup. | ||
<ul> | <ul> | ||
+ | <li><b>Ignore</b> - does not start the tunnel.</li> | ||
<li><b>Add</b> - loads a connection without starting it.</li> | <li><b>Add</b> - loads a connection without starting it.</li> | ||
<li><b>Route</b> - starts the tunnel only if there is traffic.</li> | <li><b>Route</b> - starts the tunnel only if there is traffic.</li> | ||
Line 152: | Line 113: | ||
<td>Remote VPN endpoint</td> | <td>Remote VPN endpoint</td> | ||
<td>host | ip; default: <b>none</b></td> | <td>host | ip; default: <b>none</b></td> | ||
− | <td>IP address or hostname of the remote IPsec instance</td> | + | <td>IP address or hostname of the remote IPsec instance.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | + | <td><span style="color: red;">Tunnel:</span> Remote IP address/subnet mask</td> | |
− | + | <td>ip/netmask; default: <b>none</b></td> | |
− | + | <td>Remote network IP address and subnet mask used to determine which part of the network can be accessed in the VPN network. Netmask range [0..32]. This value must differ from the device’s LAN IP.</td> | |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span style="color: | + | <td>Right firewall</td> |
− | <td> | + | <td>yes | no; default: <b>yes</b></td> |
− | <td> | + | <td>Adds neccessary firewall rules to allow traffic of from the opposite IPsec instance on this router.</td> |
+ | </tr> | ||
+ | <tr> | ||
+ | <td><span style="color: purple;">Transport:</span> Use with DMVPN</td> | ||
+ | <td>yes | no; default: <b>no</b></td> | ||
+ | <td>Adds several necessary options to make DMVPN work.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | + | <td>Enable keepalive</td> | |
− | + | <td>yes | no; default: <b>no</b></td> | |
+ | <td>When enabled, the instance sends ICMP packets to the specified host at the specified frequency. If no response is received, the router will attempt to restart the connection.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | + | <td>Host</td> | |
− | + | <td>host | ip; default: <b>none</b></td> | |
− | + | <td>Hostname or IP address to which keepalive ICMP packets will be sent to.</td> | |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> | + | <td>Ping period (sec)</td> |
− | <td> | + | <td>integer [0..9999999]; default: <b>none</b></td> |
− | <td> | + | <td>The frequency at which keepalive ICMP packets will be sent to the specified host or IP address.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> | + | <td>Allow WebUI access</td> |
<td>yes | no; default: <b>no</b></td> | <td>yes | no; default: <b>no</b></td> | ||
− | <td> | + | <td>Allows WebUI access for hosts in the VPN network.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 192: | Line 159: | ||
<b>Additional notes</b>: | <b>Additional notes</b>: | ||
<ul> | <ul> | ||
− | <li>Some configuration fields become available only when certain other parameters are selected. Different color codes are used for different | + | <li>Some configuration fields become available only when certain other parameters are selected. The names of the parameters are followed by a prefix that specifies the authentication type under which they become visible. Different color codes are used for different prefixes: |
<ul> | <ul> | ||
− | |||
<li>Red for <span style="color: red;">Type: Tunnel</span></li> | <li>Red for <span style="color: red;">Type: Tunnel</span></li> | ||
<li>Purple for <span style="color: purple;">Type: Transport</span></li> | <li>Purple for <span style="color: purple;">Type: Transport</span></li> | ||
Line 294: | Line 260: | ||
===Pre-shared keys=== | ===Pre-shared keys=== | ||
---- | ---- | ||
− | A <b>pre-shared key</b> is a secret password used for authentication between IPsec peers | + | A <b>pre-shared key</b> is a secret password used for authentication between IPsec peers before a secure tunnel is established. To create a new key, click the 'Add' button. |
− | before a secure tunnel is established. | ||
− | |||
− | |||
− | |||
− | To create a new key, click the 'Add' button. | ||
− | The figure below is an example of the Pre-shared keys section and the table | + | The figure below is an example of the Pre-shared keys section and the table below provides information on configuration fields contained in that section: |
− | below provides information on configuration fields contained in that section: | ||
[[File:{{{file_ipsec_psk}}}]] | [[File:{{{file_ipsec_psk}}}]] |
Revision as of 08:07, 17 October 2019
IPsec
To create a new IPsec instance, go to the Services → VPN → IPsec section, enter a custom name and click "Add". An IPsec instance with the given name will appear in the "IPsec Configuration" list.
To begin configuration, click the 'Edit' button located next to the instance.
IPsec configuration
The IPsec configuration section is used to configure the main parameters of an IPsec connection. Refer to the figure and table below for information on the configuration fields located in the general settings section.
[[File:{{{file_ipsec_config}}}]]
Field | Value | Description |
---|---|---|
Enable | yes | no; default: no | Turns the IPsec instance on or off. |
IKE version | IKEv1 | IKEv2; default: IKEv1 | Internet Key Exchange (IKE) version used for key exchange.
|
Mode | Main | Aggressive; default: Main | Internet Security and Key Management Protocol (ISAKMP) phase 1 exchange mode.
|
Type | Tunnel | Transport; default: Tunnel | Type of connection.
|
My identifier type | FQDN | User FQDN | Address; default: FQDN | Defines the type of identity used in user (IPsec instance) authentication.
|
On startup | Ignore | Add | Route | Start; default: Start | Defines how the instance should act on router startup.
|
My identifier | ip | string; default: none | Defines how the user (IPsec instance) will be identified during authentication. |
Tunnel: Local IP address/Subnet mask | ip/netmask | default: none | Local IP address and subnet mask used to determine which part of the network can be accessed in the VPN network. Netmask range [0..32]. If left empty, IP address will be selected automatically. |
Left firewall | off | on; default: on | Adds neccessary firewall rules to allow traffic of this IPsec instance on this router. |
Force encapsulation | yes | no; default: no | Forces UDP encapsulation for ESP packets even if a "no NAT" situation is detected. |
Dead Peer Detection | yes | no; default: no | A function used during Internet Key Exchange (IKE) to detect a "dead" peer. It used to reduce traffic by minimizing the number of messages when the opposite peer in unavailable and as failover mechanism. |
Dead Peer Detection: Delay (sec) | integer; default: none | The frequency of checking whether a peer is still availaible or not. |
Dead Peer Detection: Timeout (sec) | integer; default: none | Time limit after which the IPsec instance will stop checking the availability of a peer and determine it to be "dead" if no response is received. |
Remote VPN endpoint | host | ip; default: none | IP address or hostname of the remote IPsec instance. |
Tunnel: Remote IP address/subnet mask | ip/netmask; default: none | Remote network IP address and subnet mask used to determine which part of the network can be accessed in the VPN network. Netmask range [0..32]. This value must differ from the device’s LAN IP. |
Right firewall | yes | no; default: yes | Adds neccessary firewall rules to allow traffic of from the opposite IPsec instance on this router. |
Transport: Use with DMVPN | yes | no; default: no | Adds several necessary options to make DMVPN work. |
Enable keepalive | yes | no; default: no | When enabled, the instance sends ICMP packets to the specified host at the specified frequency. If no response is received, the router will attempt to restart the connection. |
Host | host | ip; default: none | Hostname or IP address to which keepalive ICMP packets will be sent to. |
Ping period (sec) | integer [0..9999999]; default: none | The frequency at which keepalive ICMP packets will be sent to the specified host or IP address. |
Allow WebUI access | yes | no; default: no | Allows WebUI access for hosts in the VPN network. |
Custom options | ipsec options; default: none | Provides the possibility to further customize the connection by adding extra IPsec options. |
Additional notes:
- Some configuration fields become available only when certain other parameters are selected. The names of the parameters are followed by a prefix that specifies the authentication type under which they become visible. Different color codes are used for different prefixes:
- Red for Type: Tunnel
- Purple for Type: Transport
- Blue for Dead Peer Detection: Enabled
- After changing any of the parameters, don't forget to click the Save button located at the bottom-right side of the page.
Phase settings
IKE (Internet Key Exchange) is a protocol used to set up security associations (SAs) for the IPsec connection. This process is required before the IPsec tunnel can be established. It is done in two phases:
Phase | Mode | |
---|---|---|
Phase 1
|
Main mode (figure 1)
|
Aggressive mode (figure 2)
|
Phase 2
|
Quick mode
|
Figure 1 | Figure 2 |
[[File:{{{file_ipsec_main_mode}}}]] | [[File:{{{file_ipsec_aggressive_mode}}}]] |
[[File:{{{file_ipsec_phase}}}]]
Field | Value | Description |
---|---|---|
Encryption algorithm | DES | 3DES | AES128 | AES192 | AES256; default: 3DES | Algorithm used for data encryption. |
Authentication/Hash algorithm | MD5 | SHA1 | SHA256 | SHA384 | SHA512; default: SHA1 | Algorithm used for exchanging authentication and hash information. |
DH group/PFS group | MODP768 | MODP1024 | MODP1536 | MODP2048 | MODP3072 | MODP4096; default: MODP1536 | Diffie-Hellman (DH) group used in the key exchange process. Higher group numbers provide more security, but take longer and use more resources to compute the key. |
Lifetime | integer; default: 8 hours | Defines a time period after which the phase will re-initiate its exchange of information. |
A pre-shared key is a secret password used for authentication between IPsec peers before a secure tunnel is established. To create a new key, click the 'Add' button.
The figure below is an example of the Pre-shared keys section and the table below provides information on configuration fields contained in that section:
[[File:{{{file_ipsec_psk}}}]]
Field | Value | Description |
---|---|---|
Pre-shared key | string; default: none | A shared password used for authentication between IPsec peers before a secure channel is established. |
Secret's ID selector | string; default: none | Each secret can be preceded by a list of optional ID selectors. A selector is an IP address, a Fully Qualified Domain Name, user@FQDN or %any. NOTE: IKEv1 only supports IP address ID selector. |