Multiple configs in one file

This is where we can discuss what we would like to see added or changed in OpenVPN.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
User avatar
ecrist
Forum Team
Posts: 237
Joined: Wed Nov 26, 2008 10:33 pm
Location: Northern Minnesota, USA
Contact:

Multiple configs in one file

Post by ecrist » Thu Mar 11, 2010 12:52 pm

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.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

Post Reply