openvpn:options
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
openvpn:options [2020/04/20 09:27] – peter | openvpn:options [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Tunnel Options ===== | ===== Tunnel Options ===== | ||
- | |||
- | |||
- | |remote-random|Used to initially " | ||
- | |:::|When multiple --remote address/ | ||
- | |route-gateway gw< | ||
- | |:::|If **dhcp** is specified as the parameter, the gateway address will be extracted from a DHCP negotiation with the OpenVPN server-side LAN.| | ||
- | |Tunnel Options|route network/IP [netmask] [gateway] [metric]|Add route to routing table after connection is established. Multiple routes can be specified. Routes will be automatically torn down in reverse order prior to TUN/TAP device close.| | ||
- | |::: | ||
- | |::: | ||
- | |::: | ||
- | |:::|The default can be specified by leaving an option blank or setting it to " | ||
- | |:::|The **network** and **gateway** parameters can also be specified as a DNS or /etc/hosts file resolvable name, or as one of three special keywords:| | ||
- | |::: | ||
- | |::: | ||
- | |::: | ||
- | |||
- | |||
|allow-pull-fqdn|Allow client to pull DNS names from server (rather than being limited to IP address) for **--ifconfig**, | |allow-pull-fqdn|Allow client to pull DNS names from server (rather than being limited to IP address) for **--ifconfig**, | ||
Line 31: | Line 14: | ||
|:::|The purpose of such a call would normally be to block until the device or socket is ready to accept the write. | |:::|The purpose of such a call would normally be to block until the device or socket is ready to accept the write. | ||
|:::|This option can only be used on non-Windows systems, when **--proto udp** is specified, and when **--shaper** is NOT specified.| | |:::|This option can only be used on non-Windows systems, when **--proto udp** is specified, and when **--shaper** is NOT specified.| | ||
- | |fragment | + | |fragment |
- | |key-direction 1| | + | |:::|The **max** parameter is interpreted in the same way as the **--link-mtu** parameter, i.e. the UDP packet size after encapsulation overhead has been added in, but not including the UDP header itself.| |
- | |mssfix 1450| | + | |:::|The **--fragment** option only makes sense when you are using the UDP protocol ( **--proto udp** ).| |
+ | |::: | ||
+ | |:::|See the **--mssfix** option below for an important related option to **--fragment**.| | ||
+ | |:::|It should also be noted that this option is not meant to replace UDP fragmentation at the IP stack level. | ||
+ | |mssfix max|Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed **max** bytes. | ||
+ | |:::|The **max** parameter is interpreted in the same way as the **--link-mtu** parameter, i.e. the UDP packet size after encapsulation overhead has been added in, but not including the UDP header itself.| | ||
+ | |::: | ||
+ | |:::|The **--mssfix** option only makes sense when you are using the UDP protocol for OpenVPN peer-to-peer communication, | ||
+ | |::: | ||
+ | |:::|Both **--fragment** and **--mssfix** are designed to work around cases where Path MTU discovery is broken on the network path between OpenVPN peers.| | ||
+ | |:::|The usual symptom of such a breakdown is an OpenVPN connection which successfully starts, but then stalls during active usage.| | ||
+ | |:::|If **--fragment** and **--mssfix** are used together, **--mssfix** will take its default max parameter from the **--fragment max** option.| | ||
+ | |::: | ||
|persist-key|Don' | |persist-key|Don' | ||
|:::|This option can be combined with **--user nobody** to allow restarts triggered by the **SIGUSR1** signal. | |:::|This option can be combined with **--user nobody** to allow restarts triggered by the **SIGUSR1** signal. | ||
Line 39: | Line 34: | ||
|persist-tun|Don' | |persist-tun|Don' | ||
|::: | |::: | ||
- | |pull|This option must be used on a client which is connecting | + | |rcvbuf size|Set the TCP/UDP socket receive buffer size. Defaults to operation system default.| |
- | |:::|In particular, --pull allows the server to push routes | + | |redirect-gateway flags...|Automatically execute routing commands to cause all outgoing IP traffic to be redirected over the VPN. This is a client-side option.| |
- | |rcvbuf 524288|Set the TCP/UDP socket receive buffer size. Defaults | + | |:::|This option performs three steps:| |
- | |remote-cert-tls server| | + | |:::|(1) Create a static route for the **--remote** address |
- | |route-delay 2| | + | |:::|(2) Delete the default gateway route.| |
- | |route-method exe| | + | |:::|(3) Set the new default gateway |
+ | |:::|When the tunnel is torn down, all of the above steps are reversed so that the original default route is restored.| | ||
+ | |:::|Option flags:| | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |remote-random|Used to initially " | ||
+ | |:::|When multiple --remote address/ | ||
+ | |route-delay [n] [w]|Delay **n** seconds (default=0) after connection establishment, | ||
+ | |:::|If **n** is 0, routes will be added immediately upon connection establishment. | ||
+ | |:::|This option is designed to be useful | ||
+ | |:::|On Windows, **--route-delay** tries to be more intelligent by waiting **w** seconds (w=30 by default) for the TAP-Win32 adapter to come up before adding routes.| | ||
+ | |route-gateway gw< | ||
+ | |:::|If **dhcp** is specified as the parameter, the gateway address will be extracted from a DHCP negotiation with the OpenVPN server-side LAN.| | ||
+ | |route network/IP [netmask] [gateway] [metric]|Add route to routing table after connection is established. Multiple routes can be specified. Routes will be automatically torn down in reverse order prior to TUN/TAP device close.| | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |:::|The default can be specified by leaving an option blank or setting it to " | ||
+ | |:::|The **network** and **gateway** parameters can also be specified as a DNS or /etc/hosts file resolvable name, or as one of three special keywords: | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
|route-nopull|When used with **--client** or **--pull**, accept options pushed by server EXCEPT for routes, block-outside-dns and dhcp options like DNS servers.| | |route-nopull|When used with **--client** or **--pull**, accept options pushed by server EXCEPT for routes, block-outside-dns and dhcp options like DNS servers.| | ||
|:::|When used on the client, this option effectively bars the server from adding routes to the client' | |:::|When used on the client, this option effectively bars the server from adding routes to the client' | ||
- | |sndbuf | + | |sndbuf |
- | |tls-client|Enable TLS and assume client role during | + | |tun-mtu n|Take the TUN device MTU to be n and derive the link MTU from it (default=1500). |
- | |tun-mtu 1500| | + | |:::|The MTU (Maximum Transmission Units) is the maximum datagram size in bytes that can be sent unfragmented over a particular network path. OpenVPN requires that packets on the control or data channels be sent unfragmented.| |
- | |verb 3|Set output verbosity to n (default=1). Each level shows all info from the previous levels. | + | |:::|MTU problems often manifest themselves as connections which hang during |
+ | |::: | ||
+ | |verb n|Set output verbosity to **n** (default=1). | ||
|:::|**0** -- No output except fatal errors.| | |:::|**0** -- No output except fatal errors.| | ||
|:::|**1 to 4** -- Normal usage range.| | |:::|**1 to 4** -- Normal usage range.| | ||
|:::|**5** -- Output **R** and **W** characters to the console for each packet read and write, uppercase is used for TCP/UDP packets and lowercase is used for TUN/TAP packets.| | |:::|**5** -- Output **R** and **W** characters to the console for each packet read and write, uppercase is used for TCP/UDP packets and lowercase is used for TUN/TAP packets.| | ||
|:::|**6 to 11** -- Debug info range (see errlevel.h for additional information on debug levels).| | |:::|**6 to 11** -- Debug info range (see errlevel.h for additional information on debug levels).| | ||
- | |verify-x509-name Server name-prefix| | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Server Mode ===== | ||
+ | |||
+ | |client-to-client|Because the OpenVPN server mode handles multiple clients through a single tun or tap interface, it is effectively a router. | ||
+ | |:::|When this option is used, each client will " | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Client Mode ===== | ||
+ | |||
+ | |client|A helper directive designed to simplify the configuration of OpenVPN' | ||
+ | |::: | ||
+ | |::: | ||
+ | |pull|This option must be used on a client which is connecting to a multi-client server. | ||
+ | |:::|In particular, **--pull** allows the server to push routes to the client, so you should not use **--pull** or **--client** in situations where you don't trust the server to have control over the client' | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Data Channel Encryption Options ===== | ||
+ | |||
+ | |key-direction 1|Alternative way of specifying the optional direction parameter for the **--tls-auth** and **--secret** options. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== TLS Mode Options ===== | ||
+ | |||
+ | |auth-nocache|Don' | ||
+ | |:::|If specified, this directive will cause OpenVPN to immediately forget username/ | ||
+ | |:::|When using **--auth-nocache** in combination with a user/ | ||
+ | |:::|This directive does not affect the **--http-proxy** username/ | ||
+ | |remote-cert-tls client< | ||
+ | |:::|This is a useful security option for clients, to ensure that the host they connect to is a designated server.| | ||
+ | |:::|The **--remote-cert-tls client** option is equivalent to **--remote-cert-ku 80 08 88 --remote-cert-eku "TLS Web Client Authentication" | ||
+ | |:::|The key usage is digitalSignature and/or keyAgreement.| | ||
+ | |:::|The **--remote-cert-tls server** option is equivalent to **--remote-cert-ku a0 88 --remote-cert-eku "TLS Web Server Authentication" | ||
+ | |:::|The key usage is digitalSignature and ( keyEncipherment or keyAgreement ).| | ||
+ | |:::|This is an important security precaution to protect against a man-in-the-middle attack where an authorized client attempts to connect to another client by impersonating the server. | ||
+ | |tls-client|Enable TLS and assume client role during TLS handshake.| | ||
+ | |verify-x509-name Server name-prefix|Accept connections only if a host's X.509 name is equal to **name**. | ||
+ | |:::|Which X.509 name is compared to **name** depends on the setting of type. **type** can be " | ||
+ | |::: | ||
+ | |::: | ||
+ | |:::|Using a name prefix is a useful alternative to managing a CRL (Certificate Revocation List) on the client, since it allows the client to refuse all certificates except for those associated with designated servers.| | ||
+ | |::: | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Windows-Specific Options ===== | ||
+ | |||
+ | |route-method m|Which method **m** to use for adding routes on Windows?| | ||
+ | |::: | ||
+ | |::: | ||
+ | |::: | ||
+ | |||
+ | ---- | ||
openvpn/options.1587374869.txt.gz · Last modified: 2020/07/15 09:30 (external edit)