CINXE.COM

Advanced Configuration Commands - SparkLabs

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Advanced Configuration Commands - SparkLabs</title> <link href="/static/css/bootstrap.min.css" rel="stylesheet"> <link href="/static/css/sl_styles.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileColor" content="#da532c"> <meta name="theme-color" content="#ffffff"> <link href="/static/css/lity.min.css" rel="stylesheet"> <script src="/static/js/moment.min.js"></script> <link href="/blog/feed/" rel="alternate" title="SparkLabs Blog" type="application/atom+xml"> </head> <body> <div class="sl_header_background_generic" id="slheader"> <nav class="navbar navbar-default bs-docs-nav"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div style="position: relative;height:50px;"> <a class="navbar-brand" href="/">SparkLabs</a> </div> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Products <span class="caret"></span></a> <ul class="dropdown-menu dropdown-menu-left"> <li><a href="/viscosity/">Viscosity</a></li> </ul> </li> <li><a href="/blog/">Blog</a></li> <li><a href="/company/">Company</a></li> <li><a href="/support/">Support</a></li> </ul> </div><!--/.nav-collapse --> </div> </nav> <!-- Header --> <div class="container sl_header"> <div class="row"> <div class="col-md-12"> <h1 class="sl_headertext">App <span style="font-weight: 400;">Support.</span></h1> <h1 class="sl_subheadertext">We're here to help.</h1><br /> </div> </div> </div> </div> <!-- /Header --> <div class="content"> <!-- Article --> <div class="sl_row_gradient"> <div class="container bs-docs-container"> <div class="row sl_paddedrow"> <div class="col-md-12"> <ol class="breadcrumb"><li><a href="/support/kb/">Knowledge Base</a></li><li><a href="/support/kb/category/documentation/">Documentation</a></li><li class="active">Advanced Configuration Commands</li></ol><br /> </div> <div class="col-md-8"> <h3 class="sl_section_header" id="advanced-configuration-commands">Advanced Configuration Commands</h3> <div class="sl_article"><p>Viscosity provides the ability to configure additional advanced connection settings using raw configuration commands. Adding and editing configuration commands should only be attempted by advanced users: incorrect use can break your connection, make it insecure, or cause performance problems. For the vast majority of connections it is not necessary to specify or edit configuration commands. </p> <h1 id="specifying-advanced-configuration-commands">Specifying Advanced Configuration Commands</h1> <p>Viscosity allows commands to be specified in the configuration commands section, located under the Advanced tab when editing your connection in Viscosity. The screenshot below shows an example of an empty configuration commands area. </p><p>Each command should be specified on a new line in the commands area. A line should start with the desired command, followed by the paramaters (if any) separated by spaces. More information about the available commands can be found in the sections below. To remove a command simply delete the entire line it is on. </p><p><div class="row"><div class="col-xs-12 text-center screenshot_image" id="advanced-commands-macos" data-screenshot-zoom="0.50" data-screenshot-mac="advanced-commands-macos" data-screenshot-win="editor-advanced-win" ><br></div><div class="col-xs-12 text-center" style="padding-top:10px;padding-bottom:10px;"><p><a href="" class="screenshot_button screenshot_button_left_v" data-screenshot="advanced-commands-macos" data-platform="mac"><i id="icons8-mac-os" class="icons8-mac-os"></i></a><a href="" class="screenshot_button screenshot_button_right_v" data-screenshot="advanced-commands-macos" data-platform="win"><i id="icons8-windows8" class="icons8-windows8"></i></a> &nbsp; <a href="" class="screenshot_button screenshot_button_fullscreen" data-screenshot="advanced-commands-macos"><i id="icons8-enlarge" class="icons8-enlarge"></i></a></p></div></div><div id="screenshot-advanced-commands-macos" class="lity-hide"><img src="advanced-commands-macos" class="img-responsive"></div><div id="screenshot-editor-advanced-win" class="lity-hide"><img src="editor-advanced-win" class="img-responsive"></div> </p> <h1 id="advanced-viscosity-commands">Advanced Viscosity Commands</h1> <p>Viscosity provides a number of additional commands that provide advanced features and options beyond what is available through the editor. When specifying a Viscosity command it must start with <code>#viscosity</code>, which provides backwards compatibility with older clients. </p><p><br /> </p> <h2 id="static-challenge-password"><a href="#static-challenge-password">static-challenge-password </a></h2> <p><em>Syntax <code>#viscosity static-challenge-password text [delimiter]</code></em> </p><p>Specifies that Viscosity should separately prompt for a two-factor credential (such as a one-time password or PIN) and append this credential to the password sent to the server. The user will be prompted using the "text" parameter. If a delimiter (such as a special character) should be automatically added between the password and the two-factor credential, it can be optionally specified as the "delimiter" parameter. This command is designed to be used with servers using legacy authentication scripts (instead of modern challenge support) where the server expects both user's password and two-factor credential are combined. For example <code>#viscosity static-challenge-password "Please enter your one time password"</code> or <code>#viscosity static-challenge-password "Please enter your one time password" "+"</code>. </p><p><br /> </p> <h2 id="static-challenge-acknowledge"><a href="#static-challenge-acknowledge">static-challenge-acknowledge </a></h2> <p><em>Syntax <code>#viscosity static-challenge-acknowledge text</code></em> </p><p>Specifies that Viscosity should prompt the user during the authentication stage. The user will be prompted using the "text" parameter. This command is designed to be used with servers that require the user to perform an action (where no input is required) to allow the authentication request to succeed. A common use case is asking the user to approve an authentication request on a two-factor device. The prompt will be automatically closed when the authentication phase succeeds or fails. For example <code>#viscosity static-challenge-acknowledge "Please approve the authentication request on your registered mobile device to establish the connection."</code>. </p><p><br /> </p> <h2 id="system-identity-domain"><a href="#system-identity-domain">system-identity-domain </a></h2> <p><em>Syntax <code>#viscosity system-identity-domain domain</code></em> </p><p>Specifies that Viscosity should only search a particular Keychain domain when using System Identity authentication with a Match DN. Valid domains include "user", "system", "dynamic", and "all" (the default). A value of "user" will limit searches to the user鈥檚 keychain, "system" will limit searches to the system keychain, "dynamic" will limit searches to dynamic (token, smart card, etc.) keychains, and "all" will search all keychains in the user鈥檚 search list. For example <code>#viscosity system-identity-domain user</code>. </p><p><br /> </p> <h2 id="proxy-automatic"><a href="#proxy-automatic">proxy-automatic </a></h2> <p><em>Syntax: <code>#viscosity proxy-automatic address</code></em> </p><p>Specifies an automatic proxy configuration file to set on the VPN interface. If DNS mode is set to full this setting will be used by web browsers and other applications on the system. "address" must be a full http or https address to a <a href="https://en.wikipedia.org/wiki/Proxy_auto-config">PAC (Proxy Auto-Configuration)</a> file. For example <code>#viscosity proxy-automatic http://example.com/proxy.pac</code>. </p><p><br /> </p> <h2 id="proxy-http"><a href="#proxy-http">proxy-http </a></h2> <p><em>Syntax: <code>#viscosity proxy-http address port</code></em> </p><p>Specifies a Web Proxy (HTTP) to set on the VPN interface. If DNS mode is set to full this setting will be used by web browsers and other applications on the system. "address" must be a DNS or IP address of the proxy host, and port number must be the port. For example <code>#viscosity proxy-http proxy.example.com 8080</code>. </p><p><br /> </p> <h2 id="proxy-https"><a href="#proxy-https">proxy-https </a></h2> <p><em>Syntax: <code>#viscosity proxy-https address port</code></em> </p><p>Specifies a Secure Web Proxy (HTTPS) to set on the VPN interface. If DNS mode is set to full this setting will be used by web browsers and other applications on the system. "address" must be a DNS or IP address of the proxy host, and port number must be the port. For example <code>#viscosity proxy-https proxy.example.com 8080</code>. </p><p><br /> </p> <h2 id="proxy-socks"><a href="#proxy-socks">proxy-socks </a></h2> <p><em>Syntax: <code>#viscosity proxy-socks address port</code></em> </p><p>Specifies a SOCKS Proxy to set on the VPN interface. If DNS mode is set to full this setting will be used by web browsers and other applications on the system. "address" must be a DNS or IP address of the proxy host, and port number must be the port. For example <code>#viscosity proxy-socks proxy.example.com 1080</code>. </p><p><br /> </p> <h1 id="advanced-openvpn-commands">Advanced OpenVPN Commands</h1> <p>OpenVPN configuration commands that can be specified can be found below. Please be aware that this list does not contain all possible OpenVPN commands: commands that are only valid when OpenVPN is being used in server-mode, as well as ignored commands, are not listed. </p><p><br /> </p> <h2 id="allow-compression"><a href="#allow-compression">allow-compression</a></h2> <p><em>Syntax: <code>allow-compression <var>mode</var></code></em> </p><p>As described in the <em><a href="#compress">compress</a></em> option, compression is a potentially dangerous option. This option allows controlling the behaviour of OpenVPN when compression is used and allowed. Valid syntaxes: </p> <pre class="literal-block"> allow-compression allow-compression mode </pre> <p>The mode argument can be one of the following values: </p><p><code>asym</code> OpenVPN will only decompress downlink packets but not compress uplink packets. This also allows migrating to disable compression when changing both server and client configurations to remove compression at the same time is not a feasible option. </p><p><code>no</code> (default) OpenVPN will refuse any compression. If data-channel offloading is enabled, OpenVPN will additionally also refuse compression framing (stub). </p><p><code>yes</code> OpenVPN will send and receive compressed packets. </p><p><br /> </p> <h2 id="allow-pull-fqdn"><a href="#allow-pull-fqdn">allow-pull-fqdn</a></h2> <p><em>Syntax: <code>allow-pull-fqdn</code></em> </p><p>Allow client to pull DNS names from server (rather than being limited to IP address) for <em><a href="#ifconfig">ifconfig</a></em>, <em><a href="#route">route</a></em>, and <em><a href="#route-gateway">route-gateway</a></em>. </p><p><br /> </p> <h2 id="allow-recursive-routing"><a href="#allow-recursive-routing">allow-recursive-routing</a></h2> <p><em>Syntax: <code>allow-recursive-routing</code></em> </p><p>When this option is set, OpenVPN will not drop incoming tun packets with same destination as host. </p><p><br /> </p> <h2 id="askpass"><a href="#askpass">askpass</a></h2> <p><em>Syntax: <code>askpass <var>file</var></code></em> </p><p>Get certificate password from console or file before we daemonize. Valid syntaxes: </p> <pre class="literal-block"> askpass askpass file </pre> <p>For the extremely security conscious, it is possible to protect your private key with a password. Of course this means that every time the OpenVPN daemon is started you must be there to type the password. The <em>askpass </em>option allows you to start OpenVPN from the command line. It will query you for a password before it daemonizes. To protect a private key with a password you should omit the -nodes option when you use the openssl command line tool to manage certificates and private keys. If file is specified, read the password from the first line of file. Keep in mind that storing your password in a file to a certain extent invalidates the extra security provided by using an encrypted key. </p><p><br /> </p> <h2 id="auth"><a href="#auth">auth</a></h2> <p><em>Syntax: <code>auth <var>alg</var></code></em> </p><p>Authenticate data channel packets and (if enabled) tls-auth control channel packets with HMAC using message digest algorithm alg. (The default is SHA1 ). HMAC is a commonly used message authentication algorithm (MAC) that uses a data string, a secure hash algorithm and a key to produce a digital signature. The OpenVPN data channel protocol uses encrypt-then-mac (i.e. first encrypt a packet then HMAC the resulting ciphertext), which prevents padding oracle attacks. If an AEAD cipher mode (e.g. GCM) is chosen then the specified <em>auth</em> <em>algorithm is ignored for the data channel and the authentication method</em> of the AEAD cipher is used instead. Note that alg still specifies the digest used for tls-auth. In static-key encryption mode, the HMAC key is included in the key file generated by <em>genkey.</em> In TLS mode, the HMAC key is dynamically generated and shared between peers via the TLS control channel. If OpenVPN receives a packet with a bad HMAC it will drop the packet. HMAC usually adds 16 or 20 bytes per packet. Set alg=none to disable authentication. For more information on HMAC see http://www.cs.ucsd.edu/users/mihir/papers/hmac.html </p><p><br /> </p> <h2 id="auth-nocache"><a href="#auth-nocache">auth-nocache</a></h2> <p><em>Syntax: <code>auth-nocache</code></em> </p><p>Don't cache <em><a href="#askpass">askpass</a></em> or <em><a href="#auth-user-pass">auth-user-pass</a></em> username/passwords in virtual memory. If specified, this directive will cause OpenVPN to immediately forget username/password inputs after they are used. As a result, when OpenVPN needs a username/password, it will prompt for input from stdin, which may be multiple times during the duration of an OpenVPN session. When using <em>auth-nocache </em>in combination with a user/password file and <em>chroot </em>or <em>daemon,</em> make sure to use an absolute path. This directive does not affect the <em><a href="#http-proxy">http-proxy</a></em> username/password. It is always cached. </p><p><br /> </p> <h2 id="auth-retry"><a href="#auth-retry">auth-retry</a></h2> <p><em>Syntax: <code>auth-retry <var>type</var></code></em> </p><p>Controls how OpenVPN responds to username/password verification errors such as the client-side response to an <code>AUTH_FAILED</code> message from the server or verification failure of the private key password. Normally used to prevent auth errors from being fatal on the client side, and to permit username/password requeries in case of error. An <code>AUTH_FAILED</code> message is generated by the server if the client fails <em><a href="#auth-user-pass">auth-user-pass</a></em> authentication, or if the server-side <em>client-connect </em>script returns an error status when the client tries to connect. type can be one of: </p><p><code>none</code> Client will exit with a fatal error (this is the default). </p><p><code>nointeract</code> Client will retry the connection without requerying for an <em><a href="#auth-user-pass">auth-user-pass</a></em> username/password. Use this option for unattended clients. </p><p><code>interact</code> Client will requery for an <em><a href="#auth-user-pass">auth-user-pass</a></em> username/password and/or private key password before attempting a reconnection. Note that while this option cannot be pushed, it can be controlled from the management interface. </p><p><br /> </p> <h2 id="auth-token-user"><a href="#auth-token-user">auth-token-user</a></h2> <p><em>Syntax: <code>auth-token-user <var>base64username</var></code></em> </p><p>Companion option to <em>auth-token.</em> This options allows one to override the username used by the client when reauthenticating with the auth-token. It also allows one to use <em>auth-token </em>in setups that normally do not use username and password. The username has to be base64 encoded. </p><p><br /> </p> <h2 id="auth-user-pass"><a href="#auth-user-pass">auth-user-pass</a></h2> <p><em>Syntax: <code>auth-user-pass</code></em> </p><p>Authenticate with server using username/password. Valid syntaxes: </p> <pre class="literal-block"> auth-user-pass auth-user-pass up </pre> <p>If up is present, it must be a file containing username/password on 2 lines. If the password line is missing, OpenVPN will prompt for one. If up is omitted, username/password will be prompted from the console. The server configuration must specify an <em>auth-user-pass-verify</em> <em>script to verify the username/password provided by the client.</em> </p><p><br /> </p> <h2 id="bcast-buffers"><a href="#bcast-buffers">bcast-buffers</a></h2> <p><em>Syntax: <code>bcast-buffers <var>n</var></code></em> </p><p>Allocate n buffers for broadcast datagrams (default <code>256</code>). </p><p><br /> </p> <h2 id="bind"><a href="#bind">bind</a></h2> <p><em>Syntax: <code>bind <var>keywords</var></code></em> </p><p>Bind to local address and port. This is the default unless any of <em><a href="#proto">proto</a></em> tcp-client , <em><a href="#http-proxy">http-proxy</a></em> or <em><a href="#socks-proxy">socks-proxy</a></em> are used. If the optional <code>ipv6only</code> keyword is present OpenVPN will bind only to IPv6 (as opposed to IPv6 and IPv4) when a IPv6 socket is opened. </p><p><br /> </p> <h2 id="bind-dev"><a href="#bind-dev">bind-dev</a></h2> <p><em>Syntax: <code>bind-dev <var>device</var></code></em> </p><p>(Linux only) Set device to bind the server socket to a Virtual Routing and Forwarding device </p><p><br /> </p> <h2 id="block-ipv6"><a href="#block-ipv6">block-ipv6</a></h2> <p><em>Syntax: <code>block-ipv6</code></em> </p><p>On the client, instead of sending IPv6 packets over the VPN tunnel, all IPv6 packets are answered with an ICMPv6 no route host message. On the server, all IPv6 packets from clients are answered with an ICMPv6 no route to host message. This options is intended for cases when IPv6 should be blocked and other options are not available. <em>block-ipv6</em> <em>will use the remote IPv6 as source address of the ICMPv6 packets if set,</em> otherwise will use <code>fe80::7</code> as source address. For this option to make sense you actually have to route traffic to the tun interface. The following example config block would send all IPv6 traffic to OpenVPN and answer all requests with no route to host, effectively blocking IPv6 (to avoid IPv6 connections from dual-stacked clients leaking around IPv4-only VPN services). </p><p>Client config </p> <pre class="first last literal-block"> <em><a href="#ifconfig-ipv6">ifconfig-ipv6</a></em> fd15:53b6:dead::2/64 fd15:53b6:dead::1 <em><a href="#redirect-gateway">redirect-gateway</a></em> ipv6 <em>block-ipv6</em> <em></pre></em> <p>Server config Push a &quot;valid&quot; ipv6 config to the client and block on the server </p> <pre class="last literal-block"> <em><a href="#push">push</a></em> &quot;ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1&quot; <em><a href="#push">push</a></em> &quot;redirect-gateway ipv6&quot; <em>block-ipv6</em> <em></pre></em> <p>Note: this option does not influence traffic sent from the server towards the client (neither on the server nor on the client side). This is not seen as necessary, as such traffic can be most easily avoided by not configuring IPv6 on the server tun, or setting up a server-side firewall rule. </p><p><br /> </p> <h2 id="ca"><a href="#ca">ca</a></h2> <p><em>Syntax: <code>ca <var>file</var></code></em> </p><p>Certificate authority (CA) file in .pem format, also referred to as the root certificate. This file can have multiple certificates in .pem format, concatenated together. You can construct your own certificate authority certificate and private key by using a command such as: </p> <pre class="literal-block"> openssl req -nodes -new -x509 -keyout ca.key -out ca.crt </pre> <p>Then edit your openssl.cnf file and edit the certificate variable to point to your new root certificate ca.crt. For testing purposes only, the OpenVPN distribution includes a sample CA certificate (ca.crt). Of course you should never use the test certificates and test keys distributed with OpenVPN in a production environment, since by virtue of the fact that they are distributed with OpenVPN, they are totally insecure. </p><p><br /> </p> <h2 id="capath"><a href="#capath">capath</a></h2> <p><em>Syntax: <code>capath <var>dir</var></code></em> </p><p>Directory containing trusted certificates (CAs and CRLs). Not available with mbed TLS. CAs in the capath directory are expected to be named &lt;hash&gt;.&lt;n&gt;. CRLs are expected to be named &lt;hash&gt;.r&lt;n&gt;. See the -CApath option of openssl verify, and the -hash option of openssl x509, openssl crl and X509_LOOKUP_hash_dir()(3) for more information. Similar to the <em><a href="#crl-verify">crl-verify</a></em> option, CRLs are not mandatory - OpenVPN will log the usual warning in the logs if the relevant CRL is missing, but the connection will be allowed. </p><p><br /> </p> <h2 id="ccd-exclusive"><a href="#ccd-exclusive">ccd-exclusive</a></h2> <p><em>Syntax: <code>ccd-exclusive</code></em> </p><p>Require, as a condition of authentication, that a connecting client has a <em>client-config-dir </em>file. </p><p><br /> </p> <h2 id="cd"><a href="#cd">cd</a></h2> <p><em>Syntax: <code>cd <var>dir</var></code></em> </p><p>Change directory to dir prior to reading any files such as configuration files, key files, scripts, etc. dir should be an absolute path, with a leading &quot;/&quot;, and without any references to the current directory such as <code>.</code> or <code>..</code>. This option is useful when you are running OpenVPN in <em>daemon </em>mode, and you want to consolidate all of your OpenVPN control files in one location. </p><p><br /> </p> <h2 id="cert"><a href="#cert">cert</a></h2> <p><em>Syntax: <code>cert <var>file</var></code></em> </p><p>Local peer's signed certificate in .pem format -- must be signed by a certificate authority whose certificate is in <em><a href="#ca">ca</a></em> file. Each peer in an OpenVPN link running in TLS mode should have its own certificate and private key file. In addition, each certificate should have been signed by the key of a certificate authority whose public key resides in the <em><a href="#ca">ca</a></em> certificate authority file. You can easily make your own certificate authority (see above) or pay money to use a commercial service such as thawte.com (in which case you will be helping to finance the world's second space tourist&nbsp;:). To generate a certificate, you can use a command such as: </p> <pre class="literal-block"> openssl req -nodes -new -keyout mycert.key -out mycert.csr </pre> <p>If your certificate authority private key lives on another machine, copy the certificate signing request (mycert.csr) to this other machine (this can be done over an insecure channel such as email). Now sign the certificate with a command such as: </p> <pre class="literal-block"> openssl ca -out mycert.crt -in mycert.csr </pre> <p>Now copy the certificate (mycert.crt) back to the peer which initially generated the .csr file (this can be over a public medium). Note that the openssl ca command reads the location of the certificate authority key from its configuration file such as <code>/usr/share/ssl/openssl.cnf</code> -- note also that for certificate authority functions, you must set up the files <code>index.txt</code> (may be empty) and <code>serial</code> (initialize to <code>01</code>). </p><p><br /> </p> <h2 id="cipher"><a href="#cipher">cipher</a></h2> <p><em>Syntax: <code>cipher <var>alg</var></code></em> </p><p>This option should not be used any longer in TLS mode and still exists for two reasons: compatibility with old configurations still carrying it around; allow users connecting to OpenVPN peers older than 2.6.0 to have <em>cipher </em>configured the same way as the remote counterpart. This can avoid MTU/frame size warnings. Before 2.4.0, this option was used to select the cipher to be configured on the data channel, however, later versions usually ignored this directive in favour of a negotiated cipher. Starting with 2.6.0, this option is always ignored in TLS mode when it comes to configuring the cipher and will only control the cipher for <em><a href="#secret">secret</a></em> pre-shared-key mode (note: this mode is deprecated and strictly not recommended). If you wish to specify the cipher to use on the data channel, please see <em><a href="#data-ciphers">data-ciphers</a></em> (for regular negotiation) and <em><a href="#data-ciphers-fallback">data-ciphers-fallback</a></em> (for a fallback option when the negotiation cannot take place because the other peer is old or has negotiation disabled). To see ciphers that are available with OpenVPN, use the <em>show-ciphers </em>option. Set alg to <code>none</code> to disable encryption. </p><p><br /> </p> <h2 id="client-nat"><a href="#client-nat">client-nat</a></h2> <p><em>Syntax: <code>client-nat <var>args</var></code></em> </p><p>This pushable client option sets up a stateless one-to-one NAT rule on packet addresses (not ports), and is useful in cases where routes or ifconfig settings pushed to the client would create an IP numbering conflict. Examples: </p> <pre class="literal-block"> client-nat snat 192.168.0.0/255.255.0.0 client-nat dnat 10.64.0.0/255.255.0.0 </pre> <p>network/netmask (for example <code>192.168.0.0/255.255.0.0</code>) defines the local view of a resource from the client perspective, while alias/netmask (for example <code>10.64.0.0/255.255.0.0</code>) defines the remote view from the server perspective. Use <code>snat</code> (source NAT) for resources owned by the client and <code>dnat</code> (destination NAT) for remote resources. Set <em><a href="#verb">verb</a></em> 6 for debugging info showing the transformation of src/dest addresses in packets. </p><p><br /> </p> <h2 id="comp-lzo"><a href="#comp-lzo">comp-lzo</a></h2> <p><em>Syntax: <code>comp-lzo <var>mode</var></code></em> </p><p>DEPRECATED Enable LZO compression algorithm. Compression is generally not recommended. VPN tunnels which uses compression are suspectible to the VORALCE attack vector. Use LZO compression -- may add up to 1 byte per packet for incompressible data. mode may be <code>yes</code>, <code>no</code>, or <code>adaptive</code> (default). In a server mode setup, it is possible to selectively turn compression on or off for individual clients. First, make sure the client-side config file enables selective compression by having at least one <em>comp-lzo </em>directive, such as <em>comp-lzo </em>no. This will turn off compression by default, but allow a future directive push from the server to dynamically change the <code>on</code>/<code>off</code>/<code>adaptive</code> setting. Next in a <em>client-config-dir </em>file, specify the compression setting for the client, for example: </p> <pre class="literal-block"> comp-lzo yes push &quot;comp-lzo yes&quot; </pre> <p>The first line sets the comp-lzo setting for the server side of the link, the second sets the client side. </p><p><br /> </p> <h2 id="comp-noadapt"><a href="#comp-noadapt">comp-noadapt</a></h2> <p><em>Syntax: <code>comp-noadapt</code></em> </p><p>DEPRECATED When used in conjunction with <em><a href="#comp-lzo">comp-lzo</a></em>, this option will disable OpenVPN's adaptive compression algorithm. Normally, adaptive compression is enabled with <em><a href="#comp-lzo">comp-lzo</a></em>. Adaptive compression tries to optimize the case where you have compression enabled, but you are sending predominantly incompressible (or pre-compressed) packets over the tunnel, such as an FTP or rsync transfer of a large, compressed file. With adaptive compression, OpenVPN will periodically sample the compression process to measure its efficiency. If the data being sent over the tunnel is already compressed, the compression efficiency will be very low, triggering openvpn to disable compression for a period of time until the next re-sample test. </p><p><br /> </p> <h2 id="compat-mode"><a href="#compat-mode">compat-mode</a></h2> <p><em>Syntax: <code>compat-mode <var>version</var></code></em> </p><p>This option provides a convenient way to alter the defaults of OpenVPN to be more compatible with the version version specified. All of the changes this option applies can also be achieved using individual configuration options. The version specified with this option is the version of OpenVPN peer OpenVPN should try to be compatible with. In general OpenVPN should be compatible with the last two previous version without this option. E.g. OpenVPN 2.6.0 should be compatible with 2.5.x and 2.4.x without this option. However, there might be some edge cases that still require this option even in these cases. Note: Using this option reverts defaults to no longer recommended values and should be avoided if possible. The following table details what defaults are changed depending on the version specified. 2.5.x or lower: <em><a href="#allow-compression">allow-compression</a></em> asym is automatically added to the configuration if no other compression options are present. 2.4.x or lower: The cipher in <em><a href="#cipher">cipher</a></em> is appended to <em><a href="#data-ciphers">data-ciphers</a></em>. 2.3.x or lower: <em>data-cipher-fallback </em>is automatically added with the same cipher as <em><a href="#cipher">cipher</a></em>. 2.3.6 or lower: <em><a href="#tls-version-min">tls-version-min</a></em> 1.0 is added to the configuration when <em><a href="#tls-version-min">tls-version-min</a></em> is not explicitly set. If not required, this is option should be avoided. Setting this option can lower security or disable features like data-channel offloading. </p><p><br /> </p> <h2 id="compress"><a href="#compress">compress</a></h2> <p><em>Syntax: <code>compress <var>algorithm</var></code></em> </p><p>DEPRECATED Enable a compression algorithm. Compression is generally not recommended. VPN tunnels which use compression are susceptible to the VORALCE attack vector. See also the <code>migrate</code> parameter below. The algorithm parameter may be <code>lzo</code>, <code>lz4</code>, <code>lz4-v2</code>, <code>stub</code>, <code>stub-v2</code>, <code>migrate</code> or empty. LZO and LZ4 are different compression algorithms, with LZ4 generally offering the best performance with least CPU usage. The <code>lz4-v2</code> and <code>stub-v2</code> variants implement a better framing that does not add overhead when packets cannot be compressed. All other variants always add one extra framing byte compared to no compression framing. Especially <code>stub-v2</code> is essentially identical to no compression and no compression framing as its header indicates IP version 5 in a tun setup and can (ab)used to complete disable compression to clients. (See the <code>migrate</code> option below) If the algorithm parameter is <code>stub</code>, <code>stub-v2</code> or empty, compression will be turned off, but the packet framing for compression will still be enabled, allowing a different setting to be pushed later. Additionally, <code>stub</code> and <code>stub-v2</code> wil disable announcing lzo and lz4 compression support via IV_ variables to the server. Note: the <code>stub</code> (or empty) option is NOT compatible with the older option <em><a href="#comp-lzo">comp-lzo</a></em> no. Using <code>migrate</code> as compression algorithm enables a special migration mode. It allows migration away from the --compress/<em><a href="#comp-lzo">comp-lzo</a></em> options to no compression. This option sets the server to no compression mode and the server behaves identical to a server without a compression option for all clients without a compression in their config. However, if a client is detected that indicates that compression is used (via OCC), the server will automatically add <em><a href="#push">push</a></em> compress stub-v2 to the client specific configuration if supported by the client and otherwise switch to comp-lzo no and add <em><a href="#push">push</a></em> comp-lzo to the client specific configuration. </p><p>Security Considerations: Compression and encryption is a tricky combination. If an attacker knows or is able to control (parts of) the plain-text of packets that contain secrets, the attacker might be able to extract the secret if compression is enabled. See e.g. the CRIME and BREACH attacks on TLS and VORACLE on VPNs which also leverage to break encryption. If you are not entirely sure that the above does not apply to your traffic, you are advised to not enable compression. </p><p><br /> </p> <h2 id="connect-retry"><a href="#connect-retry">connect-retry</a></h2> <p><em>Syntax: <code>connect-retry <var>args</var></code></em> </p><p>Wait n seconds between connection attempts (default <code>1</code>). Repeated reconnection attempts are slowed down after 5 retries per remote by doubling the wait time after each unsuccessful attempt. Valid syntaxes: </p> <pre class="literal-block"> connect retry n connect retry n max </pre> <p>If the optional argument max is specified, the maximum wait time in seconds gets capped at that value (default <code>300</code>). </p><p><br /> </p> <h2 id="connect-retry-max"><a href="#connect-retry-max">connect-retry-max</a></h2> <p><em>Syntax: <code>connect-retry-max <var>n</var></code></em> </p><p>n specifies the number of times each <em><a href="#remote">remote</a></em> or &lt;connection&gt; entry is tried. Specifying n as <code>1</code> would try each entry exactly once. A successful connection resets the counter. (default unlimited). </p><p><br /> </p> <h2 id="connect-timeout"><a href="#connect-timeout">connect-timeout</a></h2> <p><em>Syntax: <code>connect-timeout <var>n</var></code></em> </p><p>See <em><a href="#server-poll-timeout">server-poll-timeout</a></em>. </p><p><br /> </p> <h2 id="crl-verify"><a href="#crl-verify">crl-verify</a></h2> <p><em>Syntax: <code>crl-verify <var>args</var></code></em> </p><p>Check peer certificate against a Certificate Revocation List. Valid syntax: </p> <pre class="literal-block"> crl-verify file/directory flag </pre> <p>Examples: </p> <pre class="literal-block"> crl-verify crl-file.pem crl-verify /etc/openvpn/crls dir </pre> <p>A CRL (certificate revocation list) is used when a particular key is compromised but when the overall PKI is still intact. Suppose you had a PKI consisting of a CA, root certificate, and a number of client certificates. Suppose a laptop computer containing a client key and certificate was stolen. By adding the stolen certificate to the CRL file, you could reject any connection which attempts to use it, while preserving the overall integrity of the PKI. The only time when it would be necessary to rebuild the entire PKI from scratch would be if the root certificate key itself was compromised. The option is not mandatory - if the relevant CRL is missing, OpenVPN will log a warning in the logs - e.g. </p> <pre class="literal-block"> VERIFY WARNING: depth=0, unable to get certificate CRL </pre> <p>but the connection will be allowed. If the optional <code>dir</code> flag is specified, enable a different mode where the crl-verify is pointed at a directory containing files named as revoked serial numbers (the files may be empty, the contents are never read). If a client requests a connection, where the client certificate serial number (decimal string) is the name of a file present in the directory, it will be rejected. </p><p>Note: As the crl file (or directory) is read every time a peer connects, if you are dropping root privileges with <em>user,</em> make sure that this user has sufficient privileges to read the file. </p><p><br /> </p> <h2 id="cryptoapicert"><a href="#cryptoapicert">cryptoapicert</a></h2> <p><em>Syntax: <code>cryptoapicert <var>select-string</var></code></em> </p><p>(Windows/OpenSSL Only) Load the certificate and private key from the Windows Certificate System Store. Use this option instead of <em><a href="#cert">cert</a></em> and <em><a href="#key">key</a></em>. This makes it possible to use any smart card, supported by Windows, but also any kind of certificate, residing in the Cert Store, where you have access to the private key. This option has been tested with a couple of different smart cards (GemSAFE, Cryptoflex, and Swedish Post Office eID) on the client side, and also an imported PKCS12 software certificate on the server side. To select a certificate, based on a substring search in the certificate's subject: </p> <pre class="literal-block"> cryptoapicert &quot;SUBJ:Peter Runestig&quot; </pre> <p>To select a certificate, based on certificate's thumbprint (SHA1 hash): </p> <pre class="literal-block"> cryptoapicert &quot;THUMB:f6 49 24 41 01 b4 ...&quot; </pre> <p>The thumbprint hex string can easily be copy-and-pasted from the Windows Certificate Store GUI. The embedded spaces in the hex string are optional. To select a certificate based on a substring in certificate's issuer name: </p> <pre class="literal-block"> cryptoapicert &quot;ISSUER:Sample CA&quot; </pre> <p>The first non-expired certificate found in the user's store or the machine store that matches the select-string is used. </p><p><br /> </p> <h2 id="data-ciphers"><a href="#data-ciphers">data-ciphers</a></h2> <p><em>Syntax: <code>data-ciphers <var>cipher-list</var></code></em> </p><p>Restrict the allowed ciphers to be negotiated to the ciphers in cipher-list. cipher-list is a colon-separated list of ciphers, and defaults to <code>AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305</code> when Chacha20-Poly1305 is available and otherwise <code>AES-256-GCM:AES-128-GCM</code>. For servers, the first cipher from cipher-list that is also supported by the client will be pushed to clients that support cipher negotiation. For more details see the chapter on Data channel cipher negotiation. Especially if you need to support clients with OpenVPN versions older than 2.4! Starting with OpenVPN 2.6 a cipher can be prefixed with a <code>?</code> to mark it as optional. This allows including ciphers in the list that may not be available on all platforms. E.g. <code>AES-256-GCM:AES-128-GCM:?CHACHA20-POLY1305</code> would only enable Chacha20-Poly1305 if the underlying SSL library (and its configuration) supports it. Cipher negotiation is enabled in client-server mode only. I.e. if <em>mode </em>is set to server (server-side, implied by setting <em>server </em>), or if <em><a href="#pull">pull</a></em> is specified (client-side, implied by setting --client). If no common cipher is found during cipher negotiation, the connection is terminated. To support old clients/old servers that do not provide any cipher negotiation support see <em><a href="#data-ciphers-fallback">data-ciphers-fallback</a></em>. If <em><a href="#compat-mode">compat-mode</a></em> is set to a version older than 2.5.0 the cipher specified by <em><a href="#cipher">cipher</a></em> will be appended to <em>data-ciphers </em>if not already present. This list is restricted to be 127 chars long after conversion to OpenVPN ciphers. This option was called <em>ncp-ciphers </em>in OpenVPN 2.4 but has been renamed to <em>data-ciphers </em>in OpenVPN 2.5 to more accurately reflect its meaning. </p><p><br /> </p> <h2 id="data-ciphers-fallback"><a href="#data-ciphers-fallback">data-ciphers-fallback</a></h2> <p><em>Syntax: <code>data-ciphers-fallback <var>alg</var></code></em> </p><p>Configure a cipher that is used to fall back to if we could not determine which cipher the peer is willing to use. This option should only be needed to connect to peers that are running OpenVPN 2.3 or older versions, and have been configured with <em>enable-small</em> <em>(typically used on routers or other embedded devices).</em> </p><p><br /> </p> <h2 id="dhcp-option"><a href="#dhcp-option">dhcp-option</a></h2> <p><em>Syntax: <code>dhcp-option <var>args</var></code></em> </p><p>Set additional network parameters on supported platforms. May be specified on the client or pushed from the server. On Windows these options are handled by the tap-windows6 driver by default or directly by OpenVPN if dhcp is disabled or the wintun driver is in use. The OpenVPN for Android client also handles them internally. On all other platforms these options are only saved in the client's environment under the name <code>foreign_option_{n}</code> before the <em><a href="#up">up</a></em> script is called. A plugin or an <em><a href="#up">up</a></em> script must be used to pick up and interpret these as required. Many Linux distributions include such scripts and some third-party user interfaces such as tunnelblick also come with scripts that process these options. Valid syntax: </p> <pre class="literal-block"> dhcp-option type [parm] </pre> <p><code>DOMAIN</code> name Set Connection-specific DNS Suffix to <code>name</code>. </p><p><code>ADAPTER_DOMAIN_SUFFIX</code> name Alias to <code>DOMAIN</code>. This is a compatibility option, it should not be used in new deployments. </p><p><code>DOMAIN-SEARCH</code> name Add <code>name</code> to the domain search list. Repeat this option to add more entries. Up to 10 domains are supported. </p><p><code>DNS</code> address Set primary domain name server IPv4 or IPv6 address. Repeat this option to set secondary DNS server addresses. Note: DNS IPv6 servers are currently set using netsh (the existing DHCP code can only do IPv4 DHCP, and that protocol only permits IPv4 addresses anywhere). The option will be put into the environment, so an <em><a href="#up">up</a></em> script could act upon it if needed. </p><p><code>WINS</code> address Set primary WINS server address (NetBIOS over TCP/IP Name Server). Repeat this option to set secondary WINS server addresses. </p><p><code>NBDD</code> address Set primary NBDD server address (NetBIOS over TCP/IP Datagram Distribution Server). Repeat this option to set secondary NBDD server addresses. </p><p><code>NTP</code> address Set primary NTP server address (Network Time Protocol). Repeat this option to set secondary NTP server addresses. </p><p><code>NBT</code> type Set NetBIOS over TCP/IP Node type. Possible options: </p><p><code>1</code> b-node (broadcasts) </p><p><code>2</code> p-node (point-to-point name queries to a WINS server) </p><p><code>4</code> m-node (broadcast then query name server) </p><p><code>8</code> h-node (query name server, then broadcast). </p><p><br /> <code>NBS</code> scope-id Set NetBIOS over TCP/IP Scope. A NetBIOS Scope ID provides an extended naming service for the NetBIOS over TCP/IP (Known as NBT) module. The primary purpose of a NetBIOS scope ID is to isolate NetBIOS traffic on a single network to only those nodes with the same NetBIOS scope ID. The NetBIOS scope ID is a character string that is appended to the NetBIOS name. The NetBIOS scope ID on two hosts must match, or the two hosts will not be able to communicate. The NetBIOS Scope ID also allows computers to use the same computer name, as they have different scope IDs. The Scope ID becomes a part of the NetBIOS name, making the name unique. (This description of NetBIOS scopes courtesy of NeonSurge&#64;abyss.com) </p><p><code>DISABLE-NBT</code> Disable Netbios-over-TCP/IP. </p><p><br /> <code>PROXY_HTTP</code> host port Sets a HTTP proxy that should be used when connected to the VPN. This option currently only works on OpenVPN for Android and requires Android 10 or later. </p><p><br /> </p> <h2 id="dhcp-release"><a href="#dhcp-release">dhcp-release</a></h2> <p><em>Syntax: <code>dhcp-release</code></em> </p><p>Ask Windows to release the TAP adapter lease on shutdown. This option has no effect now, as it is enabled by default starting with OpenVPN 2.4.1. </p><p><br /> </p> <h2 id="dhcp-renew"><a href="#dhcp-renew">dhcp-renew</a></h2> <p><em>Syntax: <code>dhcp-renew</code></em> </p><p>Ask Windows to renew the TAP adapter lease on startup. This option is normally unnecessary, as Windows automatically triggers a DHCP renegotiation on the TAP adapter when it comes up, however if you set the TAP-Win32 adapter Media Status property to &quot;Always Connected&quot;, you may need this flag. </p><p><br /> </p> <h2 id="disable-occ"><a href="#disable-occ">disable-occ</a></h2> <p><em>Syntax: <code>disable-occ</code></em> </p><p>DEPRECATED Disable &quot;options consistency check&quot; (OCC) in configurations that do not use TLS. Don't output a warning message if option inconsistencies are detected between peers. An example of an option inconsistency would be where one peer uses <em>dev </em>tun while the other peer uses <em>dev </em>tap. Use of this option is discouraged, but is provided as a temporary fix in situations where a recent version of OpenVPN must connect to an old version. </p><p><br /> </p> <h2 id="dns"><a href="#dns">dns</a></h2> <p><em>Syntax: <code>dns <var>args</var></code></em> </p><p>Client DNS configuration to be used with the connection. Valid syntaxes: </p> <pre class="literal-block"> dns search-domains domain [domain ...] dns server n address addr[:port] [addr[:port] ...] dns server n resolve-domains domain [domain ...] dns server n dnssec yes|optional|no dns server n transport DoH|DoT|plain dns server n sni server-name </pre> <p>The <em>dns </em>search-domains directive takes one or more domain names to be added as DNS domain suffixes. If it is repeated multiple times within a configuration the domains are appended, thus e.g. domain names pushed by a server will amend locally defined ones. The <em>dns </em>server directive is used to configure DNS server n. The server id n must be a value between -128 and 127. For pushed DNS server options it must be between 0 and 127. The server id is used to group options and also for ordering the list of configured DNS servers; lower numbers come first. DNS servers being pushed to a client replace already configured DNS servers with the same server id. The address option configures the IPv4 and / or IPv6 address(es) of the DNS server. Up to eight addresses can be specified per DNS server. Optionally a port can be appended after a colon. IPv6 addresses need to be enclosed in brackets if a port is appended. The resolve-domains option takes one or more DNS domains used to define a split-dns or dns-routing setup, where only the given domains are resolved by the server. Systems which do not support fine grained DNS domain configuration will ignore this setting. The dnssec option is used to configure validation of DNSSEC records. While the exact semantics may differ for resolvers on different systems, yes likely makes validation mandatory, no disables it, and optional uses it opportunistically. The transport option enables DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) for a DNS server. The sni option can be used with them to specify the server-name for TLS server name indication. Each server has to have at least one address configured for a configuration to be valid. All the other options can be omitted. Note that not all options may be supported on all platforms. As soon support for different systems is implemented, information will be added here how unsupported options are treated. The <em>dns </em>option will eventually obsolete the <em><a href="#dhcp-option">dhcp-option</a></em> directive. Until then it will replace configuration at the places <em><a href="#dhcp-option">dhcp-option</a></em> puts it, so that <em>dns </em>overrides <em><a href="#dhcp-option">dhcp-option</a></em>. Thus, <em>dns </em>can be used today to migrate from <em><a href="#dhcp-option">dhcp-option</a></em>. </p><p><br /> </p> <h2 id="down"><a href="#down">down</a></h2> <p><em>Syntax: <code>down <var>cmd</var></code></em> </p><p>Run command cmd after TUN/TAP device close (post <em>user </em>UID change and/or <em>chroot </em>). cmd consists of a path to script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. Called with the same parameters and environmental variables as the <em><a href="#up">up</a></em> option above. Note that if you reduce privileges by using <em>user </em>and/or <em>group,</em> your <em>down </em>script will also run at reduced privilege. </p><p><br /> </p> <h2 id="down-pre"><a href="#down-pre">down-pre</a></h2> <p><em>Syntax: <code>down-pre</code></em> </p><p>Call <em><a href="#down">down</a></em> cmd/script before, rather than after, TUN/TAP close. </p><p><br /> </p> <h2 id="ecdh-curve"><a href="#ecdh-curve">ecdh-curve</a></h2> <p><em>Syntax: <code>ecdh-curve <var>name</var></code></em> </p><p>Specify the curve to use for elliptic curve Diffie Hellman. Available curves can be listed with <em>show-curves.</em> The specified curve will only be used for ECDH TLS-ciphers. This option is not supported in mbed TLS builds of OpenVPN. </p><p><br /> </p> <h2 id="echo"><a href="#echo">echo</a></h2> <p><em>Syntax: <code>echo <var>parms</var></code></em> </p><p>Echo parms to log output. Designed to be used to send messages to a controlling application which is receiving the OpenVPN log output. </p><p><br /> </p> <h2 id="engine"><a href="#engine">engine</a></h2> <p><em>Syntax: <code>engine <var>engine-name</var></code></em> </p><p>Enable OpenSSL hardware-based crypto engine functionality. Valid syntaxes: </p> <pre class="literal-block"> engine engine engine-name </pre> <p>If engine-name is specified, use a specific crypto engine. Use the <em>show-engines </em>standalone option to list the crypto engines which are supported by OpenSSL. </p><p><br /> </p> <h2 id="explicit-exit-notify"><a href="#explicit-exit-notify">explicit-exit-notify</a></h2> <p><em>Syntax: <code>explicit-exit-notify <var>n</var></code></em> </p><p>In UDP client mode or point-to-point mode, send server/peer an exit notification if tunnel is restarted or OpenVPN process is exited. In client mode, on exit/restart, this option will tell the server to immediately close its client instance object rather than waiting for a timeout. If both server and client support sending this message using the control channel, the message will be sent as control-channel message. Otherwise the message is sent as data-channel message, which will be ignored by data-channel offloaded peers. The n parameter (default <code>1</code> if not present) controls the maximum number of attempts that the client will try to resend the exit notification message if messages are sent in data-channel mode. In UDP server mode, send <code>RESTART</code> control channel command to connected clients. The n parameter (default <code>1</code> if not present) controls client behavior. With n = <code>1</code> client will attempt to reconnect to the same server, with n = <code>2</code> client will advance to the next server. OpenVPN will not send any exit notifications unless this option is enabled. </p><p><br /> </p> <h2 id="extra-certs"><a href="#extra-certs">extra-certs</a></h2> <p><em>Syntax: <code>extra-certs <var>file</var></code></em> </p><p>Specify a file containing one or more PEM certs (concatenated together) that complete the local certificate chain. This option is useful for &quot;split&quot; CAs, where the CA for server certs is different than the CA for client certs. Putting certs in this file allows them to be used to complete the local certificate chain without trusting them to verify the peer-submitted certificate, as would be the case if the certs were placed in the ca file. </p><p><br /> </p> <h2 id="fast-io"><a href="#fast-io">fast-io</a></h2> <p><em>Syntax: <code>fast-io</code></em> </p><p>(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to poll/epoll/select prior to the write operation. The purpose of such a call would normally be to block until the device or socket is ready to accept the write. Such blocking is unnecessary on some platforms which don't support write blocking on UDP sockets or TUN/TAP devices. In such cases, one can optimize the event loop by avoiding the poll/epoll/select call, improving CPU efficiency by 5% to 10%. This option can only be used on non-Windows systems, when <em><a href="#proto">proto</a></em> udp is specified, and when <em><a href="#shaper">shaper</a></em> is NOT specified. </p><p><br /> </p> <h2 id="float"><a href="#float">float</a></h2> <p><em>Syntax: <code>float</code></em> </p><p>Allow remote peer to change its IP address and/or port number, such as due to DHCP (this is the default if <em><a href="#remote">remote</a></em> is not used). <em>float </em>when specified with <em><a href="#remote">remote</a></em> allows an OpenVPN session to initially connect to a peer at a known address, however if packets arrive from a new address and pass all authentication tests, the new address will take control of the session. This is useful when you are connecting to a peer which holds a dynamic address such as a dial-in user or DHCP client. Essentially, <em>float </em>tells OpenVPN to accept authenticated packets from any address, not only the address which was specified in the <em><a href="#remote">remote</a></em> option. </p><p><br /> </p> <h2 id="fragment"><a href="#fragment">fragment</a></h2> <p><em>Syntax: <code>fragment <var>args</var></code></em> </p><p>Valid syntax: </p> <pre class="literal-block"> fragment max fragment max mtu </pre> <p>Enable internal datagram fragmentation so that no UDP datagrams are sent which are larger than max bytes. If the <code>mtu</code> parameter is present the max parameter is interpreted to include IP and UDP encapsulation overhead. The <code>mtu</code> parameter is introduced in OpenVPN version 2.6.0. If the <code>mtu</code> parameter is absent, the max parameter is interpreted in the same way as the <em><a href="#link-mtu">link-mtu</a></em> parameter, i.e. the UDP packet size after encapsulation overhead has been added in, but not including the UDP header itself. The <em>fragment </em>option only makes sense when you are using the UDP protocol (<em><a href="#proto">proto</a></em> udp). <em>fragment </em>adds 4 bytes of overhead per datagram. See the <em><a href="#mssfix">mssfix</a></em> option below for an important related option to <em>fragment.</em> It should also be noted that this option is not meant to replace UDP fragmentation at the IP stack level. It is only meant as a last resort when path MTU discovery is broken. Using this option is less efficient than fixing path MTU discovery for your IP link and using native IP fragmentation instead. Having said that, there are circumstances where using OpenVPN's internal fragmentation capability may be your only option, such as tunneling a UDP multicast stream which requires fragmentation. </p><p><br /> </p> <h2 id="hand-window"><a href="#hand-window">hand-window</a></h2> <p><em>Syntax: <code>hand-window <var>n</var></code></em> </p><p>Handshake Window -- the TLS-based key exchange must finalize within n seconds of handshake initiation by any peer (default <code>60</code> seconds). If the handshake fails we will attempt to reset our connection with our peer and try again. Even in the event of handshake failure we will still use our expiring key for up to <em><a href="#tran-window">tran-window</a></em> seconds to maintain continuity of transmission of tunnel data. The <em>hand-window </em>parameter also controls the amount of time that the OpenVPN client repeats the pull request until it times out. </p><p><br /> </p> <h2 id="hash-size"><a href="#hash-size">hash-size</a></h2> <p><em>Syntax: <code>hash-size <var>args</var></code></em> </p><p>Set the size of the real address hash table to r and the virtual address table to v. Valid syntax: </p> <pre class="literal-block"> hash-size r v </pre> <p>By default, both tables are sized at 256 buckets. </p><p><br /> </p> <h2 id="http-proxy"><a href="#http-proxy">http-proxy</a></h2> <p><em>Syntax: <code>http-proxy <var>args</var></code></em> </p><p>Connect to remote host through an HTTP proxy. This requires at least an address server and port argument. If HTTP Proxy-Authenticate is required, a file name to an authfile file containing a username and password on 2 lines can be given, or <code>stdin</code> to prompt from console. Its content can also be specified in the config file with the <em><a href="#http-proxy-user-pass">http-proxy-user-pass</a></em> option (See INLINE FILE SUPPORT). The last optional argument is an auth-method which should be one of <code>none</code>, <code>basic</code>, or <code>ntlm</code>. HTTP Digest authentication is supported as well, but only via the <code>auto</code> or <code>auto-nct</code> flags (below). This must replace the authfile argument. The <code>auto</code> flag causes OpenVPN to automatically determine the auth-method and query stdin or the management interface for username/password credentials, if required. This flag exists on OpenVPN 2.1 or higher. The auto-nct flag (no clear-text auth) instructs OpenVPN to automatically determine the authentication method, but to reject weak authentication protocols such as HTTP Basic Authentication. Examples: </p> <pre class="last literal-block"> # no authentication http-proxy proxy.example.net 3128 # basic authentication, load credentials from file http-proxy proxy.example.net 3128 authfile.txt # basic authentication, ask user for credentials http-proxy proxy.example.net 3128 stdin # NTLM authentication, load credentials from file http-proxy proxy.example.net 3128 authfile.txt ntlm2 # determine which authentication is required, ask user for credentials http-proxy proxy.example.net 3128 auto # determine which authentication is required, but reject basic http-proxy proxy.example.net 3128 auto-nct # determine which authentication is required, but set credentials http-proxy proxy.example.net 3128 auto http-proxy-user-pass authfile.txt # basic authentication, specify credentials inline http-proxy proxy.example.net 3128 &quot;&quot; basic &lt;http-proxy-user-pass&gt; username password &lt;/http-proxy-user-pass&gt; </pre> <p><br /> </p> <h2 id="http-proxy-option"><a href="#http-proxy-option">http-proxy-option</a></h2> <p><em>Syntax: <code>http-proxy-option <var>args</var></code></em> </p><p>Set extended HTTP proxy options. Requires an option type as argument and an optional parameter to the type. Repeat to set multiple options. </p><p><code>VERSION</code> version Set HTTP version number to version (default <code>1.0</code>). </p><p><code>AGENT</code> user-agent Set HTTP &quot;User-Agent&quot; string to user-agent. </p><p><code>CUSTOM-HEADER</code> name content Adds the custom Header with name as name and content as the content of the custom HTTP header. Examples: </p> <pre class="last literal-block"> http-proxy-option VERSION 1.1 http-proxy-option AGENT OpenVPN/2.4 http-proxy-option X-Proxy-Flag some-flags </pre> <p><br /> </p> <h2 id="http-proxy-user-pass"><a href="#http-proxy-user-pass">http-proxy-user-pass</a></h2> <p><em>Syntax: <code>http-proxy-user-pass <var>userpass</var></code></em> </p><p>Overwrite the username/password information for <em><a href="#http-proxy">http-proxy</a></em>. If specified as an inline option (see INLINE FILE SUPPORT), it will be interpreted as username/password separated by a newline. When specified on the command line it is interpreted as a filename same as the third argument to <em><a href="#http-proxy">http-proxy</a></em>. Example: </p> <pre class="last literal-block"> &lt;http-proxy-user-pass&gt; username password &lt;/http-proxy-user-pass&gt; </pre> <p><br /> </p> <h2 id="ifconfig"><a href="#ifconfig">ifconfig</a></h2> <p><em>Syntax: <code>ifconfig <var>args</var></code></em> </p><p>Set TUN/TAP adapter parameters. It requires the IP address of the local VPN endpoint. For TUN devices in point-to-point mode, the next argument must be the VPN IP address of the remote VPN endpoint. For TAP devices, or TUN devices used with <em><a href="#topology">topology</a></em> subnet, the second argument is the subnet mask of the virtual network segment which is being created or connected to. For TUN devices, which facilitate virtual point-to-point IP connections (when used in <em><a href="#topology">topology</a></em> net30 or p2p mode), the proper usage of <em>ifconfig </em>is to use two private IP addresses which are not a member of any existing subnet which is in use. The IP addresses may be consecutive and should have their order reversed on the remote peer. After the VPN is established, by pinging rn, you will be pinging across the VPN. For TAP devices, which provide the ability to create virtual ethernet segments, or TUN devices in <em><a href="#topology">topology</a></em> subnet mode (which create virtual &quot;multipoint networks&quot;), <em>ifconfig </em>is used to set an IP address and subnet mask just as a physical ethernet adapter would be similarly configured. If you are attempting to connect to a remote ethernet bridge, the IP address and subnet should be set to values which would be valid on the the bridged ethernet segment (note also that DHCP can be used for the same purpose). This option, while primarily a proxy for the ifconfig(8) command, is designed to simplify TUN/TAP tunnel configuration by providing a standard interface to the different ifconfig implementations on different platforms. <em>ifconfig </em>parameters which are IP addresses can also be specified as a DNS or /etc/hosts file resolvable name. For TAP devices, <em>ifconfig </em>should not be used if the TAP interface will be getting an IP address lease from a DHCP server. Examples: </p> <pre class="last literal-block"> # tun device in net30/p2p mode ifconfig 10.8.0.2 10.8.0.1 # tun/tap device in subnet mode ifconfig 10.8.0.2 255.255.255.0 </pre> <p><br /> </p> <h2 id="ifconfig-ipv6"><a href="#ifconfig-ipv6">ifconfig-ipv6</a></h2> <p><em>Syntax: <code>ifconfig-ipv6 <var>args</var></code></em> </p><p>Configure an IPv6 address on the tun device. Valid syntax: </p> <pre class="literal-block"> ifconfig-ipv6 ipv6addr/bits [ipv6remote] </pre> <p>The ipv6addr/bits argument is the IPv6 address to use. The second parameter is used as route target for <em><a href="#route-ipv6">route-ipv6</a></em> if no gateway is specified. The <em><a href="#topology">topology</a></em> option has no influence with <em>ifconfig-ipv6</em> </p><p><br /> </p> <h2 id="ifconfig-noexec"><a href="#ifconfig-noexec">ifconfig-noexec</a></h2> <p><em>Syntax: <code>ifconfig-noexec</code></em> </p><p>Don't actually execute ifconfig/netsh commands, instead pass <em><a href="#ifconfig">ifconfig</a></em> parameters to scripts using environmental variables. </p><p><br /> </p> <h2 id="ifconfig-nowarn"><a href="#ifconfig-nowarn">ifconfig-nowarn</a></h2> <p><em>Syntax: <code>ifconfig-nowarn</code></em> </p><p>Don't output an options consistency check warning if the <em><a href="#ifconfig">ifconfig</a></em> option on this side of the connection doesn't match the remote side. This is useful when you want to retain the overall benefits of the options consistency check (also see <em><a href="#disable-occ">disable-occ</a></em> option) while only disabling the ifconfig component of the check. For example, if you have a configuration where the local host uses <em><a href="#ifconfig">ifconfig</a></em> but the remote host does not, use <em>ifconfig-nowarn</em> <em>on the local host.</em> This option will also silence warnings about potential address conflicts which occasionally annoy more experienced users by triggering &quot;false positive&quot; warnings. </p><p><br /> </p> <h2 id="ignore-unknown-option"><a href="#ignore-unknown-option">ignore-unknown-option</a></h2> <p><em>Syntax: <code>ignore-unknown-option <var>args</var></code></em> </p><p>Valid syntax: </p> <pre class="literal-block"> ignore-unknown-options opt1 opt2 opt3 ... optN </pre> <p>When one of options opt1 ... optN is encountered in the configuration file the configuration file parsing does not fail if this OpenVPN version does not support the option. Multiple <em>ignore-unknown-option </em>options can be given to support a larger number of options to ignore. This option should be used with caution, as there are good security reasons for having OpenVPN fail if it detects problems in a config file. Having said that, there are valid reasons for wanting new software features to gracefully degrade when encountered by older software versions. <em>ignore-unknown-option </em>is available since OpenVPN 2.3.3. </p><p><br /> </p> <h2 id="inactive"><a href="#inactive">inactive</a></h2> <p><em>Syntax: <code>inactive <var>args</var></code></em> </p><p>Causes OpenVPN to exit after n seconds of inactivity on the TUN/TAP device. The time length of inactivity is measured since the last incoming or outgoing tunnel packet. The default value is 0 seconds, which disables this feature. Valid syntaxes: </p> <pre class="literal-block"> inactive n inactive n bytes </pre> <p>If the optional bytes parameter is included, exit if less than bytes of combined in/out traffic are produced on the tun/tap device in n seconds. In any case, OpenVPN's internal ping packets (which are just keepalives) and TLS control packets are not considered &quot;activity&quot;, nor are they counted as traffic, as they are used internally by OpenVPN and are not an indication of actual user activity. </p><p><br /> </p> <h2 id="ip-win32"><a href="#ip-win32">ip-win32</a></h2> <p><em>Syntax: <code>ip-win32 <var>method</var></code></em> </p><p>When using <em><a href="#ifconfig">ifconfig</a></em> on Windows, set the TAP-Win32 adapter IP address and netmask using method. Don't use this option unless you are also using <em><a href="#ifconfig">ifconfig</a></em>. </p><p><code>manual</code> Don't set the IP address or netmask automatically. Instead output a message to the console telling the user to configure the adapter manually and indicating the IP/netmask which OpenVPN expects the adapter to be set to. </p><p><code>dynamic [offset] [lease-time]</code> Automatically set the IP address and netmask by replying to DHCP query messages generated by the kernel. This mode is probably the &quot;cleanest&quot; solution for setting the TCP/IP properties since it uses the well-known DHCP protocol. There are, however, two prerequisites for using this mode: The TCP/IP properties for the TAP-Win32 adapter must be set to &quot;Obtain an IP address automatically&quot;, and OpenVPN needs to claim an IP address in the subnet for use as the virtual DHCP server address. By default in <em>dev </em>tap mode, OpenVPN will take the normally unused first address in the subnet. For example, if your subnet is <code>192.168.4.0 netmask 255.255.255.0</code>, then OpenVPN will take the IP address <code>192.168.4.0</code> to use as the virtual DHCP server address. In <em>dev </em>tun mode, OpenVPN will cause the DHCP server to masquerade as if it were coming from the remote endpoint. The optional offset parameter is an integer which is &gt; <code>-256</code> and &lt; <code>256</code> and which defaults to 0. If offset is positive, the DHCP server will masquerade as the IP address at network address + offset. If offset is negative, the DHCP server will masquerade as the IP address at broadcast address + offset. The Windows <code>ipconfig /all</code> command can be used to show what Windows thinks the DHCP server address is. OpenVPN will &quot;claim&quot; this address, so make sure to use a free address. Having said that, different OpenVPN instantiations, including different ends of the same connection, can share the same virtual DHCP server address. The lease-time parameter controls the lease time of the DHCP assignment given to the TAP-Win32 adapter, and is denoted in seconds. Normally a very long lease time is preferred because it prevents routes involving the TAP-Win32 adapter from being lost when the system goes to sleep. The default lease time is one year. </p><p><code>netsh</code> Automatically set the IP address and netmask using the Windows command-line &quot;netsh&quot; command. This method appears to work correctly on Windows XP but not Windows 2000. </p><p><code>ipapi</code> Automatically set the IP address and netmask using the Windows IP Helper API. This approach does not have ideal semantics, though testing has indicated that it works okay in practice. If you use this option, it is best to leave the TCP/IP properties for the TAP-Win32 adapter in their default state, i.e. &quot;Obtain an IP address automatically.&quot; </p><p><code>adaptive</code> (Default) Try <code>dynamic</code> method initially and fail over to <code>netsh</code> if the DHCP negotiation with the TAP-Win32 adapter does not succeed in 20 seconds. Such failures have been known to occur when certain third-party firewall packages installed on the client machine block the DHCP negotiation used by the TAP-Win32 adapter. Note that if the <code>netsh</code> failover occurs, the TAP-Win32 adapter TCP/IP properties will be reset from DHCP to static, and this will cause future OpenVPN startups using the <code>adaptive</code> mode to use <code>netsh</code> immediately, rather than trying <code>dynamic</code> first. To &quot;unstick&quot; the <code>adaptive</code> mode from using <code>netsh</code>, run OpenVPN at least once using the <code>dynamic</code> mode to restore the TAP-Win32 adapter TCP/IP properties to a DHCP configuration. </p><p><br /> </p> <h2 id="ipchange"><a href="#ipchange">ipchange</a></h2> <p><em>Syntax: <code>ipchange <var>cmd</var></code></em> </p><p>Run command cmd when our remote ip-address is initially authenticated or changes. cmd consists of a path to a script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. When cmd is executed two arguments are appended after any arguments specified in cmd , as follows: </p> <pre class="literal-block"> cmd ip address port number </pre> <p>Don't use <em>ipchange </em>in <em>mode </em>server mode. Use a <em>client-connect </em>script instead. See the Environmental Variables section below for additional parameters passed as environmental variables. If you are running in a dynamic IP address environment where the IP addresses of either peer could change without notice, you can use this script, for example, to edit the <code>/etc/hosts</code> file with the current address of the peer. The script will be run every time the remote peer changes its IP address. Similarly if our IP address changes due to DHCP, we should configure our IP address change script (see man page for dhcpcd(8)) to deliver a SIGHUP or SIGUSR1 signal to OpenVPN. OpenVPN will then re-establish a connection with its most recently authenticated peer on its new IP address. </p><p><br /> </p> <h2 id="iproute"><a href="#iproute">iproute</a></h2> <p><em>Syntax: <code>iproute <var>cmd</var></code></em> </p><p>Set alternate command to execute instead of default iproute2 command. May be used in order to execute OpenVPN in unprivileged environment. </p><p><br /> </p> <h2 id="keepalive"><a href="#keepalive">keepalive</a></h2> <p><em>Syntax: <code>keepalive <var>args</var></code></em> </p><p>A helper directive designed to simplify the expression of <em><a href="#ping">ping</a></em> and <em><a href="#ping-restart">ping-restart</a></em>. Valid syntax: </p> <pre class="literal-block"> keepalive interval timeout </pre> <p>Send ping once every interval seconds, restart if ping is not received for timeout seconds. This option can be used on both client and server side, but it is enough to add this on the server side as it will push appropriate <em><a href="#ping">ping</a></em> and <em><a href="#ping-restart">ping-restart</a></em> options to the client. If used on both server and client, the values pushed from server will override the client local values. The timeout argument will be twice as long on the server side. This ensures that a timeout is detected on client side before the server side drops the connection. For example, <em>keepalive </em>10 60 expands as follows: </p> <pre class="last literal-block"> if mode server: ping 10 # Argument: interval ping-restart 120 # Argument: timeout*2 push &quot;ping 10&quot; # Argument: interval push &quot;ping-restart 60&quot; # Argument: timeout else ping 10 # Argument: interval ping-restart 60 # Argument: timeout </pre> <p><br /> </p> <h2 id="key"><a href="#key">key</a></h2> <p><em>Syntax: <code>key <var>file</var></code></em> </p><p>Local peer's private key in .pem format. Use the private key which was generated when you built your peer's certificate (see <em><a href="#cert">cert</a></em> file above). </p><p><br /> </p> <h2 id="key-direction"><a href="#key-direction">key-direction</a></h2> <p><em>Syntax: <code>key-direction</code></em> </p><p>Alternative way of specifying the optional direction parameter for the <em><a href="#tls-auth">tls-auth</a></em> and <em><a href="#secret">secret</a></em> options. Useful when using inline files (See section on inline files). </p><p><br /> </p> <h2 id="key-method"><a href="#key-method">key-method</a></h2> <p><em>Syntax: <code>key-method</code></em> </p><p>Removed in OpenVPN 2.5. This option should not be used, as using the old key-method weakens the VPN tunnel security. The old key-method was also only needed when the remote side was older than OpenVPN 2.0. </p><p><br /> </p> <h2 id="link-mtu"><a href="#link-mtu">link-mtu</a></h2> <p><em>Syntax: <code>link-mtu <var>n</var></code></em> </p><p>DEPRECATED Sets an upper bound on the size of UDP packets which are sent between OpenVPN peers. It's best not to set this parameter unless you know what you're doing. Due to variable header size of IP header (20 bytes for IPv4 and 40 bytes for IPv6) and dynamically negotiated data channel cipher, this option is not reliable. It is recommended to set tun-mtu with enough headroom instead. </p><p><br /> </p> <h2 id="lladdr"><a href="#lladdr">lladdr</a></h2> <p><em>Syntax: <code>lladdr <var>address</var></code></em> </p><p>Specify the link layer address, more commonly known as the MAC address. Only applied to TAP devices. </p><p><br /> </p> <h2 id="local"><a href="#local">local</a></h2> <p><em>Syntax: <code>local <var>host</var></code></em> </p><p>Local host name or IP address for bind. If specified, OpenVPN will bind to this address only. If unspecified, OpenVPN will bind to all interfaces. </p><p><br /> </p> <h2 id="lport"><a href="#lport">lport</a></h2> <p><em>Syntax: <code>lport <var>port</var></code></em> </p><p>Set local TCP/UDP port number or name. Cannot be used together with <em><a href="#nobind">nobind</a></em> option. </p><p><br /> </p> <h2 id="mark"><a href="#mark">mark</a></h2> <p><em>Syntax: <code>mark <var>value</var></code></em> </p><p>Mark encrypted packets being sent with value. The mark value can be matched in policy routing and packetfilter rules. This option is only supported in Linux and does nothing on other operating systems. </p><p><br /> </p> <h2 id="max-packet-size"><a href="#max-packet-size">max-packet-size</a></h2> <p><em>Syntax: <code>max-packet-size <var>size</var></code></em> </p><p>This option will instruct OpenVPN to try to limit the maximum on-write packet size by restricting the control channel packet size and setting <em><a href="#mssfix">mssfix</a></em>. OpenVPN will try to keep its control channel messages below this size but due to some constraints in the protocol this is not always possible. If the option is not set, the control packet maximum size defaults to 1250. The control channel packet size will be restricted to values between 154 and 2048. The maximum packet size includes encapsulation overhead like UDP and IP. In terms of <em><a href="#mssfix">mssfix</a></em> it will expand to: </p> <pre class="literal-block"> mssfix size mtu </pre> <p>If you need to set <em><a href="#mssfix">mssfix</a></em> for data channel and control channel maximum packet size independently, use <em>max-packet-size </em>first, followed by a <em><a href="#mssfix">mssfix</a></em> in the configuration. In general the default size of 1250 should work almost universally apart from specific corner cases, especially since IPv6 requires a MTU of 1280 or larger. </p><p><br /> </p> <h2 id="mssfix"><a href="#mssfix">mssfix</a></h2> <p><em>Syntax: <code>mssfix <var>args</var></code></em> </p><p>Valid syntax: </p> <pre class="literal-block"> mssfix max [mtu] mssfix max [fixed] mssfix </pre> <p>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 default value is <code>1492 mtu</code>. Use <code>0</code> as max to disable mssfix. If the <code>mtu</code> parameter is specified the max value is interpreted as the resulting packet size of VPN packets including the IP and UDP header. Support for the <code>mtu</code> parameter was added with OpenVPN version 2.6.0. If the <code>mtu</code> parameter is not specified, the max parameter is interpreted in the same way as the <em><a href="#link-mtu">link-mtu</a></em> parameter, i.e. the UDP packet size after encapsulation overhead has been added in, but not including the UDP header itself. Resulting packet would be at most 28 bytes larger for IPv4 and 48 bytes for IPv6 (20/40 bytes for IP header and 8 bytes for UDP header). Default value of 1450 allows OpenVPN packets to be transmitted over IPv4 on a link with MTU 1478 or higher without IP level fragmentation (and 1498 for IPv6). If the <code>fixed</code> parameter is specified, OpenVPN will make no attempt to calculate the VPN encapsulation overhead but instead will set the MSS to limit the size of the payload IP packets to the specified number. IPv4 packets will have the MSS value lowered to mssfix - 40 and IPv6 packets to mssfix - 60. if <em>mssfix </em>is specified is specified without any parameter it inherits the parameters of <em><a href="#fragment">fragment</a></em> if specified or uses the default for <em>mssfix </em>otherwise. The <em>mssfix </em>option only makes sense when you are using the UDP protocol for OpenVPN peer-to-peer communication, i.e. <em><a href="#proto">proto</a></em> udp. <em>mssfix </em>and <em><a href="#fragment">fragment</a></em> can be ideally used together, where <em>mssfix </em>will try to keep TCP from needing packet fragmentation in the first place, and if big packets come through anyhow (from protocols other than TCP), <em><a href="#fragment">fragment</a></em> will internally fragment them. <em><a href="#max-packet-size">max-packet-size</a></em>, <em><a href="#fragment">fragment</a></em>, and <em>mssfix </em>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 <em><a href="#fragment">fragment</a></em> and <em>mssfix </em>are used together, <em>mssfix </em>will take its default max parameter from the <em><a href="#fragment">fragment</a></em> max option. Therefore, one could lower the maximum UDP packet size to 1300 (a good first try for solving MTU-related connection problems) with the following options: </p> <pre class="literal-block"> <em><a href="#tun-mtu">tun-mtu</a></em> 1500 <em><a href="#fragment">fragment</a></em> 1300 <em>mssfix</em> <em></pre></em> <p>If the max-packet-size size option is used in the configuration it will also act as if mssfix size mtu was specified in the configuration. </p><p><br /> </p> <h2 id="mtu-test"><a href="#mtu-test">mtu-test</a></h2> <p><em>Syntax: <code>mtu-test</code></em> </p><p>To empirically measure MTU on connection startup, add the <em>mtu-test</em> <em>option to your configuration. OpenVPN will send ping packets of various</em> sizes to the remote peer and measure the largest packets which were successfully received. The <em>mtu-test </em>process normally takes about 3 minutes to complete. </p><p><br /> </p> <h2 id="mute"><a href="#mute">mute</a></h2> <p><em>Syntax: <code>mute <var>n</var></code></em> </p><p>Log at most n consecutive messages in the same category. This is useful to limit repetitive logging of similar message types. </p><p><br /> </p> <h2 id="mute-replay-warnings"><a href="#mute-replay-warnings">mute-replay-warnings</a></h2> <p><em>Syntax: <code>mute-replay-warnings</code></em> </p><p>Silence the output of replay warnings, which are a common false alarm on WiFi networks. This option preserves the security of the replay protection code without the verbosity associated with warnings about duplicate packets. </p><p><br /> </p> <h2 id="nobind"><a href="#nobind">nobind</a></h2> <p><em>Syntax: <code>nobind</code></em> </p><p>Do not bind to local address and port. The IP stack will allocate a dynamic port for returning packets. Since the value of the dynamic port could not be known in advance by a peer, this option is only suitable for peers which will be initiating connections by using the <em><a href="#remote">remote</a></em> option. </p><p><br /> </p> <h2 id="ns-cert-type"><a href="#ns-cert-type">ns-cert-type</a></h2> <p><em>Syntax: <code>ns-cert-type</code></em> </p><p>Removed in OpenVPN 2.5. The nsCertType field is no longer supported in recent SSL/TLS libraries. If your certificates does not include key usage and extended key usage fields, they must be upgraded and the <em><a href="#remote-cert-tls">remote-cert-tls</a></em> option should be used instead. </p><p><br /> </p> <h2 id="passtos"><a href="#passtos">passtos</a></h2> <p><em>Syntax: <code>passtos</code></em> </p><p>Set the TOS field of the tunnel packet to what the payload's TOS is. </p><p><br /> </p> <h2 id="peer-fingerprint"><a href="#peer-fingerprint">peer-fingerprint</a></h2> <p><em>Syntax: <code>peer-fingerprint <var>args</var></code></em> </p><p>Specify a SHA256 fingerprint or list of SHA256 fingerprints to verify the peer certificate against. The peer certificate must match one of the fingerprint or certificate verification will fail. The option can also be inlined Valid syntax: </p> <pre class="literal-block"> peer-fingerprint AD:B0:95:D8:09:... </pre> <p>or inline: </p> <pre class="literal-block"> &lt;peer-fingerprint&gt; 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff 11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00 &lt;/peer-fingerprint&gt; </pre> <p>When the <em>peer-fingerprint </em>option is used, specifying a CA with <em><a href="#ca">ca</a></em> or <em><a href="#capath">capath</a></em> is optional. This allows the he <em>peer-fingerprint </em>to be used as alternative to a PKI with self-signed certificates for small setups. See the examples section for such a setup. </p><p><br /> </p> <h2 id="persist-key"><a href="#persist-key">persist-key</a></h2> <p><em>Syntax: <code>persist-key</code></em> </p><p>Don't re-read key files across <code>SIGUSR1</code> or <em><a href="#ping-restart">ping-restart</a></em>. This option can be combined with <em>user </em>to allow restarts triggered by the <code>SIGUSR1</code> signal. Normally if you drop root privileges in OpenVPN, the daemon cannot be restarted since it will now be unable to re-read protected key files. This option solves the problem by persisting keys across <code>SIGUSR1</code> resets, so they don't need to be re-read. </p><p><br /> </p> <h2 id="persist-local-ip"><a href="#persist-local-ip">persist-local-ip</a></h2> <p><em>Syntax: <code>persist-local-ip</code></em> </p><p>Preserve initially resolved local IP address and port number across SIGUSR1 or <em><a href="#ping-restart">ping-restart</a></em> restarts. </p><p><br /> </p> <h2 id="persist-remote-ip"><a href="#persist-remote-ip">persist-remote-ip</a></h2> <p><em>Syntax: <code>persist-remote-ip</code></em> </p><p>Preserve most recently authenticated remote IP address and port number across <code>SIGUSR1</code> or <em><a href="#ping-restart">ping-restart</a></em> restarts. </p><p><br /> </p> <h2 id="persist-tun"><a href="#persist-tun">persist-tun</a></h2> <p><em>Syntax: <code>persist-tun</code></em> </p><p>Don't close and reopen TUN/TAP device or run up/down scripts across <code>SIGUSR1</code> or <em><a href="#ping-restart">ping-restart</a></em> restarts. <code>SIGUSR1</code> is a restart signal similar to <code>SIGHUP</code>, but which offers finer-grained control over reset options. </p><p><br /> </p> <h2 id="ping"><a href="#ping">ping</a></h2> <p><em>Syntax: <code>ping <var>n</var></code></em> </p><p>Ping remote over the TCP/UDP control channel if no packets have been sent for at least n seconds (specify <em>ping </em>on both peers to cause ping packets to be sent in both directions since OpenVPN ping packets are not echoed like IP ping packets). When used in one of OpenVPN's secure modes (where <em><a href="#secret">secret</a></em>, <em>tls-server </em>or <em><a href="#tls-client">tls-client</a></em> is specified), the ping packet will be cryptographically secure. This option has two intended uses: Compatibility with stateful firewalls. The periodic ping will ensure that a stateful firewall rule which allows OpenVPN UDP packets to pass will not time out. To provide a basis for the remote to test the existence of its peer using the <em><a href="#ping-exit">ping-exit</a></em> option. When using OpenVPN in server mode see also <em><a href="#keepalive">keepalive</a></em>. </p><p><br /> </p> <h2 id="ping-exit"><a href="#ping-exit">ping-exit</a></h2> <p><em>Syntax: <code>ping-exit <var>n</var></code></em> </p><p>Causes OpenVPN to exit after n seconds pass without reception of a ping or other packet from remote. This option can be combined with <em><a href="#inactive">inactive</a></em>, <em><a href="#ping">ping</a></em> and <em>ping-exit </em>to create a two-tiered inactivity disconnect. For example, </p> <pre class="literal-block"> openvpn [options...] <em><a href="#inactive">inactive</a></em> 3600 <em><a href="#ping">ping</a></em> 10 <em>ping-exit </em>60 </pre> <p>when used on both peers will cause OpenVPN to exit within 60 seconds if its peer disconnects, but will exit after one hour if no actual tunnel data is exchanged. </p><p><br /> </p> <h2 id="ping-restart"><a href="#ping-restart">ping-restart</a></h2> <p><em>Syntax: <code>ping-restart <var>n</var></code></em> </p><p>Similar to <em><a href="#ping-exit">ping-exit</a></em>, but trigger a <code>SIGUSR1</code> restart after n seconds pass without reception of a ping or other packet from remote. This option is useful in cases where the remote peer has a dynamic IP address and a low-TTL DNS name is used to track the IP address using a service such as https://www.nsupdate.info/ + a dynamic DNS client such as ddclient. If the peer cannot be reached, a restart will be triggered, causing the hostname used with <em><a href="#remote">remote</a></em> to be re-resolved (if <em><a href="#resolv-retry">resolv-retry</a></em> is also specified). In server mode, <em>ping-restart,</em> <em><a href="#inactive">inactive</a></em> or any other type of internally generated signal will always be applied to individual client instance objects, never to whole server itself. Note also in server mode that any internally generated signal which would normally cause a restart, will cause the deletion of the client instance object instead. In client mode, the <em>ping-restart </em>parameter is set to 120 seconds by default. This default will hold until the client pulls a replacement value from the server, based on the <em><a href="#keepalive">keepalive</a></em> setting in the server configuration. To disable the 120 second default, set <em>ping-restart </em>0 on the client. See the signals section below for more information on <code>SIGUSR1</code>. Note that the behavior of SIGUSR1 can be modified by the <em><a href="#persist-tun">persist-tun</a></em>, <em><a href="#persist-key">persist-key</a></em>, <em><a href="#persist-local-ip">persist-local-ip</a></em> and <em><a href="#persist-remote-ip">persist-remote-ip</a></em> options. Also note that <em><a href="#ping-exit">ping-exit</a></em> and <em>ping-restart </em>are mutually exclusive and cannot be used together. </p><p><br /> </p> <h2 id="pkcs11-cert-private"><a href="#pkcs11-cert-private">pkcs11-cert-private</a></h2> <p><em>Syntax: <code>pkcs11-cert-private <var>args</var></code></em> </p><p>Set if access to certificate object should be performed after login. Every provider has its own setting. Valid syntaxes: </p> <pre class="last literal-block"> pkcs11-cert-private 0 pkcs11-cert-private 1 </pre> <p><br /> </p> <h2 id="pkcs11-id"><a href="#pkcs11-id">pkcs11-id</a></h2> <p><em>Syntax: <code>pkcs11-id <var>name</var></code></em> </p><p>Specify the serialized certificate id to be used. The id can be gotten by the standalone <em>show-pkcs11-ids </em>option. See also the description of <em><a href="#pkcs11-providers">pkcs11-providers</a></em> option. </p><p><br /> </p> <h2 id="pkcs11-pin-cache"><a href="#pkcs11-pin-cache">pkcs11-pin-cache</a></h2> <p><em>Syntax: <code>pkcs11-pin-cache <var>seconds</var></code></em> </p><p>Specify how many seconds the PIN can be cached, the default is until the token is removed. </p><p><br /> </p> <h2 id="pkcs11-private-mode"><a href="#pkcs11-private-mode">pkcs11-private-mode</a></h2> <p><em>Syntax: <code>pkcs11-private-mode <var>mode</var></code></em> </p><p>Specify which method to use in order to perform private key operations. A different mode can be specified for each provider. Mode is encoded as hex number, and can be a mask one of the following: <code>0</code> (default) Try to determine automatically. <code>1</code> Use sign. <code>2</code> Use sign recover. <code>4</code> Use decrypt. <code>8</code> Use unwrap. </p><p><br /> </p> <h2 id="pkcs11-protected-authentication"><a href="#pkcs11-protected-authentication">pkcs11-protected-authentication</a></h2> <p><em>Syntax: <code>pkcs11-protected-authentication <var>args</var></code></em> </p><p>Use PKCS#11 protected authentication path, useful for biometric and external keypad devices. Every provider has its own setting. Valid syntaxes: </p> <pre class="last literal-block"> pkcs11-protected-authentication 0 pkcs11-protected-authentication 1 </pre> <p><br /> </p> <h2 id="pkcs11-providers"><a href="#pkcs11-providers">pkcs11-providers</a></h2> <p><em>Syntax: <code>pkcs11-providers <var>providers</var></code></em> </p><p>Specify an RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) providers to load. A space-separated list of one or more provider library names may be specified. This option along with <em><a href="#pkcs11-id">pkcs11-id</a></em> or pkcs11-id-management can be used instead of <em><a href="#cert">cert</a></em> and <em><a href="#key">key</a></em> or <em><a href="#pkcs12">pkcs12</a></em>. If p11-kit is present on the system and was enabled during build, its <code>p11-kit-proxy.so</code> module will be loaded by default if either the <em><a href="#pkcs11-id">pkcs11-id</a></em> or <em>pkcs11-id-management </em>options is present without <em>pkcs11-providers.</em> If default loading is not enabled in the build and no providers are specified, the former options will be ignored. </p><p><br /> </p> <h2 id="pkcs12"><a href="#pkcs12">pkcs12</a></h2> <p><em>Syntax: <code>pkcs12 <var>file</var></code></em> </p><p>Specify a PKCS #12 file containing local private key, local certificate, and root CA certificate. This option can be used instead of <em><a href="#ca">ca</a></em>, <em><a href="#cert">cert</a></em>, and <em><a href="#key">key</a></em>. Not available with mbed TLS. </p><p><br /> </p> <h2 id="port"><a href="#port">port</a></h2> <p><em>Syntax: <code>port <var>port</var></code></em> </p><p>TCP/UDP port number or port name for both local and remote (sets both <em><a href="#lport">lport</a></em> and <em><a href="#rport">rport</a></em> options to given port). The current default of 1194 represents the official IANA port number assignment for OpenVPN and has been used since version 2.0-beta17. Previous versions used port 5000 as the default. </p><p><br /> </p> <h2 id="proto"><a href="#proto">proto</a></h2> <p><em>Syntax: <code>proto <var>p</var></code></em> </p><p>Use protocol p for communicating with remote host. p can be <code>udp</code>, <code>tcp-client</code>, or <code>tcp-server</code>. You can also limit OpenVPN to use only IPv4 or only IPv6 by specifying p as <code>udp4</code>, <code>tcp4-client</code>, <code>tcp4-server</code> or <code>udp6</code>, <code>tcp6-client</code>, <code>tcp6-server</code>, respectively. The default protocol is <code>udp</code> when <em>proto </em>is not specified. For UDP operation, <em>proto </em>udp should be specified on both peers. For TCP operation, one peer must use <em>proto </em>tcp-server and the other must use <em>proto </em>tcp-client. A peer started with <code>tcp-server</code> will wait indefinitely for an incoming connection. A peer started with <code>tcp-client</code> will attempt to connect, and if that fails, will sleep for 5 seconds (adjustable via the <em><a href="#connect-retry">connect-retry</a></em> option) and try again infinite or up to N retries (adjustable via the <em><a href="#connect-retry-max">connect-retry-max</a></em> option). Both TCP client and server will simulate a SIGUSR1 restart signal if either side resets the connection. OpenVPN is designed to operate optimally over UDP, but TCP capability is provided for situations where UDP cannot be used. In comparison with UDP, TCP will usually be somewhat less efficient and less robust when used over unreliable or congested networks. This article outlines some of problems with tunneling IP over TCP: http://sites.inka.de/sites/bigred/devel/tcp-tcp.html There are certain cases, however, where using TCP may be advantageous from a security and robustness perspective, such as tunneling non-IP or application-level UDP protocols, or tunneling protocols which don't possess a built-in reliability layer. </p><p><br /> </p> <h2 id="proto-force"><a href="#proto-force">proto-force</a></h2> <p><em>Syntax: <code>proto-force <var>p</var></code></em> </p><p>When iterating through connection profiles, only consider profiles using protocol p (<code>tcp</code> | <code>udp</code>). Note that this specifically only filters by the transport layer protocol, i.e. UDP or TCP. This does not affect whether IPv4 or IPv6 is used as IP protocol. For implementation reasons the option accepts the <code>4</code> and <code>6</code> suffixes when specifying the protocol (i.e. <code>udp4</code> / <code>udp6</code> / <code>tcp4</code> / <code>tcp6</code>). However, these behave the same as without the suffix and should be avoided to prevent confusion. </p><p><br /> </p> <h2 id="providers"><a href="#providers">providers</a></h2> <p><em>Syntax: <code>providers <var>providers</var></code></em> </p><p>Load the list of (OpenSSL) providers. This is mainly useful for using an external provider for key management like tpm2-openssl or to load the legacy provider with </p> <pre class="literal-block"> <em>providers </em>legacy default </pre> <p>Behaviour of changing this option between <code>SIGHUP</code> might not be well behaving. If you need to change/add/remove this option, fully restart OpenVPN. </p><p><br /> </p> <h2 id="pull"><a href="#pull">pull</a></h2> <p><em>Syntax: <code>pull</code></em> </p><p>This option must be used on a client which is connecting to a multi-client server. It indicates to OpenVPN that it should accept options pushed by the server, provided they are part of the legal set of pushable options (note that the <em>pull </em>option is implied by <em>client </em>). In particular, <em>pull </em>allows the server to push routes to the client, so you should not use <em>pull </em>or <em>client </em>in situations where you don't trust the server to have control over the client's routing table. </p><p><br /> </p> <h2 id="pull-filter"><a href="#pull-filter">pull-filter</a></h2> <p><em>Syntax: <code>pull-filter <var>args</var></code></em> </p><p>Filter options on the client pushed by the server to the client. Valid syntaxes: </p> <pre class="literal-block"> pull-filter accept text pull-filter ignore text pull-filter reject text </pre> <p>Filter options received from the server if the option starts with <code>text</code>. The action flag <code>accept</code> allows the option, <code>ignore</code> removes it and <code>reject</code> flags an error and triggers a <code>SIGUSR1</code> restart. The filters may be specified multiple times, and each filter is applied in the order it is specified. The filtering of each option stops as soon as a match is found. Unmatched options are accepted by default. Prefix comparison is used to match <code>text</code> against the received option so that </p> <pre class="literal-block"> pull-filter ignore &quot;route&quot; </pre> <p>would remove all pushed options starting with route which would include, for example, route-gateway. Enclose text in quotes to embed spaces. </p> <pre class="literal-block"> pull-filter accept &quot;route 192.168.1.&quot; pull-filter ignore &quot;route &quot; </pre> <p>would remove all routes that do not start with 192.168.1. Note that <code>reject</code> may result in a repeated cycle of failure and reconnect, unless multiple remotes are specified and connection to the next remote succeeds. To silently ignore an option pushed by the server, use <code>ignore</code>. </p><p><br /> </p> <h2 id="push"><a href="#push">push</a></h2> <p><em>Syntax: <code>push <var>option</var></code></em> </p><p>Push a config file option back to the client for remote execution. Note that option must be enclosed in double quotes (<code>&quot;&quot;</code>). The client must specify <em><a href="#pull">pull</a></em> in its config file. The set of options which can be pushed is limited by both feasibility and security. Some options such as those which would execute scripts are banned, since they would effectively allow a compromised server to execute arbitrary code on the client. Other options such as TLS or MTU parameters cannot be pushed because the client needs to know them before the connection to the server can be initiated. This is a partial list of options which can currently be pushed: <em><a href="#route">route</a></em>, <em><a href="#route-gateway">route-gateway</a></em>, <em><a href="#route-delay">route-delay</a></em>, <em><a href="#redirect-gateway">redirect-gateway</a></em>, <em><a href="#ip-win32">ip-win32</a></em>, <em><a href="#dhcp-option">dhcp-option</a></em>, <em><a href="#dns">dns</a></em>, <em><a href="#inactive">inactive</a></em>, <em><a href="#ping">ping</a></em>, <em><a href="#ping-exit">ping-exit</a></em>, <em><a href="#ping-restart">ping-restart</a></em>, <em><a href="#setenv">setenv</a></em>, <em>auth-token,</em> <em><a href="#persist-key">persist-key</a></em>, <em><a href="#persist-tun">persist-tun</a></em>, <em><a href="#echo">echo</a></em>, <em><a href="#comp-lzo">comp-lzo</a></em>, <em><a href="#socket-flags">socket-flags</a></em>, <em><a href="#sndbuf">sndbuf</a></em>, <em><a href="#rcvbuf">rcvbuf</a></em>, <em><a href="#session-timeout">session-timeout</a></em> </p><p><br /> </p> <h2 id="push-peer-info"><a href="#push-peer-info">push-peer-info</a></h2> <p><em>Syntax: <code>push-peer-info</code></em> </p><p>Push additional information about the client to server. The following data is always pushed to the server: </p><p><code>IV_VER=&lt;version&gt;</code> The client OpenVPN version </p><p><code>IV_PLAT=[linux|solaris|openbsd|mac|netbsd|freebsd|win]</code> The client OS platform </p><p><code>IV_PROTO</code> Details about protocol extensions that the peer supports. The variable is a bitfield and the bits are defined as follows: bit 0: Reserved, should always be zero bit 1: The peer supports peer-id floating mechanism bit 2: The client expects a push-reply and the server may send this reply without waiting for a push-request first. bit 3: The client is capable of doing key derivation using RFC5705 key material exporter. bit 4: The client is capable of accepting additional arguments to the AUTH_PENDING message. bit 5: The client supports doing feature negotiation in P2P mode bit 6: The client is capable of parsing and receiving the <em><a href="#dns">dns</a></em> pushed option bit 7: The client is capable of sending exit notification via control channel using EXIT message. Also, the client is accepting the protocol-flags pushed option for the EKM capability bit 8: The client is capable of accepting AUTH_FAILED,TEMP messages bit 9: The client is capable of dynamic tls-crypt </p><p><br /> <code>IV_NCP=2</code> Negotiable ciphers, client supports <em><a href="#cipher">cipher</a></em> pushed by the server, a value of 2 or greater indicates client supports AES-GCM-128 and AES-GCM-256. IV_NCP is deprecated in favor of IV_CIPHERS. </p><p><code>IV_CIPHERS=&lt;data-ciphers&gt;</code> The client announces the list of supported ciphers configured with the <em><a href="#data-ciphers">data-ciphers</a></em> option to the server. </p><p><code>IV_MTU=&lt;max_mtu&gt;</code> The client announces the support of pushable MTU and the maximum MTU it is willing to accept. </p><p><code>IV_GUI_VER=&lt;gui_id&gt; &lt;version&gt;</code> The UI version of a UI if one is running, for example <code>de.blinkt.openvpn 0.5.47</code> for the Android app. This may be set by the client UI/GUI using <em><a href="#setenv">setenv</a></em>. </p><p><code>IV_SSO=[crtext,][openurl,][proxy_url]</code> Additional authentication methods supported by the client. This may be set by the client UI/GUI using <em><a href="#setenv">setenv</a></em>. The following flags depend on which compression formats are compiled in and whether compression is allowed by options. See Protocol options for more details. </p><p><br /> <code>IV_LZO=1</code> If client supports LZO compression. </p><p><code>IV_LZO_STUB=1</code> If client was built with LZO stub capability. This is only sent if IV_LZO=1 is not sent. This means the client can talk to a server configured with <em><a href="#comp-lzo">comp-lzo</a></em> no. </p><p><code>IV_LZ4=1</code> and <code>IV_LZ4v2=1</code> If the client supports LZ4 compression. </p><p><code>IV_COMP_STUB=1</code> and <code>IV_COMP_STUBv2=1</code> If the client supports stub compression. This means the client can talk to a server configured with <em><a href="#compress">compress</a></em>. </p><p>When <em>push-peer-info </em>is enabled the additional information consists of the following data: </p><p><code>IV_HWADDR=&lt;string&gt;</code> This is intended to be a unique and persistent ID of the client. The string value can be any readable ASCII string up to 64 bytes. OpenVPN 2.x and some other implementations use the MAC address of the client's interface used to reach the default gateway. If this string is generated by the client, it should be consistent and preserved across independent sessions and preferably re-installations and upgrades. </p><p><code>IV_SSL=&lt;version string&gt;</code> The ssl library version used by the client, e.g. <code>OpenSSL 1.0.2f 28 Jan 2016</code>. </p><p><code>IV_PLAT_VER=x.y</code> The version of the operating system, e.g. 6.1 for Windows 7. This may be set by the client UI/GUI using <em><a href="#setenv">setenv</a></em>. On Windows systems it is automatically determined by openvpn itself. </p><p><code>UV_&lt;name&gt;=&lt;value&gt;</code> Client environment variables whose names start with <code>UV_</code> </p><p><br /> </p> <h2 id="rcvbuf"><a href="#rcvbuf">rcvbuf</a></h2> <p><em>Syntax: <code>rcvbuf <var>size</var></code></em> </p><p>Set the TCP/UDP socket receive buffer size. Defaults to operating system default. </p><p><br /> </p> <h2 id="redirect-gateway"><a href="#redirect-gateway">redirect-gateway</a></h2> <p><em>Syntax: <code>redirect-gateway <var>flags</var></code></em> </p><p>Automatically execute routing commands to cause all outgoing IP traffic to be redirected over the VPN. This is a client-side option. This option performs three steps: Create a static route for the <em><a href="#remote">remote</a></em> address which forwards to the pre-existing default gateway. This is done so that (3) will not create a routing loop. Delete the default gateway route. Set the new default gateway to be the VPN endpoint address (derived either from <em><a href="#route-gateway">route-gateway</a></em> or the second parameter to <em><a href="#ifconfig">ifconfig</a></em> when <em>dev </em>tun is specified). When the tunnel is torn down, all of the above steps are reversed so that the original default route is restored. Option flags: </p><p><code>local</code> Add the <code>local</code> flag if both OpenVPN peers are directly connected via a common subnet, such as with wireless. The <code>local</code> flag will cause step (1) above to be omitted. </p><p><code>autolocal</code> Try to automatically determine whether to enable <code>local</code> flag above. </p><p><code>def1</code> Use this flag to override the default gateway by using <code>0.0.0.0/1</code> and <code>128.0.0.0/1</code> rather than <code>0.0.0.0/0</code>. This has the benefit of overriding but not wiping out the original default gateway. </p><p><code>bypass-dhcp</code> Add a direct route to the DHCP server (if it is non-local) which bypasses the tunnel (Available on Windows clients, may not be available on non-Windows clients). </p><p><code>bypass-dns</code> Add a direct route to the DNS server(s) (if they are non-local) which bypasses the tunnel (Available on Windows clients, may not be available on non-Windows clients). </p><p><code>block-local</code> Block access to local LAN when the tunnel is active, except for the LAN gateway itself. This is accomplished by routing the local LAN (except for the LAN gateway address) into the tunnel. </p><p><code>ipv6</code> Redirect IPv6 routing into the tunnel. This works similar to the <code>def1</code> flag, that is, more specific IPv6 routes are added (<code>2000::/4</code>, <code>3000::/4</code>), covering the whole IPv6 unicast space. </p><p><code>!ipv4</code> Do not redirect IPv4 traffic - typically used in the flag pair <code>ipv6&nbsp;!ipv4</code> to redirect IPv6-only. </p><p><br /> </p> <h2 id="redirect-private"><a href="#redirect-private">redirect-private</a></h2> <p><em>Syntax: <code>redirect-private <var>flags</var></code></em> </p><p>Like <em><a href="#redirect-gateway">redirect-gateway</a></em>, but omit actually changing the default gateway. Useful when pushing private subnets. </p><p><br /> </p> <h2 id="register-dns"><a href="#register-dns">register-dns</a></h2> <p><em>Syntax: <code>register-dns</code></em> </p><p>Run <code>ipconfig /flushdns</code> and <code>ipconfig /registerdns</code> on connection initiation. This is known to kick Windows into recognizing pushed DNS servers. </p><p><br /> </p> <h2 id="remap-usr1"><a href="#remap-usr1">remap-usr1</a></h2> <p><em>Syntax: <code>remap-usr1 <var>signal</var></code></em> </p><p>Control whether internally or externally generated <code>SIGUSR1</code> signals are remapped to <code>SIGHUP</code> (restart without persisting state) or <code>SIGTERM</code> (exit). signal can be set to <code>SIGHUP</code> or <code>SIGTERM</code>. By default, no remapping occurs. </p><p><br /> </p> <h2 id="remote"><a href="#remote">remote</a></h2> <p><em>Syntax: <code>remote <var>args</var></code></em> </p><p>Remote host name or IP address, port and protocol. Valid syntaxes: </p> <pre class="literal-block"> remote host remote host port remote host port proto </pre> <p>The port and proto arguments are optional. The OpenVPN client will try to connect to a server at host:port. The proto argument indicates the protocol to use when connecting with the remote, and may be <code>tcp</code> or <code>udp</code>. To enforce IPv4 or IPv6 connections add a <code>4</code> or <code>6</code> suffix; like <code>udp4</code> / <code>udp6</code> / <code>tcp4</code> / <code>tcp6</code>. On the client, multiple <em>remote </em>options may be specified for redundancy, each referring to a different OpenVPN server, in the order specified by the list of <em>remote </em>options. Specifying multiple <em>remote </em>options for this purpose is a special case of the more general connection-profile feature. See the &lt;connection&gt; documentation below. The client will move on to the next host in the list, in the event of connection failure. Note that at any given time, the OpenVPN client will at most be connected to one server. Examples: </p> <pre class="literal-block"> remote server1.example.net remote server1.example.net 1194 remote server2.example.net 1194 tcp </pre> <p>Note: Since UDP is connectionless, connection failure is defined by the <em><a href="#ping">ping</a></em> and <em><a href="#ping-restart">ping-restart</a></em> options. Also, if you use multiple <em>remote </em>options, AND you are dropping root privileges on the client with <em>user </em>and/or <em>group </em>AND the client is running a non-Windows OS, if the client needs to switch to a different server, and that server pushes back different TUN/TAP or route settings, the client may lack the necessary privileges to close and reopen the TUN/TAP interface. This could cause the client to exit with a fatal error. </p><p>If <em>remote </em>is unspecified, OpenVPN will listen for packets from any IP address, but will not act on those packets unless they pass all authentication tests. This requirement for authentication is binding on all potential peers, even those from known and supposedly trusted IP addresses (it is very easy to forge a source IP address on a UDP packet). When used in TCP mode, <em>remote </em>will act as a filter, rejecting connections from any host which does not match host. If host is a DNS name which resolves to multiple IP addresses, OpenVPN will try them in the order that the system getaddrinfo() presents them, so priorization and DNS randomization is done by the system library. Unless an IP version is forced by the protocol specification (4/6 suffix), OpenVPN will try both IPv4 and IPv6 addresses, in the order getaddrinfo() returns them. </p><p><br /> </p> <h2 id="remote-cert-eku"><a href="#remote-cert-eku">remote-cert-eku</a></h2> <p><em>Syntax: <code>remote-cert-eku <var>oid</var></code></em> </p><p>Require that peer certificate was signed with an explicit extended key usage. This is a useful security option for clients, to ensure that the host they connect to is a designated server. The extended key usage should be encoded in oid notation, or OpenSSL symbolic representation. </p><p><br /> </p> <h2 id="remote-cert-ku"><a href="#remote-cert-ku">remote-cert-ku</a></h2> <p><em>Syntax: <code>remote-cert-ku <var>key-usage</var></code></em> </p><p>Require that peer certificate was signed with an explicit key-usage. If present in the certificate, the <code>keyUsage</code> value is validated by the TLS library during the TLS handshake. Specifying this option without arguments requires this extension to be present (so the TLS library will verify it). If key-usage is a list of usage bits, the <code>keyUsage</code> field must have at least the same bits set as the bits in one of the values supplied in the key-usage list. The key-usage values in the list must be encoded in hex, e.g. </p> <pre class="last literal-block"> remote-cert-ku a0 </pre> <p><br /> </p> <h2 id="remote-cert-tls"><a href="#remote-cert-tls">remote-cert-tls</a></h2> <p><em>Syntax: <code>remote-cert-tls <var>type</var></code></em> </p><p>Require that peer certificate was signed with an explicit key usage and extended key usage based on RFC3280 TLS rules. Valid syntaxes: </p> <pre class="literal-block"> remote-cert-tls server remote-cert-tls client </pre> <p>This is a useful security option for clients, to ensure that the host they connect to is a designated server. Or the other way around; for a server to verify that only hosts with a client certificate can connect. The <em>remote-cert-tls </em>client option is equivalent to </p> <pre class="literal-block"> remote-cert-ku remote-cert-eku &quot;TLS Web Client Authentication&quot; </pre> <p>The <em>remote-cert-tls </em>server option is equivalent to </p> <pre class="literal-block"> remote-cert-ku remote-cert-eku &quot;TLS Web Server Authentication&quot; </pre> <p>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. The attack is easily prevented by having clients verify the server certificate using any one of <em>remote-cert-tls,</em> <em><a href="#verify-x509-name">verify-x509-name</a></em>, <em><a href="#peer-fingerprint">peer-fingerprint</a></em> or <em><a href="#tls-verify">tls-verify</a></em>. </p><p><br /> </p> <h2 id="remote-random"><a href="#remote-random">remote-random</a></h2> <p><em>Syntax: <code>remote-random</code></em> </p><p>When multiple <em><a href="#remote">remote</a></em> address/ports are specified, or if connection profiles are being used, initially randomize the order of the list as a kind of basic load-balancing measure. </p><p><br /> </p> <h2 id="remote-random-hostname"><a href="#remote-random-hostname">remote-random-hostname</a></h2> <p><em>Syntax: <code>remote-random-hostname</code></em> </p><p>Prepend a random string (6 bytes, 12 hex characters) to hostname to prevent DNS caching. For example, &quot;foo.bar.gov&quot; would be modified to &quot;&lt;random-chars&gt;.foo.bar.gov&quot;. </p><p><br /> </p> <h2 id="reneg-bytes"><a href="#reneg-bytes">reneg-bytes</a></h2> <p><em>Syntax: <code>reneg-bytes <var>n</var></code></em> </p><p>Renegotiate data channel key after n bytes sent or received (disabled by default with an exception, see below). OpenVPN allows the lifetime of a key to be expressed as a number of bytes encrypted/decrypted, a number of packets, or a number of seconds. A key renegotiation will be forced if any of these three criteria are met by either peer. If using ciphers with cipher block sizes less than 128-bits, <em>reneg-bytes </em>is set to 64MB by default, unless it is explicitly disabled by setting the value to <code>0</code>, but this is HIGHLY DISCOURAGED as this is designed to add some protection against the SWEET32 attack vector. For more information see the <em><a href="#cipher">cipher</a></em> option. </p><p><br /> </p> <h2 id="reneg-pkts"><a href="#reneg-pkts">reneg-pkts</a></h2> <p><em>Syntax: <code>reneg-pkts <var>n</var></code></em> </p><p>Renegotiate data channel key after n packets sent and received (disabled by default). </p><p><br /> </p> <h2 id="reneg-sec"><a href="#reneg-sec">reneg-sec</a></h2> <p><em>Syntax: <code>reneg-sec <var>args</var></code></em> </p><p>Renegotiate data channel key after at most max seconds (default <code>3600</code>) and at least min seconds (default is 90% of max for servers, and equal to max for clients). </p> <pre class="literal-block"> reneg-sec max [min] </pre> <p>The effective <em>reneg-sec </em>value used is per session pseudo-uniform-randomized between min and max. With the default value of <code>3600</code> this results in an effective per session value in the range of <code>3240</code> .. <code>3600</code> seconds for servers, or just 3600 for clients. When using dual-factor authentication, note that this default value may cause the end user to be challenged to reauthorize once per hour. Also, keep in mind that this option can be used on both the client and server, and whichever uses the lower value will be the one to trigger the renegotiation. A common mistake is to set <em>reneg-sec </em>to a higher value on either the client or server, while the other side of the connection is still using the default value of <code>3600</code> seconds, meaning that the renegotiation will still occur once per <code>3600</code> seconds. The solution is to increase <em>reneg-sec </em>on both the client and server, or set it to <code>0</code> on one side of the connection (to disable), and to your chosen value on the other side. </p><p><br /> </p> <h2 id="replay-persist"><a href="#replay-persist">replay-persist</a></h2> <p><em>Syntax: <code>replay-persist <var>file</var></code></em> </p><p>Persist replay-protection state across sessions using file to save and reload the state. This option will keep a disk copy of the current replay protection state (i.e. the most recent packet timestamp and sequence number received from the remote peer), so that if an OpenVPN session is stopped and restarted, it will reject any replays of packets which were already received by the prior session. This option only makes sense when replay protection is enabled (the default) and you are using either <em><a href="#secret">secret</a></em> (shared-secret key mode) or TLS mode with <em><a href="#tls-auth">tls-auth</a></em>. </p><p><br /> </p> <h2 id="replay-window"><a href="#replay-window">replay-window</a></h2> <p><em>Syntax: <code>replay-window <var>args</var></code></em> </p><p>Modify the replay protection sliding-window size and time window. Valid syntaxes: </p> <pre class="literal-block"> replay-window n replay-window n t </pre> <p>Use a replay protection sliding-window of size n and a time window of t seconds. By default n is <code>64</code> (the IPSec default) and t is <code>15</code> seconds. This option is only relevant in UDP mode, i.e. when either <em><a href="#proto">proto</a></em> udp is specified, or no <em><a href="#proto">proto</a></em> option is specified. When OpenVPN tunnels IP packets over UDP, there is the possibility that packets might be dropped or delivered out of order. Because OpenVPN, like IPSec, is emulating the physical network layer, it will accept an out-of-order packet sequence, and will deliver such packets in the same order they were received to the TCP/IP protocol stack, provided they satisfy several constraints. The packet cannot be a replay (unless <em>no-replay </em>is specified, which disables replay protection altogether). If a packet arrives out of order, it will only be accepted if the difference between its sequence number and the highest sequence number received so far is less than n. If a packet arrives out of order, it will only be accepted if it arrives no later than t seconds after any packet containing a higher sequence number. If you are using a network link with a large pipeline (meaning that the product of bandwidth and latency is high), you may want to use a larger value for n. Satellite links in particular often require this. If you run OpenVPN at <em><a href="#verb">verb</a></em> 4, you will see the message &quot;PID_ERR replay-window backtrack occurred [x]&quot; every time the maximum sequence number backtrack seen thus far increases. This can be used to calibrate n. There is some controversy on the appropriate method of handling packet reordering at the security layer. Namely, to what extent should the security layer protect the encapsulated protocol from attacks which masquerade as the kinds of normal packet loss and reordering that occur over IP networks? The IPSec and OpenVPN approach is to allow packet reordering within a certain fixed sequence number window. OpenVPN adds to the IPSec model by limiting the window size in time as well as sequence space. OpenVPN also adds TCP transport as an option (not offered by IPSec) in which case OpenVPN can adopt a very strict attitude towards message deletion and reordering: Don't allow it. Since TCP guarantees reliability, any packet loss or reordering event can be assumed to be an attack. In this sense, it could be argued that TCP tunnel transport is preferred when tunneling non-IP or UDP application protocols which might be vulnerable to a message deletion or reordering attack which falls within the normal operational parameters of IP networks. So I would make the statement that one should never tunnel a non-IP protocol or UDP application protocol over UDP, if the protocol might be vulnerable to a message deletion or reordering attack that falls within the normal operating parameters of what is to be expected from the physical IP layer. The problem is easily fixed by simply using TCP as the VPN transport layer. </p><p><br /> </p> <h2 id="resolv-retry"><a href="#resolv-retry">resolv-retry</a></h2> <p><em>Syntax: <code>resolv-retry <var>n</var></code></em> </p><p>If hostname resolve fails for <em><a href="#remote">remote</a></em>, retry resolve for n seconds before failing. Set n to <code>infinite</code> to retry indefinitely. By default, <em>resolv-retry </em>infinite is enabled. You can disable by setting n=0. </p><p><br /> </p> <h2 id="route"><a href="#route">route</a></h2> <p><em>Syntax: <code>route <var>args</var></code></em> </p><p>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. Valid syntaxes: </p> <pre class="literal-block"> route network/IP route network/IP netmask route network/IP netmask gateway route network/IP netmask gateway metric </pre> <p>This option is intended as a convenience proxy for the route(8) shell command, while at the same time providing portable semantics across OpenVPN's platform space. </p><p>netmask defaults to <code>255.255.255.255</code> when not given </p><p>gateway default taken from <em><a href="#route-gateway">route-gateway</a></em> or the second parameter to <em><a href="#ifconfig">ifconfig</a></em> when <em>dev </em>tun is specified. </p><p>metric default taken from <em><a href="#route-metric">route-metric</a></em> if set, otherwise <code>0</code>. The default can be specified by leaving an option blank or setting it to <code>default</code>. The network and gateway parameters can also be specified as a DNS or <code>/etc/hosts</code> file resolvable name, or as one of three special keywords: </p><p><code>vpn_gateway</code> The remote VPN endpoint address (derived either from <em><a href="#route-gateway">route-gateway</a></em> or the second parameter to <em><a href="#ifconfig">ifconfig</a></em> when <em>dev </em>tun is specified). </p><p><code>net_gateway</code> The pre-existing IP default gateway, read from the routing table (not supported on all OSes). </p><p><code>remote_host</code> The <em><a href="#remote">remote</a></em> address if OpenVPN is being run in client mode, and is undefined in server mode. </p><p><br /> </p> <h2 id="route-delay"><a href="#route-delay">route-delay</a></h2> <p><em>Syntax: <code>route-delay <var>args</var></code></em> </p><p>Valid syntaxes: </p> <pre class="literal-block"> route-delay route-delay n route-delay n w </pre> <p>Delay n seconds (default <code>0</code>) after connection establishment, before adding routes. If n is <code>0</code>, routes will be added immediately upon connection establishment. If <em>route-delay </em>is omitted, routes will be added immediately after TUN/TAP device open and <em><a href="#up">up</a></em> script execution, before any <em>user </em>or <em>group </em>privilege downgrade (or <em>chroot </em>execution.) This option is designed to be useful in scenarios where DHCP is used to set tap adapter addresses. The delay will give the DHCP handshake time to complete before routes are added. On Windows, <em>route-delay </em>tries to be more intelligent by waiting w seconds (default <code>30</code>) for the TAP-Win32 adapter to come up before adding routes. </p><p><br /> </p> <h2 id="route-gateway"><a href="#route-gateway">route-gateway</a></h2> <p><em>Syntax: <code>route-gateway <var>arg</var></code></em> </p><p>Specify a default gateway for use with <em><a href="#route">route</a></em>. If <code>dhcp</code> is specified as the parameter, the gateway address will be extracted from a DHCP negotiation with the OpenVPN server-side LAN. Valid syntaxes: </p> <pre class="last literal-block"> route-gateway gateway route-gateway dhcp </pre> <p><br /> </p> <h2 id="route-ipv6"><a href="#route-ipv6">route-ipv6</a></h2> <p><em>Syntax: <code>route-ipv6 <var>args</var></code></em> </p><p>Setup IPv6 routing in the system to send the specified IPv6 network into OpenVPN's tun. Valid syntax: </p> <pre class="literal-block"> route-ipv6 ipv6addr/bits [gateway] [metric] </pre> <p>The gateway parameter is only used for IPv6 routes across tap devices, and if missing, the ipv6remote field from <em><a href="#ifconfig-ipv6">ifconfig-ipv6</a></em> or <em><a href="#route-ipv6-gateway">route-ipv6-gateway</a></em> is used. </p><p><br /> </p> <h2 id="route-ipv6-gateway"><a href="#route-ipv6-gateway">route-ipv6-gateway</a></h2> <p><em>Syntax: <code>route-ipv6-gateway <var>gw</var></code></em> </p><p>Specify a default gateway gw for use with <em><a href="#route-ipv6">route-ipv6</a></em>. </p><p><br /> </p> <h2 id="route-method"><a href="#route-method">route-method</a></h2> <p><em>Syntax: <code>route-method <var>m</var></code></em> </p><p>Which method m to use for adding routes on Windows? </p><p><code>adaptive</code> (default) Try IP helper API first. If that fails, fall back to the route.exe shell command. </p><p><code>ipapi</code> Use IP helper API. </p><p><code>exe</code> Call the route.exe shell command. </p><p><br /> </p> <h2 id="route-metric"><a href="#route-metric">route-metric</a></h2> <p><em>Syntax: <code>route-metric <var>m</var></code></em> </p><p>Specify a default metric m for use with <em><a href="#route">route</a></em>. </p><p><br /> </p> <h2 id="route-nopull"><a href="#route-nopull">route-nopull</a></h2> <p><em>Syntax: <code>route-nopull</code></em> </p><p>When used with <em>client </em>or <em><a href="#pull">pull</a></em>, 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's routing table, however note that this option still allows the server to set the TCP/IP properties of the client's TUN/TAP interface. </p><p><br /> </p> <h2 id="route-pre-down"><a href="#route-pre-down">route-pre-down</a></h2> <p><em>Syntax: <code>route-pre-down <var>cmd</var></code></em> </p><p>Run command cmd before routes are removed upon disconnection. cmd consists of a path to a script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. See the Environmental Variables section below for additional parameters passed as environmental variables. </p><p><br /> </p> <h2 id="route-up"><a href="#route-up">route-up</a></h2> <p><em>Syntax: <code>route-up <var>cmd</var></code></em> </p><p>Run command cmd after routes are added, subject to <em><a href="#route-delay">route-delay</a></em>. cmd consists of a path to a script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. See the Environmental Variables section below for additional parameters passed as environmental variables. </p><p><br /> </p> <h2 id="rport"><a href="#rport">rport</a></h2> <p><em>Syntax: <code>rport <var>port</var></code></em> </p><p>Set TCP/UDP port number or name used by the <em><a href="#remote">remote</a></em> option. The port can also be set directly using the <em><a href="#remote">remote</a></em> option. </p><p><br /> </p> <h2 id="script-security"><a href="#script-security">script-security</a></h2> <p><em>Syntax: <code>script-security <var>level</var></code></em> </p><p>This directive offers policy-level control over OpenVPN's usage of external programs and scripts. Lower level values are more restrictive, higher values are more permissive. Settings for level: </p><p><code>0</code> Strictly no calling of external programs. </p><p><code>1</code> (Default) Only call built-in executables such as ifconfig, ip, route, or netsh. </p><p><code>2</code> Allow calling of built-in executables and user-defined scripts. </p><p><code>3</code> Allow passwords to be passed to scripts via environmental variables (potentially unsafe). OpenVPN releases before v2.3 also supported a method flag which indicated how OpenVPN should call external commands and scripts. This could be either <code>execve</code> or <code>system</code>. As of OpenVPN 2.3, this flag is no longer accepted. In most *nix environments the execve() approach has been used without any issues. Some directives such as <em><a href="#up">up</a></em> allow options to be passed to the external script. In these cases make sure the script name does not contain any spaces or the configuration parser will choke because it can't determine where the script name ends and script options start. To run scripts in Windows in earlier OpenVPN versions you needed to either add a full path to the script interpreter which can parse the script or use the system flag to run these scripts. As of OpenVPN 2.3 it is now a strict requirement to have full path to the script interpreter when running non-executables files. This is not needed for executable files, such as .exe, .com, .bat or .cmd files. For example, if you have a Visual Basic script, you must use this syntax now: </p> <pre class="literal-block"> <em><a href="#up">up</a></em> 'C:\\Windows\\System32\\wscript.exe C:\\Program\ Files\\OpenVPN\\config\\my-up-script.vbs' </pre> <p>Please note the single quote marks and the escaping of the backslashes (\) and the space character. The reason the support for the <code>system</code> flag was removed is due to the security implications with shell expansions when executing scripts via the <code>system()</code> call. </p><p><br /> </p> <h2 id="secret"><a href="#secret">secret</a></h2> <p><em>Syntax: <code>secret <var>args</var></code></em> </p><p>DEPRECATED Enable Static Key encryption mode (non-TLS). Use pre-shared secret file which was generated with <em>genkey.</em> Valid syntaxes: </p> <pre class="literal-block"> secret file secret file direction </pre> <p>The optional direction parameter enables the use of 4 distinct keys (HMAC-send, cipher-encrypt, HMAC-receive, cipher-decrypt), so that each data flow direction has a different set of HMAC and cipher keys. This has a number of desirable security properties including eliminating certain kinds of DoS and message replay attacks. When the direction parameter is omitted, 2 keys are used bidirectionally, one for HMAC and the other for encryption/decryption. The direction parameter should always be complementary on either side of the connection, i.e. one side should use <code>0</code> and the other should use <code>1</code>, or both sides should omit it altogether. The direction parameter requires that file contains a 2048 bit key. While pre-1.5 versions of OpenVPN generate 1024 bit key files, any version of OpenVPN which supports the direction parameter, will also support 2048 bit key file generation using the <em>genkey </em>option. Static key encryption mode has certain advantages, the primary being ease of configuration. There are no certificates or certificate authorities or complicated negotiation handshakes and protocols. The only requirement is that you have a pre-existing secure channel with your peer (such as ssh) to initially copy the key. This requirement, along with the fact that your key never changes unless you manually generate a new one, makes it somewhat less secure than TLS mode (see below). If an attacker manages to steal your key, everything that was ever encrypted with it is compromised. Contrast that to the perfect forward secrecy features of TLS mode (using Diffie Hellman key exchange), where even if an attacker was able to steal your private key, he would gain no information to help him decrypt past sessions. Another advantageous aspect of Static Key encryption mode is that it is a handshake-free protocol without any distinguishing signature or feature (such as a header or protocol handshake sequence) that would mark the ciphertext packets as being generated by OpenVPN. Anyone eavesdropping on the wire would see nothing but random-looking data. </p><p><br /> </p> <h2 id="server-poll-timeout"><a href="#server-poll-timeout">server-poll-timeout</a></h2> <p><em>Syntax: <code>server-poll-timeout <var>n</var></code></em> </p><p>When connecting to a remote server do not wait for more than n seconds for a response before trying the next server. The default value is <code>120</code>. This timeout includes proxy and TCP connect timeouts. </p><p><br /> </p> <h2 id="session-timeout"><a href="#session-timeout">session-timeout</a></h2> <p><em>Syntax: <code>session-timeout <var>n</var></code></em> </p><p>Raises <code>SIGTERM</code> for the client instance after n seconds since the beginning of the session, forcing OpenVPN to disconnect. In client mode, OpenVPN will disconnect and exit, while in server mode all client sessions are terminated. This option can also be specified in a client instance config file using <em>client-config-dir </em>or dynamically generated using a <em>client-connect </em>script. In these cases, only the related client session is terminated. </p><p><br /> </p> <h2 id="setenv"><a href="#setenv">setenv</a></h2> <p><em>Syntax: <code>setenv <var>args</var></code></em> </p><p>Set a custom environmental variable <code>name=value</code> to pass to script. Valid syntaxes: </p> <pre class="literal-block"> setenv name value setenv FORWARD_COMPATIBLE 1 setenv opt config_option </pre> <p>By setting <code>FORWARD_COMPATIBLE</code> to <code>1</code>, the config file syntax checking is relaxed so that unknown directives will trigger a warning but not a fatal error, on the assumption that a given unknown directive might be valid in future OpenVPN versions. This option should be used with caution, as there are good security reasons for having OpenVPN fail if it detects problems in a config file. Having said that, there are valid reasons for wanting new software features to gracefully degrade when encountered by older software versions. It is also possible to tag a single directive so as not to trigger a fatal error if the directive isn't recognized. To do this, prepend the following before the directive: setenv opt Versions prior to OpenVPN 2.3.3 will always ignore options set with the setenv opt directive. See also <em><a href="#ignore-unknown-option">ignore-unknown-option</a></em> </p><p><br /> </p> <h2 id="setenv-safe"><a href="#setenv-safe">setenv-safe</a></h2> <p><em>Syntax: <code>setenv-safe <var>args</var></code></em> </p><p>Set a custom environmental variable <code>OPENVPN_name</code> to <code>value</code> to pass to scripts. Valid syntaxes: </p> <pre class="literal-block"> setenv-safe name value </pre> <p>This directive is designed to be pushed by the server to clients, and the prepending of <code>OPENVPN_</code> to the environmental variable is a safety precaution to prevent a <code>LD_PRELOAD</code> style attack from a malicious or compromised server. </p><p><br /> </p> <h2 id="shaper"><a href="#shaper">shaper</a></h2> <p><em>Syntax: <code>shaper <var>n</var></code></em> </p><p>Limit bandwidth of outgoing tunnel data to n bytes per second on the TCP/UDP port. Note that this will only work if mode is set to <code>p2p</code>. If you want to limit the bandwidth in both directions, use this option on both peers. OpenVPN uses the following algorithm to implement traffic shaping: Given a shaper rate of n bytes per second, after a datagram write of b bytes is queued on the TCP/UDP port, wait a minimum of (b / n) seconds before queuing the next write. It should be noted that OpenVPN supports multiple tunnels between the same two peers, allowing you to construct full-speed and reduced bandwidth tunnels at the same time, routing low-priority data such as off-site backups over the reduced bandwidth tunnel, and other data over the full-speed tunnel. Also note that for low bandwidth tunnels (under 1000 bytes per second), you should probably use lower MTU values as well (see above), otherwise the packet latency will grow so large as to trigger timeouts in the TLS layer and TCP connections running over the tunnel. OpenVPN allows n to be between 100 bytes/sec and 100 Mbytes/sec. </p><p><br /> </p> <h2 id="single-session"><a href="#single-session">single-session</a></h2> <p><em>Syntax: <code>single-session</code></em> </p><p>After initially connecting to a remote peer, disallow any new connections. Using this option means that a remote peer cannot connect, disconnect, and then reconnect. If the daemon is reset by a signal or <em><a href="#ping-restart">ping-restart</a></em>, it will allow one new connection. <em>single-session </em>can be used with <em><a href="#ping-exit">ping-exit</a></em> or <em><a href="#inactive">inactive</a></em> to create a single dynamic session that will exit when finished. </p><p><br /> </p> <h2 id="sndbuf"><a href="#sndbuf">sndbuf</a></h2> <p><em>Syntax: <code>sndbuf <var>size</var></code></em> </p><p>Set the TCP/UDP socket send buffer size. Defaults to operating system default. </p><p><br /> </p> <h2 id="socket-flags"><a href="#socket-flags">socket-flags</a></h2> <p><em>Syntax: <code>socket-flags <var>flags</var></code></em> </p><p>Apply the given flags to the OpenVPN transport socket. Currently, only <code>TCP_NODELAY</code> is supported. The <code>TCP_NODELAY</code> socket flag is useful in TCP mode, and causes the kernel to send tunnel packets immediately over the TCP connection without trying to group several smaller packets into a larger packet. This can result in a considerably improvement in latency. This option is pushable from server to client, and should be used on both client and server for maximum effect. </p><p><br /> </p> <h2 id="socks-proxy"><a href="#socks-proxy">socks-proxy</a></h2> <p><em>Syntax: <code>socks-proxy <var>args</var></code></em> </p><p>Connect to remote host through a Socks5 proxy. A required server argument is needed. Optionally a port (default <code>1080</code>) and authfile can be given. The authfile is a file containing a username and password on 2 lines, or <code>stdin</code> can be used to prompt from console. </p><p><br /> </p> <h2 id="static-challenge"><a href="#static-challenge">static-challenge</a></h2> <p><em>Syntax: <code>static-challenge <var>args</var></code></em> </p><p>Enable static challenge/response protocol Valid syntax: </p> <pre class="literal-block"> static-challenge text echo </pre> <p>The text challenge text is presented to the user which describes what information is requested. The echo flag indicates if the user's input should be echoed on the screen. Valid echo values are <code>0</code> or <code>1</code>. See management-notes.txt in the OpenVPN distribution for a description of the OpenVPN challenge/response protocol. </p><p><br /> </p> <h2 id="status"><a href="#status">status</a></h2> <p><em>Syntax: <code>status <var>args</var></code></em> </p><p>Write operational status to file every n seconds. n defaults to <code>60</code> if not specified. Valid syntaxes: </p> <pre class="literal-block"> status file status file n </pre> <p>Status can also be written to the syslog by sending a <code>SIGUSR2</code> signal. With multi-client capability enabled on a server, the status file includes a list of clients and a routing table. The output format can be controlled by the <em><a href="#status-version">status-version</a></em> option in that case. For clients or instances running in point-to-point mode, it will contain the traffic statistics. </p><p><br /> </p> <h2 id="status-version"><a href="#status-version">status-version</a></h2> <p><em>Syntax: <code>status-version <var>n</var></code></em> </p><p>Set the status file format version number to n. This only affects the status file on servers with multi-client capability enabled. Valid status version values: </p><p><code>1</code> Traditional format (default). The client list contains the following fields comma-separated: Common Name, Real Address, Bytes Received, Bytes Sent, Connected Since. </p><p><code>2</code> A more reliable format for external processing. Compared to version <code>1</code>, the client list contains some additional fields: Virtual Address, Virtual IPv6 Address, Username, Client ID, Peer ID, Data Channel Cipher. Future versions may extend the number of fields. </p><p><code>3</code> Identical to <code>2</code>, but fields are tab-separated. </p><p><br /> </p> <h2 id="tap-sleep"><a href="#tap-sleep">tap-sleep</a></h2> <p><em>Syntax: <code>tap-sleep <var>n</var></code></em> </p><p>Cause OpenVPN to sleep for n seconds immediately after the TAP-Win32 adapter state is set to &quot;connected&quot;. This option is intended to be used to troubleshoot problems with the <em><a href="#ifconfig">ifconfig</a></em> and <em><a href="#ip-win32">ip-win32</a></em> options, and is used to give the TAP-Win32 adapter time to come up before Windows IP Helper API operations are applied to it. </p><p><br /> </p> <h2 id="tcp-queue-limit"><a href="#tcp-queue-limit">tcp-queue-limit</a></h2> <p><em>Syntax: <code>tcp-queue-limit <var>n</var></code></em> </p><p>Maximum number of output packets queued before TCP (default <code>64</code>). When OpenVPN is tunneling data from a TUN/TAP device to a remote client over a TCP connection, it is possible that the TUN/TAP device might produce data at a faster rate than the TCP connection can support. When the number of output packets queued before sending to the TCP socket reaches this limit for a given client connection, OpenVPN will start to drop outgoing packets directed at this client. </p><p><br /> </p> <h2 id="tls-auth"><a href="#tls-auth">tls-auth</a></h2> <p><em>Syntax: <code>tls-auth <var>args</var></code></em> </p><p>Add an additional layer of HMAC authentication on top of the TLS control channel to mitigate DoS attacks and attacks on the TLS stack. Valid syntaxes: </p> <pre class="literal-block"> tls-auth file tls-auth file 0 tls-auth file 1 </pre> <p>In a nutshell, <em>tls-auth </em>enables a kind of &quot;HMAC firewall&quot; on OpenVPN's TCP/UDP port, where TLS control channel packets bearing an incorrect HMAC signature can be dropped immediately without response. file (required) is a file in OpenVPN static key format which can be generated by <em>genkey.</em> Older versions (up to OpenVPN 2.3) supported a freeform passphrase file. This is no longer supported in newer versions (v2.4+). See the <em><a href="#secret">secret</a></em> option for more information on the optional direction parameter. <em>tls-auth </em>is recommended when you are running OpenVPN in a mode where it is listening for packets from any IP address, such as when <em><a href="#remote">remote</a></em> is not specified, or <em><a href="#remote">remote</a></em> is specified with <em><a href="#float">float</a></em>. The rationale for this feature is as follows. TLS requires a multi-packet exchange before it is able to authenticate a peer. During this time before authentication, OpenVPN is allocating resources (memory and CPU) to this potential peer. The potential peer is also exposing many parts of OpenVPN and the OpenSSL library to the packets it is sending. Most successful network attacks today seek to either exploit bugs in programs (such as buffer overflow attacks) or force a program to consume so many resources that it becomes unusable. Of course the first line of defense is always to produce clean, well-audited code. OpenVPN has been written with buffer overflow attack prevention as a top priority. But as history has shown, many of the most widely used network applications have, from time to time, fallen to buffer overflow attacks. So as a second line of defense, OpenVPN offers this special layer of authentication on top of the TLS control channel so that every packet on the control channel is authenticated by an HMAC signature and a unique ID for replay protection. This signature will also help protect against DoS (Denial of Service) attacks. An important rule of thumb in reducing vulnerability to DoS attacks is to minimize the amount of resources a potential, but as yet unauthenticated, client is able to consume. <em>tls-auth </em>does this by signing every TLS control channel packet with an HMAC signature, including packets which are sent before the TLS level has had a chance to authenticate the peer. The result is that packets without the correct signature can be dropped immediately upon reception, before they have a chance to consume additional system resources such as by initiating a TLS handshake. <em>tls-auth </em>can be strengthened by adding the <em><a href="#replay-persist">replay-persist</a></em> option which will keep OpenVPN's replay protection state in a file so that it is not lost across restarts. It should be emphasized that this feature is optional and that the key file used with <em>tls-auth </em>gives a peer nothing more than the power to initiate a TLS handshake. It is not used to encrypt or authenticate any tunnel data. Use <em><a href="#tls-crypt">tls-crypt</a></em> instead if you want to use the key file to not only authenticate, but also encrypt the TLS control channel. </p><p><br /> </p> <h2 id="tls-cert-profile"><a href="#tls-cert-profile">tls-cert-profile</a></h2> <p><em>Syntax: <code>tls-cert-profile <var>profile</var></code></em> </p><p>Set the allowed cryptographic algorithms for certificates according to profile. The following profiles are supported: </p><p><code>insecure</code> Identical for mbed TLS to legacy </p><p><code>legacy</code> (default) SHA1 and newer, RSA 2048-bit+, any elliptic curve. </p><p><code>preferred</code> SHA2 and newer, RSA 2048-bit+, any elliptic curve. </p><p><code>suiteb</code> SHA256/SHA384, ECDSA with P-256 or P-384. This option is only fully supported for mbed TLS builds. OpenSSL builds use the following approximation: </p><p><code>insecure</code> sets &quot;security level 0&quot; </p><p><code>legacy</code> (default) sets &quot;security level 1&quot; </p><p><code>preferred</code> sets &quot;security level 2&quot; </p><p><code>suiteb</code> sets &quot;security level 3&quot; and <em><a href="#tls-cipher">tls-cipher</a></em> &quot;SUITEB128&quot;. OpenVPN will migrate to 'preferred' as default in the future. Please ensure that your keys already comply. </p><p><br /> </p> <h2 id="tls-cipher"><a href="#tls-cipher">tls-cipher</a></h2> <p><em>Syntax: <code>tls-cipher <var>l</var></code></em> </p><p>A list l of allowable TLS ciphers delimited by a colon (&quot;<code>:</code>&quot;). These setting can be used to ensure that certain cipher suites are used (or not used) for the TLS connection. OpenVPN uses TLS to secure the control channel, over which the keys that are used to protect the actual VPN traffic are exchanged. The supplied list of ciphers is (after potential OpenSSL/IANA name translation) simply supplied to the crypto library. Please see the OpenSSL and/or mbed TLS documentation for details on the cipher list interpretation. For OpenSSL, the <em>tls-cipher </em>is used for TLS 1.2 and below. Use <em>show-tls </em>to see a list of TLS ciphers supported by your crypto library. The default for <em>tls-cipher </em>is to use mbed TLS's default cipher list when using mbed TLS or <code>DEFAULT:!EXP:!LOW:!MEDIUM:!kDH:!kECDH:!DSS:!PSK:!SRP:!kRSA</code> when using OpenSSL. </p><p><br /> </p> <h2 id="tls-ciphersuites"><a href="#tls-ciphersuites">tls-ciphersuites</a></h2> <p><em>Syntax: <code>tls-ciphersuites <var>l</var></code></em> </p><p>Same as <em><a href="#tls-cipher">tls-cipher</a></em> but for TLS 1.3 and up. mbed TLS has no TLS 1.3 support yet and only the <em><a href="#tls-cipher">tls-cipher</a></em> setting is used. The default for <em>tls-ciphersuites </em>is to use the crypto library's default. </p><p><br /> </p> <h2 id="tls-client"><a href="#tls-client">tls-client</a></h2> <p><em>Syntax: <code>tls-client</code></em> </p><p>Enable TLS and assume client role during TLS handshake. </p><p><br /> </p> <h2 id="tls-crypt"><a href="#tls-crypt">tls-crypt</a></h2> <p><em>Syntax: <code>tls-crypt <var>keyfile</var></code></em> </p><p>Encrypt and authenticate all control channel packets with the key from keyfile. (See <em><a href="#tls-auth">tls-auth</a></em> for more background.) Encrypting (and authenticating) control channel packets: provides more privacy by hiding the certificate used for the TLS connection, makes it harder to identify OpenVPN traffic as such, provides &quot;poor-man's&quot; post-quantum security, against attackers who will never know the pre-shared key (i.e. no forward secrecy). In contrast to <em><a href="#tls-auth">tls-auth</a></em>, <em>tls-crypt </em>does not require the user to set <em><a href="#key-direction">key-direction</a></em>. Security Considerations All peers use the same <em>tls-crypt </em>pre-shared group key to authenticate and encrypt control channel messages. To ensure that IV collisions remain unlikely, this key should not be used to encrypt more than 2^48 client-to-server or 2^48 server-to-client control channel messages. A typical initial negotiation is about 10 packets in each direction. Assuming both initial negotiation and renegotiations are at most 2^16 (65536) packets (to be conservative), and (re)negotiations happen each minute for each user (24/7), this limits the tls-crypt key lifetime to 8171 years divided by the number of users. So a setup with 1000 users should rotate the key at least once each eight years. (And a setup with 8000 users each year.) If IV collisions were to occur, this could result in the security of <em>tls-crypt </em>degrading to the same security as using <em><a href="#tls-auth">tls-auth</a></em>. That is, the control channel still benefits from the extra protection against active man-in-the-middle-attacks and DoS attacks, but may no longer offer extra privacy and post-quantum security on top of what TLS itself offers. For large setups or setups where clients are not trusted, consider using <em><a href="#tls-crypt-v2">tls-crypt-v2</a></em> instead. That uses per-client unique keys, and thereby improves the bounds to 'rotate a client key at least once per 8000 years'. </p><p><br /> </p> <h2 id="tls-crypt-v2"><a href="#tls-crypt-v2">tls-crypt-v2</a></h2> <p><em>Syntax: <code>tls-crypt-v2 <var>keyfile</var></code></em> </p><p>Valid syntax: </p> <pre class="literal-block"> tls-crypt-v2 keyfile tls-crypt-v2 keyfile force-cookie tls-crypt-v2 keyfile allow-noncookie </pre> <p>Use client-specific tls-crypt keys. For clients, keyfile is a client-specific tls-crypt key. Such a key can be generated using the <code><em>genkey </em>tls-crypt-v2-client</code> option. For servers, keyfile is used to unwrap client-specific keys supplied by the client during connection setup. This key must be the same as the key used to generate the client-specific key (see <code><em>genkey</em> <em>tls-crypt-v2-client</code>).</em> On servers, this option can be used together with the <em><a href="#tls-auth">tls-auth</a></em> or <em><a href="#tls-crypt">tls-crypt</a></em> option. In that case, the server will detect whether the client is using client-specific keys, and automatically select the right mode. The optional parameters <code>force-cookie</code> allows only tls-crypt-v2 clients that support a cookie based stateless three way handshake that avoids replay attacks and state exhaustion on the server side (OpenVPN 2.6 and later). The option <code>allow-noncookie</code> explicitly allows older tls-crypt-v2 clients. The default is (currently) <code>allow-noncookie</code>. </p><p><br /> </p> <h2 id="tls-crypt-v2-verify"><a href="#tls-crypt-v2-verify">tls-crypt-v2-verify</a></h2> <p><em>Syntax: <code>tls-crypt-v2-verify <var>cmd</var></code></em> </p><p>Run command cmd to verify the metadata of the client-specific tls-crypt-v2 key of a connecting client. This allows server administrators to reject client connections, before exposing the TLS stack (including the notoriously dangerous X.509 and ASN.1 stacks) to the connecting client. OpenVPN supplies the following environment variables to the command (and only these variables. The normal environment variables available for other scripts are NOT present): <code>script_type</code> is set to <code>tls-crypt-v2-verify</code> <code>metadata_type</code> is set to <code>0</code> if the metadata was user supplied, or <code>1</code> if it's a 64-bit unix timestamp representing the key creation time. <code>metadata_file</code> contains the filename of a temporary file that contains the client metadata. The command can reject the connection by exiting with a non-zero exit code. </p><p><br /> </p> <h2 id="tls-exit"><a href="#tls-exit">tls-exit</a></h2> <p><em>Syntax: <code>tls-exit</code></em> </p><p>Exit on TLS negotiation failure. This option can be useful when you only want to make one attempt at connecting, e.g. in a test or monitoring script. (OpenVPN's own test suite uses it this way.) </p><p><br /> </p> <h2 id="tls-export-cert"><a href="#tls-export-cert">tls-export-cert</a></h2> <p><em>Syntax: <code>tls-export-cert <var>dir</var></code></em> </p><p>Adds an environment variable peer_cert when calling the <em><a href="#tls-verify">tls-verify</a></em> script or executing the OPENVPN_PLUGIN_TLS_VERIFY plugin hook to verify the certificate. The environment variable contains the path to a PEM encoded certificate of the current peer certificate in the directory dir. </p><p><br /> </p> <h2 id="tls-groups"><a href="#tls-groups">tls-groups</a></h2> <p><em>Syntax: <code>tls-groups <var>list</var></code></em> </p><p>A list of allowable groups/curves in order of preference. Set the allowed elliptic curves/groups for the TLS session. These groups are allowed to be used in signatures and key exchange. mbedTLS currently allows all known curves per default. OpenSSL 1.1+ restricts the list per default to </p> <pre class="literal-block"> &quot;X25519:secp256r1:X448:secp521r1:secp384r1&quot;. </pre> <p>If you use certificates that use non-standard curves, you might need to add them here. If you do not force the ecdh curve by using <em><a href="#ecdh-curve">ecdh-curve</a></em>, the groups for ecdh will also be picked from this list. OpenVPN maps the curve name secp256r1 to prime256v1 to allow specifying the same tls-groups option for mbedTLS and OpenSSL. Warning: this option not only affects elliptic curve certificates but also the key exchange in TLS 1.3 and using this option improperly will disable TLS 1.3. </p><p><br /> </p> <h2 id="tls-timeout"><a href="#tls-timeout">tls-timeout</a></h2> <p><em>Syntax: <code>tls-timeout <var>n</var></code></em> </p><p>Packet retransmit timeout on TLS control channel if no acknowledgment from remote within n seconds (default <code>2</code>). When OpenVPN sends a control packet to its peer, it will expect to receive an acknowledgement within n seconds or it will retransmit the packet, subject to a TCP-like exponential backoff algorithm. This parameter only applies to control channel packets. Data channel packets (which carry encrypted tunnel data) are never acknowledged, sequenced, or retransmitted by OpenVPN because the higher level network protocols running on top of the tunnel such as TCP expect this role to be left to them. </p><p><br /> </p> <h2 id="tls-verify"><a href="#tls-verify">tls-verify</a></h2> <p><em>Syntax: <code>tls-verify <var>cmd</var></code></em> </p><p>Run command cmd to verify the X509 name of a pending TLS connection that has otherwise passed all other tests of certification (except for revocation via <em><a href="#crl-verify">crl-verify</a></em> directive; the revocation test occurs after the <em>tls-verify </em>test). cmd should return <code>0</code> to allow the TLS handshake to proceed, or <code>1</code> to fail. cmd consists of a path to a script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. When cmd is executed two arguments are appended after any arguments specified in cmd, as follows: </p> <pre class="literal-block"> cmd certificate_depth subject </pre> <p>These arguments are, respectively, the current certificate depth and the X509 subject distinguished name (dn) of the peer. This feature is useful if the peer you want to trust has a certificate which was signed by a certificate authority who also signed many other certificates, where you don't necessarily want to trust all of them, but rather be selective about which peer certificate you will accept. This feature allows you to write a script which will test the X509 name on a certificate and decide whether or not it should be accepted. For a simple perl script which will test the common name field on the certificate, see the file verify-cn in the OpenVPN distribution. See the Environmental Variables section below for additional parameters passed as environmental variables. </p><p><br /> </p> <h2 id="tls-version-max"><a href="#tls-version-max">tls-version-max</a></h2> <p><em>Syntax: <code>tls-version-max <var>version</var></code></em> </p><p>Set the maximum TLS version we will use (default is the highest version supported). Examples for version include <code>1.0</code>, <code>1.1</code>, or <code>1.2</code>. </p><p><br /> </p> <h2 id="tls-version-min"><a href="#tls-version-min">tls-version-min</a></h2> <p><em>Syntax: <code>tls-version-min <var>args</var></code></em> </p><p>Sets the minimum TLS version we will accept from the peer (default in 2.6.0 and later is &quot;1.2&quot;). Valid syntax: </p> <pre class="literal-block"> tls-version-min version ['or-highest'] </pre> <p>Examples for version include <code>1.0</code>, <code>1.1</code>, or <code>1.2</code>. If <code>or-highest</code> is specified and version is not recognized, we will only accept the highest TLS version supported by the local SSL implementation. </p><p><br /> </p> <h2 id="topology"><a href="#topology">topology</a></h2> <p><em>Syntax: <code>topology <var>mode</var></code></em> </p><p>Configure virtual addressing topology when running in <em>dev </em>tun mode. This directive has no meaning in <em>dev </em>tap mode, which always uses a <code>subnet</code> topology. If you set this directive on the server, the <em>server </em>and <em>server-bridge </em>directives will automatically push your chosen topology setting to clients as well. This directive can also be manually pushed to clients. Like the <em>dev </em>directive, this directive must always be compatible between client and server. mode can be one of: </p><p><code>net30</code> Use a point-to-point topology, by allocating one /30 subnet per client. This is designed to allow point-to-point semantics when some or all of the connecting clients might be Windows systems. This is the default. </p><p><code>p2p</code> Use a point-to-point topology where the remote endpoint of the client's tun interface always points to the local endpoint of the server's tun interface. This mode allocates a single IP address per connecting client. Only use when none of the connecting clients are Windows systems. </p><p><code>subnet</code> Use a subnet rather than a point-to-point topology by configuring the tun interface with a local IP address and subnet mask, similar to the topology used in <em>dev </em>tap and ethernet bridging mode. This mode allocates a single IP address per connecting client and works on Windows as well. Note: Using <em>topology </em>subnet changes the interpretation of the arguments of <em><a href="#ifconfig">ifconfig</a></em> to mean &quot;address netmask&quot;, no longer &quot;local remote&quot;. </p><p><br /> </p> <h2 id="tran-window"><a href="#tran-window">tran-window</a></h2> <p><em>Syntax: <code>tran-window <var>n</var></code></em> </p><p>Transition window -- our old key can live this many seconds after a new a key renegotiation begins (default <code>3600</code> seconds). This feature allows for a graceful transition from old to new key, and removes the key renegotiation sequence from the critical path of tunnel data forwarding. </p><p><br /> </p> <h2 id="tun-max-mtu"><a href="#tun-max-mtu">tun-max-mtu</a></h2> <p><em>Syntax: <code>tun-max-mtu <var>maxmtu</var></code></em> </p><p>This configures the maximum MTU size that a server can push to maxmtu, by configuring the internal buffers to allow at least this packet size. The default for maxmtu is 1600. Currently, only increasing beyond 1600 is possible, and attempting to reduce max-mtu below 1600 will be ignored. </p><p><br /> </p> <h2 id="tun-mtu"><a href="#tun-mtu">tun-mtu</a></h2> <p><em>Syntax: <code>tun-mtu <var>args</var></code></em> </p><p>Valid syntaxes: </p> <pre class="literal-block"> tun-mtu tun-mtu tun-mtu tun-mtu occ-mtu </pre> <p>Take the TUN device MTU to be tun-mtu and derive the link MTU from it. In most cases, you will probably want to leave this parameter set to its default value. The default for <code>tun-mtu</code> is 1500. The OCC MTU can be used to avoid warnings about mismatched MTU from clients. If <code>occ-mtu</code> is not specified, it will to default to the tun-mtu. 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 and data channels be sent unfragmented. MTU problems often manifest themselves as connections which hang during periods of active usage. It's best to use the <em><a href="#fragment">fragment</a></em> and/or <em><a href="#mssfix">mssfix</a></em> options to deal with MTU sizing issues. Note: Depending on the platform, the operating system allows one to receive packets larger than tun-mtu (e.g. Linux and FreeBSD) but other platforms (like macOS) limit received packets to the same size as the MTU. </p><p><br /> </p> <h2 id="tun-mtu-extra"><a href="#tun-mtu-extra">tun-mtu-extra</a></h2> <p><em>Syntax: <code>tun-mtu-extra <var>n</var></code></em> </p><p>Assume that the TUN/TAP device might return as many as n bytes more than the <em><a href="#tun-mtu">tun-mtu</a></em> size on read. This parameter defaults to 0, which is sufficient for most TUN devices. TAP devices may introduce additional overhead in excess of the MTU size, and a setting of 32 is the default when TAP devices are used. This parameter only controls internal OpenVPN buffer sizing, so there is no transmission overhead associated with using a larger value. </p><p><br /> </p> <h2 id="up"><a href="#up">up</a></h2> <p><em>Syntax: <code>up <var>cmd</var></code></em> </p><p>Run command cmd after successful TUN/TAP device open (pre <em>user</em> <em>UID change).</em> cmd consists of a path to a script (or executable program), optionally followed by arguments. The path and arguments may be single- or double-quoted and/or escaped using a backslash, and should be separated by one or more spaces. The up command is useful for specifying route commands which route IP traffic destined for private subnets which exist at the other end of the VPN connection into the tunnel. For <em>dev </em>tun execute as: </p> <pre class="literal-block"> cmd tun_dev tun_mtu 0 ifconfig_local_ip ifconfig_remote_ip [init | restart] </pre> <p>For <em>dev </em>tap execute as: </p> <pre class="literal-block"> cmd tap_dev tap_mtu 0 ifconfig_local_ip ifconfig_netmask [init | restart] </pre> <p>See the Environmental Variables section below for additional parameters passed as environmental variables. The 0 argument used to be link_mtu which is no longer passed to scripts - to keep the argument order, it was replaced with 0. Note that if cmd includes arguments, all OpenVPN-generated arguments will be appended to them to build an argument list with which the executable will be called. Typically, cmd will run a script to add routes to the tunnel. Normally the up script is called after the TUN/TAP device is opened. In this context, the last command line parameter passed to the script will be init. If the <em><a href="#up-restart">up-restart</a></em> option is also used, the up script will be called for restarts as well. A restart is considered to be a partial reinitialization of OpenVPN where the TUN/TAP instance is preserved (the <em><a href="#persist-tun">persist-tun</a></em> option will enable such preservation). A restart can be generated by a SIGUSR1 signal, a <em><a href="#ping-restart">ping-restart</a></em> timeout, or a connection reset when the TCP protocol is enabled with the <em><a href="#proto">proto</a></em> option. If a restart occurs, and <em><a href="#up-restart">up-restart</a></em> has been specified, the up script will be called with restart as the last parameter. </p><p>NOTE: On restart, OpenVPN will not pass the full set of environment variables to the script. Namely, everything related to routing and gateways will not be passed, as nothing needs to be done anyway - all the routing setup is already in place. Additionally, the up-restart script will run with the downgraded UID/GID settings (if configured). The following standalone example shows how the <em>up </em>script can be called in both an initialization and restart context. (NOTE: for security reasons, don't run the following example unless UDP port 9999 is blocked by your firewall. Also, the example will run indefinitely, so you should abort with control-c). </p> <pre class="literal-block"> openvpn <em>dev </em>tun <em><a href="#port">port</a></em> 9999 <em><a href="#verb">verb</a></em> 4 <em><a href="#ping-restart">ping-restart</a></em> 10 \ <em>up '</em>echo up' <em><a href="#down">down</a></em> 'echo down' <em><a href="#persist-tun">persist-tun</a></em> \ <em><a href="#up-restart">up-restart</a></em> </pre> <p>Note that OpenVPN also provides the <em><a href="#ifconfig">ifconfig</a></em> option to automatically ifconfig the TUN device, eliminating the need to define an <em>up </em>script, unless you also want to configure routes in the <em>up </em>script. If <em><a href="#ifconfig">ifconfig</a></em> is also specified, OpenVPN will pass the ifconfig local and remote endpoints on the command line to the <em>up </em>script so that they can be used to configure routes such as: </p> <pre class="last literal-block"> route add -net 10.0.0.0 netmask 255.255.255.0 gw $5 </pre> <p><br /> </p> <h2 id="up-delay"><a href="#up-delay">up-delay</a></h2> <p><em>Syntax: <code>up-delay</code></em> </p><p>Delay TUN/TAP open and possible <em><a href="#up">up</a></em> script execution until after TCP/UDP connection establishment with peer. In <em><a href="#proto">proto</a></em> udp mode, this option normally requires the use of <em><a href="#ping">ping</a></em> to allow connection initiation to be sensed in the absence of tunnel data, since UDP is a &quot;connectionless&quot; protocol. On Windows, this option will delay the TAP-Win32 media state transitioning to &quot;connected&quot; until connection establishment, i.e. the receipt of the first authenticated packet from the peer. </p><p><br /> </p> <h2 id="up-restart"><a href="#up-restart">up-restart</a></h2> <p><em>Syntax: <code>up-restart</code></em> </p><p>Enable the <em><a href="#up">up</a></em> and <em><a href="#down">down</a></em> scripts to be called for restarts as well as initial program start. This option is described more fully above in the <em><a href="#up">up</a></em> option documentation. </p><p><br /> </p> <h2 id="use-prediction-resistance"><a href="#use-prediction-resistance">use-prediction-resistance</a></h2> <p><em>Syntax: <code>use-prediction-resistance</code></em> </p><p>Enable prediction resistance on mbed TLS's RNG. Enabling prediction resistance causes the RNG to reseed in each call for random. Reseeding this often can quickly deplete the kernel entropy pool. If you need this option, please consider running a daemon that adds entropy to the kernel pool. </p><p><br /> </p> <h2 id="verb"><a href="#verb">verb</a></h2> <p><em>Syntax: <code>verb <var>n</var></code></em> </p><p>Set output verbosity to n (default <code>1</code>). Each level shows all info from the previous levels. Level <code>3</code> is recommended if you want a good summary of what's happening without being swamped by output. </p><p><code>0</code> No output except fatal errors. </p><p><code>1</code> to <code>4</code> Normal usage range. </p><p><code>5</code> Outputs <code>R</code> and <code>W</code> 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. </p><p><code>6</code> to <code>11</code> Debug info range (see <code>errlevel.h</code> in the source code for additional information on debug levels). </p><p><br /> </p> <h2 id="verify-hash"><a href="#verify-hash">verify-hash</a></h2> <p><em>Syntax: <code>verify-hash <var>args</var></code></em> </p><p>DEPRECATED Specify SHA1 or SHA256 fingerprint for level-1 cert. Valid syntax: </p> <pre class="literal-block"> verify-hash hash [algo] </pre> <p>The level-1 cert is the CA (or intermediate cert) that signs the leaf certificate, and is one removed from the leaf certificate in the direction of the root. When accepting a connection from a peer, the level-1 cert fingerprint must match hash or certificate verification will fail. Hash is specified as XX:XX:... For example: </p> <pre class="literal-block"> AD:B0:95:D8:09:C8:36:45:12:A9:89:C8:90:09:CB:13:72:A6:AD:16 </pre> <p>The algo flag can be either <code>SHA1</code> or <code>SHA256</code>. If not provided, it defaults to <code>SHA1</code>. This option can also be inlined </p> <pre class="last literal-block"> &lt;verify-hash&gt; 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff 11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00 &lt;/verify-hash&gt; </pre> <p><br /> </p> <h2 id="verify-x509-name"><a href="#verify-x509-name">verify-x509-name</a></h2> <p><em>Syntax: <code>verify-x509-name <var>args</var></code></em> </p><p>Accept connections only if a host's X.509 name is equal to name. The remote host must also pass all other tests of verification. Valid syntax: </p> <pre class="literal-block"> verify-x509 name type </pre> <p>Which X.509 name is compared to name depends on the setting of type. type can be <code>subject</code> to match the complete subject DN (default), <code>name</code> to match a subject RDN or <code>name-prefix</code> to match a subject RDN prefix. Which RDN is verified as name depends on the <em><a href="#x509-username-field">x509-username-field</a></em> option. But it defaults to the common name (CN), e.g. a certificate with a subject DN </p> <pre class="literal-block"> C=KG, ST=NA, L=Bishkek, CN=Server-1 </pre> <p>would be matched by: </p> <pre class="literal-block"> verify-x509-name 'C=KG, ST=NA, L=Bishkek, CN=Server-1' verify-x509-name Server-1 name verify-x509-name Server- name-prefix </pre> <p>The last example is useful if you want a client to only accept connections to <code>Server-1</code>, <code>Server-2</code>, etc. <em>verify-x509-name </em>is a useful replacement for the <em><a href="#tls-verify">tls-verify</a></em> option to verify the remote host, because <em>verify-x509-name </em>works in a <em>chroot </em>environment without any dependencies. 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. </p><p>NOTE: Test against a name prefix only when you are using OpenVPN with a custom CA certificate that is under your control. Never use this option with type <code>name-prefix</code> when your client certificates are signed by a third party, such as a commercial web CA. </p><p><br /> </p> <h2 id="windows-driver"><a href="#windows-driver">windows-driver</a></h2> <p><em>Syntax: <code>windows-driver <var>drv</var></code></em> </p><p>Specifies which tun driver to use. Values are <code>ovpn-dco</code> (default), <code>tap-windows6</code> and <code>wintun</code>. <code>ovpn-dco</code> and <code>wintun</code> require <em>dev </em>tun. <code>wintun</code> also requires OpenVPN process to run elevated, or be invoked using the Interactive Service. </p><p><br /> </p> <h2 id="x509-track"><a href="#x509-track">x509-track</a></h2> <p><em>Syntax: <code>x509-track <var>attribute</var></code></em> </p><p>Save peer X509 attribute value in environment for use by plugins and management interface. Prepend a <code>+</code> to attribute to save values from full cert chain. Otherwise the attribute will only be exported for the leaf cert (i.e. depth <code>0</code> of the cert chain). Values will be encoded as <code>X509_&lt;depth&gt;_&lt;attribute&gt;=&lt;value&gt;</code>. Multiple <em>x509-track</em> <em>options can be defined to track multiple attributes.</em> attribute can be any part of the X509 Subject field or any X509v3 extension (RFC 3280). X509v3 extensions might not be supported when not using the default TLS backend library (OpenSSL). You can also request the SHA1 and SHA256 fingerprints of the cert, but that is always exported as <code>tls_digest_{n}</code> and <code>tls_digest_sha256_{n}</code> anyway. Note that by default all parts of the X509 Subject field are exported in the environment for the whole cert chain. If you use <em>x509-track </em>at least once only the attributes specified by these options are exported. Examples: </p> <pre class="last literal-block"> x509-track CN # exports only X509_0_CN x509-track +CN # exports X509_{n}_CN for chain x509-track basicConstraints # exports value of &quot;X509v3 Basic Constraints&quot; x509-track SHA256 # exports SHA256 fingerprint </pre> <p><br /> </p> <h2 id="x509-username-field"><a href="#x509-username-field">x509-username-field</a></h2> <p><em>Syntax: <code>x509-username-field <var>args</var></code></em> </p><p>Fields in the X.509 certificate subject to be used as the username (default <code>CN</code>). If multiple fields are specified their values will be concatenated into the one username using <code>_</code> symbol as a separator. Valid syntax: </p> <pre class="literal-block"> x509-username-field [ext:]fieldname [[ext:]fieldname...] </pre> <p>Typically, this option is specified with fieldname arguments as either of the following: </p> <pre class="literal-block"> x509-username-field emailAddress x509-username-field ext:subjectAltName x509-username-field CN serialNumber </pre> <p>The first example uses the value of the <code>emailAddress</code> attribute in the certificate's Subject field as the username. The second example uses the <code>ext:</code> prefix to signify that the X.509 extension fieldname <code>subjectAltName</code> be searched for an rfc822Name (email) field to be used as the username. In cases where there are multiple email addresses in <code>ext:fieldname</code>, the last occurrence is chosen. The last example uses the value of the <code>CN</code> attribute in the Subject field, combined with the <code>_</code> separator and the hexadecimal representation of the certificate's <code>serialNumber</code>. When this option is used, the <em><a href="#verify-x509-name">verify-x509-name</a></em> option will match against the chosen fieldname instead of the Common Name. Only the <code>subjectAltName</code> and <code>issuerAltName</code> X.509 extensions and <code>serialNumber</code> X.509 attribute are supported. Please note: This option has a feature which will convert an all-lowercase fieldname to uppercase characters, e.g., <code>ou</code> -&gt; <code>OU</code>. A mixed-case fieldname or one having the <code>ext:</code> prefix will be left as-is. This automatic upcasing feature is deprecated and will be removed in a future release. Non-compliant symbols are being replaced with the <code>_</code> symbol, same as the field separator, so concatenating multiple fields with such or <code>_</code> symbols can potentially lead to username collisions. </p><p><br /> </p><p>The above list of OpenVPN commands is a rendered version of the OpenVPN man page, which is licensed under the <a href="/company/legal/thirdparty/">GPLv2</a>. This man page can be <a href="openvpn">downloaded from here.</a> </p></div> </div> <div class="col-md-4" role="complementary"> <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm"> <h4 style="padding-left:18px;">Contents</h4> <ul class="nav bs-docs-sidenav"> <li><a href="#advanced-configuration-commands">Advanced Configuration Commands</a> </li> <li><a href="#specifying-advanced-configuration-commands">Specifying Advanced Configuration Commands</a> </li> <li><a href="#advanced-viscosity-commands">Advanced Viscosity Commands</a> <ul class="nav"> <li><a href="#static-challenge-password">static-challenge-password </a></li> <li><a href="#static-challenge-acknowledge">static-challenge-acknowledge </a></li> <li><a href="#system-identity-domain">system-identity-domain </a></li> <li><a href="#proxy-automatic">proxy-automatic </a></li> <li><a href="#proxy-http">proxy-http </a></li> <li><a href="#proxy-https">proxy-https </a></li> <li><a href="#proxy-socks">proxy-socks </a></li> </ul> </li> <li><a href="#advanced-openvpn-commands">Advanced OpenVPN Commands</a> <ul class="nav"> <li><a href="#allow-compression">allow-compression</a></li> <li><a href="#allow-pull-fqdn">allow-pull-fqdn</a></li> <li><a href="#allow-recursive-routing">allow-recursive-routing</a></li> <li><a href="#askpass">askpass</a></li> <li><a href="#auth">auth</a></li> <li><a href="#auth-nocache">auth-nocache</a></li> <li><a href="#auth-retry">auth-retry</a></li> <li><a href="#auth-token-user">auth-token-user</a></li> <li><a href="#auth-user-pass">auth-user-pass</a></li> <li><a href="#bcast-buffers">bcast-buffers</a></li> <li><a href="#bind">bind</a></li> <li><a href="#bind-dev">bind-dev</a></li> <li><a href="#block-ipv6">block-ipv6</a></li> <li><a href="#ca">ca</a></li> <li><a href="#capath">capath</a></li> <li><a href="#ccd-exclusive">ccd-exclusive</a></li> <li><a href="#cd">cd</a></li> <li><a href="#cert">cert</a></li> <li><a href="#cipher">cipher</a></li> <li><a href="#client-nat">client-nat</a></li> <li><a href="#comp-lzo">comp-lzo</a></li> <li><a href="#comp-noadapt">comp-noadapt</a></li> <li><a href="#compat-mode">compat-mode</a></li> <li><a href="#compress">compress</a></li> <li><a href="#connect-retry">connect-retry</a></li> <li><a href="#connect-retry-max">connect-retry-max</a></li> <li><a href="#connect-timeout">connect-timeout</a></li> <li><a href="#crl-verify">crl-verify</a></li> <li><a href="#cryptoapicert">cryptoapicert</a></li> <li><a href="#data-ciphers">data-ciphers</a></li> <li><a href="#data-ciphers-fallback">data-ciphers-fallback</a></li> <li><a href="#dhcp-option">dhcp-option</a></li> <li><a href="#dhcp-release">dhcp-release</a></li> <li><a href="#dhcp-renew">dhcp-renew</a></li> <li><a href="#disable-occ">disable-occ</a></li> <li><a href="#dns">dns</a></li> <li><a href="#down">down</a></li> <li><a href="#down-pre">down-pre</a></li> <li><a href="#ecdh-curve">ecdh-curve</a></li> <li><a href="#echo">echo</a></li> <li><a href="#engine">engine</a></li> <li><a href="#explicit-exit-notify">explicit-exit-notify</a></li> <li><a href="#extra-certs">extra-certs</a></li> <li><a href="#fast-io">fast-io</a></li> <li><a href="#float">float</a></li> <li><a href="#fragment">fragment</a></li> <li><a href="#hand-window">hand-window</a></li> <li><a href="#hash-size">hash-size</a></li> <li><a href="#http-proxy">http-proxy</a></li> <li><a href="#http-proxy-option">http-proxy-option</a></li> <li><a href="#http-proxy-user-pass">http-proxy-user-pass</a></li> <li><a href="#ifconfig">ifconfig</a></li> <li><a href="#ifconfig-ipv6">ifconfig-ipv6</a></li> <li><a href="#ifconfig-noexec">ifconfig-noexec</a></li> <li><a href="#ifconfig-nowarn">ifconfig-nowarn</a></li> <li><a href="#ignore-unknown-option">ignore-unknown-option</a></li> <li><a href="#inactive">inactive</a></li> <li><a href="#ip-win32">ip-win32</a></li> <li><a href="#ipchange">ipchange</a></li> <li><a href="#iproute">iproute</a></li> <li><a href="#keepalive">keepalive</a></li> <li><a href="#key">key</a></li> <li><a href="#key-direction">key-direction</a></li> <li><a href="#key-method">key-method</a></li> <li><a href="#link-mtu">link-mtu</a></li> <li><a href="#lladdr">lladdr</a></li> <li><a href="#local">local</a></li> <li><a href="#lport">lport</a></li> <li><a href="#mark">mark</a></li> <li><a href="#max-packet-size">max-packet-size</a></li> <li><a href="#mssfix">mssfix</a></li> <li><a href="#mtu-test">mtu-test</a></li> <li><a href="#mute">mute</a></li> <li><a href="#mute-replay-warnings">mute-replay-warnings</a></li> <li><a href="#nobind">nobind</a></li> <li><a href="#ns-cert-type">ns-cert-type</a></li> <li><a href="#passtos">passtos</a></li> <li><a href="#peer-fingerprint">peer-fingerprint</a></li> <li><a href="#persist-key">persist-key</a></li> <li><a href="#persist-local-ip">persist-local-ip</a></li> <li><a href="#persist-remote-ip">persist-remote-ip</a></li> <li><a href="#persist-tun">persist-tun</a></li> <li><a href="#ping">ping</a></li> <li><a href="#ping-exit">ping-exit</a></li> <li><a href="#ping-restart">ping-restart</a></li> <li><a href="#pkcs11-cert-private">pkcs11-cert-private</a></li> <li><a href="#pkcs11-id">pkcs11-id</a></li> <li><a href="#pkcs11-pin-cache">pkcs11-pin-cache</a></li> <li><a href="#pkcs11-private-mode">pkcs11-private-mode</a></li> <li><a href="#pkcs11-protected-authentication">pkcs11-protected-authentication</a></li> <li><a href="#pkcs11-providers">pkcs11-providers</a></li> <li><a href="#pkcs12">pkcs12</a></li> <li><a href="#port">port</a></li> <li><a href="#proto">proto</a></li> <li><a href="#proto-force">proto-force</a></li> <li><a href="#providers">providers</a></li> <li><a href="#pull">pull</a></li> <li><a href="#pull-filter">pull-filter</a></li> <li><a href="#push">push</a></li> <li><a href="#push-peer-info">push-peer-info</a></li> <li><a href="#rcvbuf">rcvbuf</a></li> <li><a href="#redirect-gateway">redirect-gateway</a></li> <li><a href="#redirect-private">redirect-private</a></li> <li><a href="#register-dns">register-dns</a></li> <li><a href="#remap-usr1">remap-usr1</a></li> <li><a href="#remote">remote</a></li> <li><a href="#remote-cert-eku">remote-cert-eku</a></li> <li><a href="#remote-cert-ku">remote-cert-ku</a></li> <li><a href="#remote-cert-tls">remote-cert-tls</a></li> <li><a href="#remote-random">remote-random</a></li> <li><a href="#remote-random-hostname">remote-random-hostname</a></li> <li><a href="#reneg-bytes">reneg-bytes</a></li> <li><a href="#reneg-pkts">reneg-pkts</a></li> <li><a href="#reneg-sec">reneg-sec</a></li> <li><a href="#replay-persist">replay-persist</a></li> <li><a href="#replay-window">replay-window</a></li> <li><a href="#resolv-retry">resolv-retry</a></li> <li><a href="#route">route</a></li> <li><a href="#route-delay">route-delay</a></li> <li><a href="#route-gateway">route-gateway</a></li> <li><a href="#route-ipv6">route-ipv6</a></li> <li><a href="#route-ipv6-gateway">route-ipv6-gateway</a></li> <li><a href="#route-method">route-method</a></li> <li><a href="#route-metric">route-metric</a></li> <li><a href="#route-nopull">route-nopull</a></li> <li><a href="#route-pre-down">route-pre-down</a></li> <li><a href="#route-up">route-up</a></li> <li><a href="#rport">rport</a></li> <li><a href="#script-security">script-security</a></li> <li><a href="#secret">secret</a></li> <li><a href="#server-poll-timeout">server-poll-timeout</a></li> <li><a href="#session-timeout">session-timeout</a></li> <li><a href="#setenv">setenv</a></li> <li><a href="#setenv-safe">setenv-safe</a></li> <li><a href="#shaper">shaper</a></li> <li><a href="#single-session">single-session</a></li> <li><a href="#sndbuf">sndbuf</a></li> <li><a href="#socket-flags">socket-flags</a></li> <li><a href="#socks-proxy">socks-proxy</a></li> <li><a href="#static-challenge">static-challenge</a></li> <li><a href="#status">status</a></li> <li><a href="#status-version">status-version</a></li> <li><a href="#tap-sleep">tap-sleep</a></li> <li><a href="#tcp-queue-limit">tcp-queue-limit</a></li> <li><a href="#tls-auth">tls-auth</a></li> <li><a href="#tls-cert-profile">tls-cert-profile</a></li> <li><a href="#tls-cipher">tls-cipher</a></li> <li><a href="#tls-ciphersuites">tls-ciphersuites</a></li> <li><a href="#tls-client">tls-client</a></li> <li><a href="#tls-crypt">tls-crypt</a></li> <li><a href="#tls-crypt-v2">tls-crypt-v2</a></li> <li><a href="#tls-crypt-v2-verify">tls-crypt-v2-verify</a></li> <li><a href="#tls-exit">tls-exit</a></li> <li><a href="#tls-export-cert">tls-export-cert</a></li> <li><a href="#tls-groups">tls-groups</a></li> <li><a href="#tls-timeout">tls-timeout</a></li> <li><a href="#tls-verify">tls-verify</a></li> <li><a href="#tls-version-max">tls-version-max</a></li> <li><a href="#tls-version-min">tls-version-min</a></li> <li><a href="#topology">topology</a></li> <li><a href="#tran-window">tran-window</a></li> <li><a href="#tun-max-mtu">tun-max-mtu</a></li> <li><a href="#tun-mtu">tun-mtu</a></li> <li><a href="#tun-mtu-extra">tun-mtu-extra</a></li> <li><a href="#up">up</a></li> <li><a href="#up-delay">up-delay</a></li> <li><a href="#up-restart">up-restart</a></li> <li><a href="#use-prediction-resistance">use-prediction-resistance</a></li> <li><a href="#verb">verb</a></li> <li><a href="#verify-hash">verify-hash</a></li> <li><a href="#verify-x509-name">verify-x509-name</a></li> <li><a href="#windows-driver">windows-driver</a></li> <li><a href="#x509-track">x509-track</a></li> <li><a href="#x509-username-field">x509-username-field</a></li> </ul> </li> </ul> <a class="back-to-top" href="#top">Back to top</a> </nav> </div> </div> </div> </div> <!-- /Article --> <script src="/static/js/jquery-3.3.1.min.js"></script> <footer class="bs-docs-footer"> <!-- Category --> <div class="contact-bar"> <div class="container"> <div class="row vertical-align sl_paddedcell_top"> <div class="col-xs-1"></div> <div class="col-xs-2 text-center"> <i id="icons8-search" class="icons8-search contact-icon" style="font-size:54px;padding-left:5px;"></i> </div> <div class="col-xs-7"> <h3 style="color:#fff;">Search Knowledge Base</h3> <p style="color:#fff;" class="text-justify">Search our knowledge base for guides and documentation.</p> <form id="kbsearch" name="kbsearch" method="post" action="/support/kb/search/"> <div class="input-group"> <input name="query" type="text" class="form-control" placeholder="Search for..."> <span class="input-group-btn"> <button class="btn btn-default" type="submit">Search</button> </span> </div> </form> </div> </div> </div> </div> <!-- /Category --> <!-- Blank --> <div class="sl_row_gradient"> <div class="container"> <div class="row sl_paddedrow"> <br /> <div class="col-md-6 text-left"> <div class="list-group"> <li class="list-group-item"><h4>Other Articles In This Category</h4></li> <a href="/support/kb/article/advanced-configuration-commands/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Advanced Configuration Commands</a> <a href="/support/kb/article/connection-settings/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Connection Settings</a> <a href="/support/kb/article/getting-started-with-viscosity-mac/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Getting Started With Viscosity (Mac)</a> <a href="/support/kb/article/getting-started-with-viscosity-windows/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Getting Started With Viscosity (Windows)</a> <a href="/support/kb/article/installing-viscosity-mac/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Installing Viscosity (Mac)</a> <a href="/support/kb/category/documentation/" class="list-group-item"><span class="badge">12</span><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span> &nbsp; View All</a> </div> </div> <div class="col-md-6"> <div class="list-group"> <li class="list-group-item"><h4>Related Articles</h4></li> <a href="/support/kb/article/advanced-configuration-commands/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Advanced Configuration Commands</a> <a href="/support/kb/article/connection-settings/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Connection Settings</a> <a href="/support/kb/article/getting-started-with-viscosity-mac/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Getting Started With Viscosity (Mac)</a> <a href="/support/kb/article/getting-started-with-viscosity-windows/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Getting Started With Viscosity (Windows)</a> <a href="/support/kb/article/installing-viscosity-mac/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Installing Viscosity (Mac)</a> <a href="/support/kb/article/installing-viscosity-windows/" class="list-group-item"><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span> &nbsp; Installing Viscosity (Windows)</a> </div> </div> </div> </div> <!-- /container --> </div> <!-- /Blank --> <div style="background-color:#34373a;"> <div class="container"> <div class="row footer_twitter_row"> <div class="col-md-1"> <img src="/static/img/bsky-logo.svg" height=22px style="opacity:0.4;margin-top:14px;" /> </div> <div class="col-md-9"> <p style="color:#bbb;">Follow us on Bluesky <a href="https://bsky.app/profile/sparklabs.com">&nbsp;@sparklabs.com&nbsp;</a> <span style="color:#666;">&nbsp;&mdash;&nbsp;</span> <span style="color:#bbb;">Viscosity 1.11.4 is now available for macOS! This update restores the performance of TAP VPN connections on macOS 15.0.1+, includes an updated version of OpenSSL, general performance improvements, and small bug fixes and enhancements. www.sparklabs.com/blog/viscosi...</span></p> </div> <div class="col-md-2"> <p style="color:#777;">(<script>document.write(moment("1733234858.0", "X").fromNow());</script>)</p> </div> </div> </div> </div> <div style="background-color:#191a1b;"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="row footer_link_row"> <div class="col-sm-4 col-md-2 columns" style="color:#555;"><h5>Apps</h5><ul style="list-style:none;padding-left:0;margin-left:0;"><li><a href="/viscosity/">Viscosity</a></li></ul> </div> <div class="col-sm-4 col-md-2 columns" style="color:#555;"><h5>Company</h5><ul style="list-style:none;padding-left:0;margin-left:0;"><li><a href="/company/">About</a></li><li><a href="/blog/">Blog</a></li><li><a href="/support/">Support</a></li><li><a href="/store/">Store</a></li></ul> </div> <div class="col-sm-4 col-md-2 columns" style="color:#555;"><h5>Support</h5><ul style="list-style:none;padding-left:0;margin-left:0;"><li><a href="/support/">Support Home</a></li><li><a href="/support/kb/">Knowledge Base</a></li><li><a href="/forum/">Forum</a></li><li><a href="/support/#contact">Contact Us</a></li></ul> </div> <div class="col-sm-2 col-md-2 columns" style="color:#555;"> </div> <div class="col-sm-12 col-md-4 columns" style="color:#555;"><h5>Stay Updated</h5><ul style="list-style:none;padding-left:0;margin-left:0;"><li class="text-justify">Keep up with the latest important SparkLabs news and updates with our (very) occasional newsletter.</li><li> <div class="input-group" style="padding-top:1em;"> <input type="text" class="form-control" placeholder="Email address" style="background-color:#333;border:0;color:#666;width:100%;" name="email" id="footer-emailinput"> <span class="input-group-btn"> <button class="btn btn-default" data-toggle="modal" data-target="#newsletter" style="background:transparent;border-color:#333;color:#666;">Subscribe</button> </span> </div> </li></ul> </div> </div> </div> </div> <div class="row"> <div class="col-md-12 text-center"> <hr style="border:0;height:0;border-bottom:1px solid #222;"> </div> </div> <div class="row" style="padding-top:1em;padding-bottom:2em;"> <div class="col-md-12 text-center"> &copy; SparkLabs Pty Ltd. SparkLabs & Viscosity are registered trademarks of SparkLabs Pty Ltd. <a href="/company/legal/#privacy" style="padding-left:2em;padding-right:2em;color:#444;">Privacy Policy</a> </div> </div> </div> </div> <div class="modal fade" id="newsletter" tabindex="-1" role="dialog" aria-labelledby="newsletter-label" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">SparkLabs Newsletter</h4> </div> <div class="modal-header"> <div id="reissue-confirmmessage"> <div id="message">Thank you for being interested in keeping up with the latest news from us! Please double-check your email address below and then click the Subscribe button.</div> <br> <form method="post" action="/newsletter/"> <input name="email" type="text" class="form-control" placeholder="Email address" id="news-emailinput"> <br><div class="g-recaptcha" data-sitekey="6LcyR74ZAAAAAKIOAPXwb7Sn-9Nwx-NLrQ05gHwy"></div><br> <button type="submit" class="btn btn-default" id="news-confirmbutton">Subscribe</button> </form> </div> </div> </div> </div> </div> <script type="text/javascript" charset="utf-8"> $('#newsletter').on('show.bs.modal', function(e) { $('#news-emailinput').val($('#footer-emailinput').val()); }); </script> </footer> </div> <script src="/static/js/bootstrap.min.js"></script> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script src="/static/js/docs.min.js"></script> <script src="/static/js/bootstrap-datepicker.min.js"></script> <script src="/static/js/lity.min.js"></script> <script src="/static/js/ostype.js"></script> <script type="text/javascript" charset="utf-8"> function screenShotButton(event) { var button = $(event.currentTarget); var target = $("#" + button.data('screenshot')) if (button.hasClass("screenshot_button_fullscreen")) { var platform = target.data("screenshot-platform"); if (!platform) { platform = "mac"; } var image = target.data("screenshot-" + platform); if (!image) { platform = "mac"; image = target.data("screenshot-" + platform); } var lightbox = lity("#screenshot-" + image); } else { target.data("screenshot-platform", button.data('platform')); renderScreenshots(); } }; function renderScreenshots() { $(".screenshot_image").each(function() { var target = $(this); var platform = target.data("screenshot-platform"); if (!platform) { platform = "mac"; } var image = target.data("screenshot-" + platform); if (!image) { platform = "mac"; image = target.data("screenshot-" + platform); } var zoom = target.data("screenshot-zoom"); target.empty(); target.append('<a href="#screenshot-' + image + '" data-lity><img src="' + image + '/embed" style="margin:0;display:none;" onload="this.width*=' + zoom + ';this.onload=null;this.style.display=\'inline\'" class="img-responsive" /></a>'); }); }; jQuery(document).ready(function($){ if (getOS().name == "Windows") { $(".screenshot_image").each(function() { $(this).data("screenshot-platform", "win"); }); } renderScreenshots(); $('.screenshot_button').on('click', function(event){ event.preventDefault(); screenShotButton(event); }); }); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10