|
|
(54 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
| ==Summary==
| |
|
| |
|
| '''Virtual Private Network''' ('''VPN''') is a method for secure data transfer through unsafe public networks. This page is an overview of different types of VPNs that can be used with RUT routers.
| | ==VPN== |
|
| |
|
| ==OpenVPN==
| | * [[DMVPN_with_IPsec_Phase_3 | DMVPN]] |
| | | * [[OpenVPN configuration examples|OpenVPN configuration example]] |
| '''OpenVPN''' is an open-source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. This section is an overview of the OpenVPN section of RUT routers. For a more in depth guide refer to our '''[[OpenVPN configuration examples]]''' page.
| | * [[IPsec_RUTOS_configuration_example|IPsec cofiguration example]] |
| | | * [[ZeroTier One VPN configuration RutOS|ZeroTier One VPN configuration example]] |
| The default OpenVPN Configuration list is empty, so you have to define your own configuration to establish any sort of OpenVPN connection. OpenVPN configurations can have one of two roles: '''client''' or '''server'''. Let’s start with an OpenVPN client. To create it, enter the desired instance name in the '''New configuration name''' field, select the instance’s role from the '''Role''' list and press the '''Add New''' button.
| | * [[ZeroTier Configuration|ZeroTier]] |
| | | * [[L2TP configuration examples RutOS| L2TP configuration examples]] |
| [[Image:Services vpn openvpn creation.PNG]] | | * [[Overlapping subnets with IPsec solution]] |
| | | * [[Setting up a GRE over IPsec tunnel between RUTOS devices|GRE over IPsec Tunnel]] |
| Once you’ve added a new OpenVPN instance there is no need to press the '''Save''' button, since the '''Add New''' button both creates and saves the new instance. By default the instance will be disabled and unconfigured. In order to establish an OpenVPN connection you must Enable your instance, enter an OpenVPN server address, choose an authentication method and a few other things, all of which can be configured in the '''Settings''' window, which can reached by pressing the '''Edit''' button next to your OpenVPN instance (as shown in the figure above).
| | * [[L2TP over IPsec RutOS| L2TP over IPsec RutOS]] |
| | | * [[Setting up an IPsec tunnel between Teltonika Networks and Cisco devices|Cisco IPsec]] |
| ===OpenVPN Client===
| | * [[Setting up a GRE tunnel between Teltonika Networks and Cisco devices| Cisco GRE]] |
| ----
| | * [[Setting up a GRE over IPsec tunnel between Teltonika Networks and Cisco devices]] |
| This section is overview of OpenVPN Client configuration.
| | * [[Setting up a GRE over IPsec tunnel between Teltonika Networks and Mikrotik devices|Mikrotik GRE over IPsec Tunnel]] |
| | | * [[Setting up a SSTP tunnel between Teltonika Networks and Mikrotik devices|Mikrotik SSTP]] |
| [[File:Services vpn openvpn client v 2.png]] | | * [[Setting up an OpenVPN tunnel between Teltonika Neworks and Mikrotik devices|Mikrotik OpenVPN]] |
| | | * [[Setting up a L2TP over IPsec tunnel between Teltonika Networks and Mikrotik devices|Mikrotik L2TP over IPsec]] |
| The figure above is an example of a configured OpenVPN Client instance that uses the UDP protocol and TLS/Password authentication. Comprehensible explanations on how to configure each field are presented in the table below.
| | * [[Creating OpenVPN access server and connecting it to a Teltonika Networks router|OpenVPN Access Server]] |
| | | * [[Setting up an IPsec tunnel between RUT and Android phone]] |
| {| class="wikitable"
| | * [[Tinc VPN configuration examples]] |
| |+
| | * [[L2TP over IPsec PC|L2TP over IPsec VPN to a PC configuration example]] |
| ! style="width: 250px; background: black; color: white;" | Field name
| | * [[OpenVPN traffic split]] |
| ! style="width: 250px; background: black; color: white;" | Value
| | * [[Default_IPsec_route_configuration_between_Teltonika_Networks_devices | Default IPsec route configuration between Teltonika Networks devices]] |
| ! style="width: 1200px; background: black; color: white;" | Description
| | * [[OpenVPN over Stunnel RutOS|OpenVPN over Stunnel]] |
| |-
| | * [[DMVPN with IPsec Phase 3]] |
| ! style="text-align: left; vertical-align: top;" | Enable
| | * [[L2 LAN bridging over internet using L2TPv2+EoIP]] |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no''' | | * [[1NCE Configuration]] |
| | style="text-align: left; vertical-align: top;" | Enables the OpenVPN instance
| | * [[RutOS ExpressVPN configuration example|ExpressVPN]] |
| |-
| | * [[RutOS NordVPN configuration example|NordVPN]] |
| ! style="text-align: left; vertical-align: top;" | TUN/TAP
| | [[Category:Configuration Examples]] |
| | style="text-align: left; vertical-align: top;" | TUN (tunnel) {{!}} TAP (bridged); Default: '''TUN (tunnel)'''
| |
| | style="text-align: left; vertical-align: top;" | OpenVPN interface type. '''TUN''' is most often in typical VPN connections, however, '''TAP''' is required in some Ethernet bridging configurations
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Protocol
| |
| | style="text-align: left; vertical-align: top;" | UDP {{!}} TCP; Default: '''UDP'''
| |
| | style="text-align: left; vertical-align: top;" | The transfer protocol used by the OpenVPN connection. '''TCP''' is connection oriented – once a connection is established, data can be sent bidirectionally. '''UDP''' is a simpler, connectionless Internet protocol. '''UDP''' is usually faster but '''TCP''' has more security features. Choose the connection protocol according to your needs.
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Port
| |
| | style="text-align: left; vertical-align: top;" | integer [0..65535]; Default: '''1194'''
| |
| | style="text-align: left; vertical-align: top;" | TCP/UDP Port number for both local and remote endpoints (make sure that the chosen port is allowed by firewall)
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | LZO
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | With LZO compression, your VPN connection will generate less network traffic. However, enabling this causes a higher CPU load. Use it carefully with a high traffic rate or low CPU resources
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Encryption
| |
| | style="text-align: left; vertical-align: top;" | DES-CBC 64 {{!}} RC2-CBC 128 {{!}} DES-EDE-CBC 128 {{!}} DES-EDE3-CBC 192 {{!}} DESX-CBC 192 {{!}} BF-CBC 128 {{!}} RC2-40-CBC 40 {{!}} CAST5-CBC 128 {{!}} RC2-40CBC 40 {{!}} CAST5-CBC 128 {{!}} RC2-64-CBC 64{{!}} AES-128-CBC 128 {{!}} AES-192-CBC 192 {{!}} AES-256-CBC 256 {{!}} none; Default: '''BF-CBC 128'''
| |
| | style="text-align: left; vertical-align: top;" | Packet encryption algorithm
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Authentication
| |
| | style="text-align: left; vertical-align: top;" | TLS {{!}} Static Key {{!}} Password {{!}} TLS/Password; Default: '''TLS'''
| |
| | style="text-align: left; vertical-align: top;" | Authentication mode, used to secure data sessions.
| |
| '''Static key''' is a secret key used for server–client authentication.
| |
| | |
| '''TLS''' authentication mode uses X.509 type certificates:
| |
| | |
| '''Certificate Authority (CA)''', '''Client certificate''', '''Client key'''.
| |
| | |
| All mentioned certificates can be generated using OpenVPN or Open SSL utilities on any type of host machine.
| |
| | |
| '''Password''' is a simple username/password based authentication where the owner of the OpenVPN server provides the login data.
| |
| | |
| '''TLS/Password''' uses both TLS and Password authentication
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | TLS cipher
| |
| | style="text-align: left; vertical-align: top;" | all {{!}} DHE+RSA {{!}} custom; Default: '''all'''
| |
| | style="text-align: left; vertical-align: top;" | Packet encryption algorithm cipher
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote host / IP address
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | IP address or hostname of an OpenVPN server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Resolve retry
| |
| | style="text-align: left; vertical-align: top;" | integer {{!}} infinite; Default: '''infinite'''
| |
| | style="text-align: left; vertical-align: top;" | Time in seconds to resolve server hostname periodically in case of first resolve failure before generating service exception
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Keep alive
| |
| | style="text-align: left; vertical-align: top;" | integer *space* integer; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Defines two time intervals: one is used to periodically send ICMP request to the OpenVPN server, the other defines a time window, which is used to restart the OpenVPN service, if no ICMP response is received during the window time slice.
| |
| '''Example:''' 10 60
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote network IP address
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | LAN IP address of the remote network (server)
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote network IP netmask
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | LAN IP subnet mask of the remote network (server)
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Username
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | User name used for authentication
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Password
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Password name used for authentication
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Extra options
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Extra options to be used by the OpenVPN instance
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | HMAC authentication algorithm
| |
| | style="text-align: left; vertical-align: top;" | none {{!}} SHA1 {{!}} SHA256 {{!}} SHA384 {{!}} SHA512; Default: '''SHA1'''
| |
| | style="text-align: left; vertical-align: top;" | HMAC authentication algorithm type
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Additional HMAC authentication
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | An additional layer of HMAC authentication on top of the TLS control channel to protect against DoS attacks
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Certificate authority
| |
| | style="text-align: left; vertical-align: top;" | .ca file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Certificate authority is an entity that issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Client certificate
| |
| | style="text-align: left; vertical-align: top;" | .crt file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client certificate is a type of digital certificate that is used by client systems to make authenticated requests to a remote server. Client certificates play a key role in many mutual authentication designs, providing strong assurances of a requester's identity
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Client key
| |
| | style="text-align: left; vertical-align: top;" | .key file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Authenticates the client to the server and establishes precisely who they are
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Private key decryption password (optional)
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Decrypts server private key password. Use only if server's .key file is encrypted with a password
| |
| |-
| |
| |}
| |
| | |
| After setting any of these parameters press the '''Save''' button or else the changes will not be applied. Some of the selected parameters will be shown in the configuration list table. You should also be aware of the fact that the router will launch a separate OpenVPN service for every configuration entry (if it is defined as active at the time, of course) so the router has the ability to act as server and client at the same time.
| |
| | |
| ===OpenVPN Server===
| |
| ----
| |
| This section is overview of OpenVPN Client configuration.
| |
| | |
| [[Image:Services vpn openvpn server.PNG]] | |
| | |
| The figure above is an exampled of a configured OpenVPN Server instance that uses the UDP protocol and TLS authentication. As you can see, the configuration is similar to OpenVPN Client but with a few key differences. Comprehensible explanations on how to configure each field are presented in the table below.
| |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Enables the OpenVPN instance
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | TUN/TAP
| |
| | style="text-align: left; vertical-align: top;" | TUN (tunnel) {{!}} TAP (bridged); Default: '''TUN (tunnel)'''
| |
| | style="text-align: left; vertical-align: top;" | OpenVPN interface type. '''TUN''' is most often in typical VPN connections, however, '''TAP''' is required in some Ethernet bridging configurations
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Protocol
| |
| | style="text-align: left; vertical-align: top;" | UDP {{!}} TCP; Default: '''UDP'''
| |
| | style="text-align: left; vertical-align: top;" | The transfer protocol used by the OpenVPN connection. '''TCP''' is connection oriented – once a connection is established, data can be sent bidirectionally. '''UDP''' is a simpler, connectionless Internet protocol. '''UDP''' is usually faster but '''TCP''' has more security features. Choose the connection protocol according to your needs.
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Port
| |
| | style="text-align: left; vertical-align: top;" | integer [0..65535]; Default: '''1194'''
| |
| | style="text-align: left; vertical-align: top;" | TCP/UDP Port number for both local and remote endpoints (make sure that the chosen port is allowed by firewall)
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | LZO
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | With LZO compression, your VPN connection will generate less network traffic. However, enabling this causes a higher CPU load. Use it carefully with a high traffic rate or low CPU resources
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Encryption
| |
| | style="text-align: left; vertical-align: top;" | DES-CBC 64 {{!}} RC2-CBC 128 {{!}} DES-EDE-CBC 128 {{!}} DES-EDE3-CBC 192 {{!}} DESX-CBC 192 {{!}} BF-CBC 128 {{!}} RC2-40-CBC 40 {{!}} CAST5-CBC 128 {{!}} RC2-40CBC 40 {{!}} CAST5-CBC 128 {{!}} RC2-64-CBC 64{{!}} AES-128-CBC 128 {{!}} AES-192-CBC 192 {{!}} AES-256-CBC 256 {{!}} none; Default: '''BF-CBC 128'''
| |
| | style="text-align: left; vertical-align: top;" | Packet encryption algorithm
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Authentication
| |
| | style="text-align: left; vertical-align: top;" | TLS {{!}} Static Key {{!}} Password {{!}} TLS/Password; Default: '''TLS'''
| |
| | style="text-align: left; vertical-align: top;" | Authentication mode, used to secure data sessions.
| |
| '''Static key''' is a secret key used for server–client authentication.
| |
| | |
| '''TLS''' authentication mode uses X.509 type certificates:
| |
| | |
| '''Certificate Authority (CA)''', '''Client certificate''', '''Client key'''.
| |
| | |
| All mentioned certificates can be generated using OpenVPN or Open SSL utilities on any type of host machine.
| |
| | |
| '''Password''' is a simple username/password based authentication where the owner of the OpenVPN server provides the login data.
| |
| | |
| '''TLS/Password''' uses both TLS and Password authentication
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | TLS cipher
| |
| | style="text-align: left; vertical-align: top;" | all {{!}} DHE+RSA {{!}} custom; Default: '''all'''
| |
| | style="text-align: left; vertical-align: top;" | Packet encryption algorithm cipher
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Client to client
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Enables client to client communication in the Virtual network. In order for Client to client to work, the TLS Clients section most be utilized
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Keep alive
| |
| | style="text-align: left; vertical-align: top;" | integer *space* integer; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Defines two time intervals: one is used to periodically send ICMP request to the OpenVPN server, the other defines a time window, which is used to restart the OpenVPN service, if no ICMP response is received during the window time slice.
| |
| '''Example:''' 10 60
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Virtual network IP address
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | IP address of the Virtual network, e.g., '''10.0.8.0'''
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Virtual network IP netmask
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Subnet mask of the Virtual network
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Push option
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Push options are a way to “push” user defined routes to connecting clients’ routing tables. In the example above, the server will push the route of 192.168.1.0 network with the 255.255.255.0 netmask to connecting clients. Therefore, the client will be able to reach devices in the 192.168.1.0 network. This is useful when a client needs to reach devices located in the OpenVPN server’s LAN.
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Allow duplicate certificates
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | If checked, the server allows clients to connect with identical certificates
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Certificate authority
| |
| | style="text-align: left; vertical-align: top;" | .ca file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Certificate authority is an entity that issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Server certificate
| |
| | style="text-align: left; vertical-align: top;" | .crt file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Server certificate is a type of digital certificate that is used to identify the OpenVPN server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Server key
| |
| | style="text-align: left; vertical-align: top;" | .key file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Authenticates clients to the server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Diffie Hellman parameters
| |
| | style="text-align: left; vertical-align: top;" | .pem file; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | DH parameters define how OpenSSL performs the Diffie-Hellman (DH) key-exchange.
| |
| |-
| |
| |}
| |
| | |
| ===TLS Clients===
| |
| ----
| |
| TLS Clients is a way to more specifically differentiate clients by their '''Common Name (CN)''' found in the client certificate file. It can be used to assign specific VPN addresses to specific clients and bind them to their LAN addresses so that other device‘s in the client‘s LAN can be reached from the server or other clients.
| |
| | |
| The TLS Clients section can be found in the OpenVPN Server configuration window, provided that the OpenVPN server uses TLS or TLS/Password authentication methods. To create a new TLS client, type in the new client‘s name in the text field found bellow the TLS Clients tab and press the '''Add''' button.
| |
| | |
| [[Image:Services vpn openvpn tlsclients.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | VPN instance name
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | With what VPN instance should the TLS Client be associated with
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Endpoint name
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Your endpoint name
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Common name (CN)
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s Common Name (CN) found in the client’s certificate file
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Virtual local endpoint
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s virtual local address in the virtual network
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Virtual remote endpoint
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s virtual remote address in the virtual network
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Private network
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s private network (LAN) IP address
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Private netmask
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s private network (LAN) IP netmask
| |
| |-
| |
| |}
| |
| | |
| ==IPsec==
| |
| | |
| The IPsec protocol client enables the router to establish a secure connection to an IPsec peer via the Internet. IPsec is supported in two modes - transport and tunnel. Transport mode creates a secure point to point channel between two hosts. Tunnel mode can be used to build a secure connection between two remote LANs serving as a VPN solution.
| |
| | |
| IPsec system maintains two databases: Security Policy Database (SPD) which defines whether to apply IPsec to a packet or not and specify which/how IPsec-SA is applied and Security Association Database (SAD), which contains a Key of each IPsec-SA.
| |
| | |
| The establishment of the Security Association (IPsec-SA) between two peers is needed for IPsec communication. It can be done by using manual or automated configuration.
| |
| | |
| Note: the router starts establishing a tunnel when data is sent from the router to a remote site over the tunnel. The Keep Alive feature is used for automatic tunnel establishment.
| |
| | |
| To create a new IPsec instance, go to the IPsec tab, type in a name for your new instance in the text field below the IPsec tab and press the '''Add''' button next to it.
| |
| | |
| '''Note:''' You can create a maximum of 5 IPsec instances.
| |
| | |
| | |
| [[File:Services vpn ipsec v 2.png]]
| |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles the IPsec instance ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | IKE version
| |
| | style="text-align: left; vertical-align: top;" | IKEv1 {{!}} IKEv2; Default: '''IKEv1'''
| |
| | style="text-align: left; vertical-align: top;" | Method of key exchange
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Mode
| |
| | style="text-align: left; vertical-align: top;" | Main {{!}} Aggressive; Default: '''Main'''
| |
| | style="text-align: left; vertical-align: top;" | ISAKMP phase 1 exchange mode
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Type
| |
| | style="text-align: left; vertical-align: top;" | Tunnel {{!}} Transport; Default: '''Tunnel'''
| |
| | style="text-align: left; vertical-align: top;" | Type of connection. <br> '''Tunnel''': protects the internal routing information by encrypting the IP header of the original packet. The original packet is encapsulated by a another set of IP headers. <br> '''Transport''': encrypts only the payload and Encapsulating Security Payload (ESP) trailer; so the IP header of the original packet is not encrypted. Transport mode is usually used when another tunneling protocol (such as [[VPN#GRE_Tunnel|GRE]], [[VPN#L2TP|L2TP]]) is used to first encapsulate the IP data packet, then IPsec is used to protect the GRE/L2TP tunnel packets.
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | My identifier type
| |
| | style="text-align: left; vertical-align: top;" | Address {{!}} FQDN {{!}} User FQDN; Default: '''FQDN'''
| |
| | style="text-align: left; vertical-align: top;" | Type of connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | My identifier
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | In case RUT has a Private IP, its identifier should be its own LAN network address. In this way, the Road Warrior approach is possible
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Local IP address/Subnet mask
| |
| | style="text-align: left; vertical-align: top;" | ip/netmask {{!}} Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Local network secure group IP address and mask used to determine at what subnet an IP address can be accessed. Netmask range [0 - 32]. If left empty IP address will be selected automatically
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Left firewall
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''yes'''
| |
| | style="text-align: left; vertical-align: top;" | Excludes IPsec tunnel from firewall rules
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Force encapsulation
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Forces UDP encapsulation for ESP packets even if no NAT situation is detected
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Dead Peer Detection
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | The values 'clear', 'hold' and 'restart' all activate DPD
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Pre-shared key
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | A shared password used for authentication between the peers
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote VPN endpoint
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " " | |
| | style="text-align: left; vertical-align: top;" | IP address or hostname of the remote IPsec instance
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote IP address/subnet mask
| |
| | style="text-align: left; vertical-align: top;" | ip/integer [0..32]; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Remote network secure group IP address and mask used to determine to what subnet an IP address belongs to. Should differ from device’s LAN IP
| |
| |- | |
| ! style="text-align: left; vertical-align: top;" | Right firewall
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''yes'''
| |
| | style="text-align: left; vertical-align: top;" | Excludes remote side IPsec tunnel from firewall rules
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable keep alive
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles the tunnel's keep alive function ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Host
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | A host address to which an ICMP echo requests will be sent for keep alive purposes
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Ping period (sec)
| |
| | style="text-align: left; vertical-align: top;" | integer [0..9999999]; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Send ICMP echo request every '''x''' seconds ('''x''' being the number specified in this field)
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Allow WebUI access
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | If enabled, allows router's WebUI access through the IPsec tunnel
| |
| |-
| |
| |}
| |
| | |
| ===Phase 1/Phase 2===
| |
| ----
| |
| '''Phase''' 1 and '''Phase 2''' must be configured in accordance with the IPSec server configuration, thus algorithms, authentication and lifetimes of each phase must be identical.
| |
| | |
| | |
| [[Image:Services vpn ipsec phase.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Encryption algorithm
| |
| | style="text-align: left; vertical-align: top;" | DES {{!}} 3DES {{!}} AES 128 {{!}} AES 192 {{!}} AES256; Default: '''3DES'''
| |
| | style="text-align: left; vertical-align: top;" | The encryption algorithm must match with another incoming connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Authentication
| |
| | style="text-align: left; vertical-align: top;" | MD5 {{!}} SHA1 {{!}} SHA256 {{!}} SHA384 {{!}} SHA512; Default: '''SHA1'''
| |
| | style="text-align: left; vertical-align: top;" | The authentication algorithm must match with another incoming connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Has algorithm
| |
| | style="text-align: left; vertical-align: top;" | MD5 {{!}} SHA1 {{!}} SHA256 {{!}} SHA384 {{!}} SHA512; Default: '''SHA1'''
| |
| | style="text-align: left; vertical-align: top;" | The hash algorithm must match with another incoming connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | DH group
| |
| | style="text-align: left; vertical-align: top;" | MODP768 {{!}} MODP1024 {{!}} MODP1536 {{!}} MODP2048 {{!}} MODP3072 {{!}} MODP4096; Default: '''MODP1536'''
| |
| | style="text-align: left; vertical-align: top;" | The DH (Diffie-Helman) group must match with another incoming connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | PFS group
| |
| | style="text-align: left; vertical-align: top;" | MODP768 {{!}} MODP1024 {{!}} MODP1536 {{!}} MODP2048 {{!}} MODP3072 {{!}} MODP4096 {{!}} No PFS; Default: '''MODP1536'''
| |
| | style="text-align: left; vertical-align: top;" | The PFS (Perfect Forward Secrecy) group must match with another incoming connection
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Lifetime
| |
| | style="text-align: left; vertical-align: top;" | time; Default: '''8 hours'''
| |
| | style="text-align: left; vertical-align: top;" | Duration for the phase
| |
| |-
| |
| |}
| |
| | |
| ==GRE Tunnel==
| |
| | |
| '''GRE''' (Generic Routing Encapsulation RFC2784) is a solution for tunneling RFC1812 private address-space traffic over an intermediate TCP/IP network such as the Internet. GRE tunneling does not use encryption it simply encapsulates data and sends it over the WAN.
| |
| | |
| | |
| [[Image:Services vpn gre tunnel scheme.PNG]]
| |
| | |
| In the example network diagram two distant networks LAN1 and LAN2 are connected.
| |
| To create GRE tunnel the user must know the following parameters:
| |
| | |
| 1. Source and destination IP addresses
| |
| | |
| 2. Tunnel’s local IP address
| |
| | |
| 3. Distant network’s IP address and Subnet mask
| |
| | |
| To create a new GRE instance, go to the GRE Tunnel tab, type in a name for your new instance in the text field below the GRE Tunnel tab and press the '''Add New''' button next to it.
| |
| The newly created instance will be disabled and unconfigured. To configure it press the '''Edit''' button located next to it. This action will redirect you to the instance’s GRE Tunnel Configuration window.
| |
| | |
| | |
| [[Image:Services vpn gre tunnel configuration.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enabled
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles GRE Tunnel ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote endpoint IP address
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Specifies remote WAN IP address or hostname
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote network
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | LAN IP address of the remote device
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote network netmask
| |
| | style="text-align: left; vertical-align: top;" | integer [0..32]; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | LAN netmask of the remote device
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Local tunnel IP
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " " | |
| | style="text-align: left; vertical-align: top;" | Local virtual IP address. Can’t be in the same subnet as LAN network
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | MTU
| |
| | style="text-align: left; vertical-align: top;" | integer [0..1500]; Default: '''1476'''
| |
| | style="text-align: left; vertical-align: top;" | The maximum transmission unit in bytes
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | TTL
| |
| | style="text-align: left; vertical-align: top;" | integer [0..255]; Default: '''255'''
| |
| | style="text-align: left; vertical-align: top;" | Fixed time-to-live (TTL) value on tunneled packets. The 0 is a special value meaning that packets inherit the TTL value
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | PMTUD
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles the Path Maximum Transmission Unit Discovery (PMTUD) status on this tunnel ON or OFF
| |
| |- | |
| ! style="text-align: left; vertical-align: top;" | Redirect LAN to GRE
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Redirects LAN traffic to the GRE interface
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable Keep alive
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Gives the ability for one side to originate and receive keep alive packets to and from a remote router
| |
| |- | |
| ! style="text-align: left; vertical-align: top;" | Keep Alive host
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Keep Alive IP address to send pings to. Preferably this should be an IP address which belongs to the LAN network on the remote device
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Keep alive interval
| |
| | style="text-align: left; vertical-align: top;" | integer [0..255]; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Frequency at which ICMP packets are sent by the Keep Alive function (in seconds) | |
| |-
| |
| |}
| |
| | |
| ==PPTP==
| |
| | |
| '''Point-to-Point Tunneling Protocol (PPTP)''' is a protocol (set of communication rules) that allows corporations to extend their own corporate network through private "tunnels" over the public Internet. Effectively, a corporation uses a wide-area network as a single large local area network. A company no longer needs to lease its own lines for wide-area communication but can securely use the public networks.
| |
| | |
| ===PPTP Client===
| |
| ----
| |
| To create a new PPTP instance, go to the PPTP tab, select the Role (server or client) of your instance, type in a name in the '''New configuration name''' field and press the '''Add''' button next to it. The newly created instance will be disabled and unconfigured. To configure it click the '''Edit''' button located next to it. This action will redirect you to the instance’s PPTP Configuration window.
| |
| | |
| | |
| [[Image:Services vpn pptp client.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles PPTP Client ON or OFF | |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Use as default gateway
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Use this PPTP instance as default gateway
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Client to client
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles client to client on the PPTP tunnel ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Server
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | PPTP server's IP address or hostname
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Username
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | User name for authorization with the server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Password
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Password used for authorization with the server
| |
| |-
| |
| |}
| |
| | |
| ===PPTP Server===
| |
| ----
| |
| [[Image:Services vpn pptp server.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles PPTP Server ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Local IP
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.1'''
| |
| | style="text-align: left; vertical-align: top;" | Virtual IP Address of this PPTP server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote IP range begin
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.20'''
| |
| | style="text-align: left; vertical-align: top;" | Client IP address leases beginning
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote IP range end
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.30'''
| |
| | style="text-align: left; vertical-align: top;" | Client IP address leases end
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | User name
| |
| | style="text-align: left; vertical-align: top;" | string; Default: '''youruser'''
| |
| | style="text-align: left; vertical-align: top;" | Client's user name used for authentication with this server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Password
| |
| | style="text-align: left; vertical-align: top;" | string; Default: '''yourpass'''
| |
| | style="text-align: left; vertical-align: top;" | Client's password used for authentication with this server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | PPTP Client's IP
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Client’s IP address. Leave empty to assign a random IP from the IP range specified above
| |
| |-
| |
| |}
| |
| | |
| ==L2TP==
| |
| | |
| In computer networking, '''Layer 2 Tunneling Protocol (L2TP)''' is a tunneling protocol used to support virtual private networks (VPNs). It is more secure than PPTP but, because it encapsulates the transferred date twice, but it is slower and uses more CPU power.
| |
| | |
| ===L2TP Client===
| |
| ----
| |
| To create a new L2TP instance, go to the L2TP tab, select the Role (server or client) of your instance, type in a name in the '''New configuration name''' field and press the '''Add''' button next to it. The newly created instance will be disabled and unconfigured. To configure it press the '''Edit''' button located next to it. This action will redirect you to the instance’s L2TP Configuration window.
| |
| | |
| | |
| [[Image:Services vpn l2tp client configuration.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles L2TP Client ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Server
| |
| | style="text-align: left; vertical-align: top;" | host {{!}} ip; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | L2TP server's remote IP address or hostname
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Username
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | User name used to authenticate you to the L2TP server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Password
| |
| | style="text-align: left; vertical-align: top;" | string; Default: " "
| |
| | style="text-align: left; vertical-align: top;" | Password used to authenticate you to the server
| |
| |-
| |
| |}
| |
| | |
| ===L2TP Server===
| |
| ----
| |
| [[Image:Services vpn l2tp server.PNG]] | |
| | |
| {| class="wikitable"
| |
| |+
| |
| ! style="width: 250px; background: black; color: white;" | Field name
| |
| ! style="width: 250px; background: black; color: white;" | Value
| |
| ! style="width: 1200px; background: black; color: white;" | Description
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Enable
| |
| | style="text-align: left; vertical-align: top;" | yes {{!}} no; Default: '''no'''
| |
| | style="text-align: left; vertical-align: top;" | Toggles L2TP Server ON or OFF
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Local IP
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.1'''
| |
| | style="text-align: left; vertical-align: top;" | Virtual IP Address of this L2TP server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote IP range begin
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.20'''
| |
| | style="text-align: left; vertical-align: top;" | Client IP address leases beginning
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Remote IP range end
| |
| | style="text-align: left; vertical-align: top;" | ip; Default: '''192.168.0.30'''
| |
| | style="text-align: left; vertical-align: top;" | Client IP address leases end
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | User name
| |
| | style="text-align: left; vertical-align: top;" | string; Default: '''user'''
| |
| | style="text-align: left; vertical-align: top;" | Client's user name used for authentication with this server
| |
| |-
| |
| ! style="text-align: left; vertical-align: top;" | Password
| |
| | style="text-align: left; vertical-align: top;" | string; Default: '''pass'''
| |
| | style="text-align: left; vertical-align: top;" | Client's password used for authentication with this server
| |
| |-
| |
| |}
| |