Page 1 of 1

Multiple configs in one file

Posted: Thu Mar 11, 2010 12:52 pm
by ecrist
Putting multiple configs in one file makes it easier to run a single command to start up a group of connections, for example:

Code: Select all

[config My Company]
client
dev tap
proto udp
remote remote.example.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca mycompany.crt
cert mycompany_client.crt
key mycompany_client.key
verb 3

[config Second VPN]
client
dev tap
proto udp
remote my.friends.house.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
verb 3

[config Third VPN]
...

In this instance, OpenVPN would scan the config, verify there are no problems (conflicting server instances on the same port, etc), and spawn a new process for each [config Foo] stanza.