Without it, it will use the same port number as used to connect to the server. This makes OpenVPN use a random client side port when connecting. If you want to run multiple VPN clients on the same host, it is advisable to also add 'nobind' to your configuration file. You can also set different port numbers and protocols for each -remote, like this:įor advanced setups, it is also possible to use blocks, read more about that in the OpenVPN man page. You can list multiple -remote options in the configuration file, and OpenVPN will try all of them until it gets a connection. Both hostnames and IP addresses can be used. In the client configuration you need to tell where to connect. If you don't provide the 'port' option, 1194 will be used. The official OpenVPN port number is 1194, but any port number between 5 will work. In both client and server configurations.
The reason for avoding TCP can be found here:
If you cannot get a reliable UDP connection, then you might need to look into TCP. Generally speaking, UDP is the preferred alternative in most cases. You must first of all decide if you want to use UDP or TCP for connections. Or you can use 'config' inside a configuration file to "include" another configuration file. Notice that you can use -config multiple times, to merge several configuration files. Or if you do not use any options at all, you can just provide the file name directly. When starting OpenVPN, you can either use the -config option to tell OpenVPN which configuration file to use. When using these options in the configuration file must not use any leading dashes at all. The main difference is that on the command line you must use two leading dashes (-) for OpenVPN to understand what you mean. Almost all of these options can be used either on the command line directly or via a configuration file. One nifty detail about OpenVPN configuration options. Next up is the encryption layer, then there is the authentication layer and at the end we cover the network inside the tunnel. One part is the connection between server and clients. Each of them covers separate elements of a VPN tunnel. Setting up a VPN based on OpenVPN requires setting up a few "groups" of configuration options.