How can I enable automatic connection to more than one server?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
How can I enable automatic connection to more than one server?
Hey all,
On one of my client machines I need to access two different servers, which I can do manually via the OpenVPN GUI, however I would like to enable this automatically.
I have the windows service set to run at start up and I have two tap adapters installed, however I'm not sure where I need to place the certificates etc for each connection. I have tried placing them in separate sub folders, but that doesn't seem to work and they can't all go in the same folder because of the multiple ca.crt files clashing.
Where am I going wrong here?
On one of my client machines I need to access two different servers, which I can do manually via the OpenVPN GUI, however I would like to enable this automatically.
I have the windows service set to run at start up and I have two tap adapters installed, however I'm not sure where I need to place the certificates etc for each connection. I have tried placing them in separate sub folders, but that doesn't seem to work and they can't all go in the same folder because of the multiple ca.crt files clashing.
Where am I going wrong here?
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
Is this even possible using the official OpenVPN client, or do I need to look at third party options such as Viscosity or Tunxten?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: How can I enable automatic connection to more than one server?
They can go in sub-folders.CraftyClown wrote: ↑Sat Jan 06, 2018 2:49 amI have tried placing them in separate sub folders, but that doesn't seem to work and they can't all go in the same folder because of the multiple ca.crt files clashing
See --config file in The Manual v24x
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
TinCanTech wrote: ↑Sun Jan 07, 2018 1:30 pmThey can go in sub-folders.CraftyClown wrote: ↑Sat Jan 06, 2018 2:49 amI have tried placing them in separate sub folders, but that doesn't seem to work and they can't all go in the same folder because of the multiple ca.crt files clashing
See --config file in The Manual v24x
Thank you TinCanTech,
So I do have my files in separate sub folders, each is set up to use different UDP ports and I have two tap adapters installed. Is there something else I might have missed here?
My config files for the two connections are as follows:
Code: Select all
client
dev tun
proto udp
remote indigorebel.ddns.net 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client2.crt
key client2.key
ns-cert-type server
cipher AES-128-CBC
comp-lzo
verb 4
float
Code: Select all
client
dev tun
proto udp
remote craftyclown.ddns.net 1196
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert home2.crt
key home2.key
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 4
float
- Pippin
- Forum Team
- Posts: 1201
- Joined: Wed Jul 01, 2015 8:03 am
- Location: irc://irc.libera.chat:6697/openvpn
Re: How can I enable automatic connection to more than one server?
Hi,
Try one with tun0 and the second with tun1
Try one with tun0 and the second with tun1
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
Thanks Pippin, I tried changing the config scripts as below, however no joy
Is there anything else I might be missing here?
Code: Select all
client
dev tun0
proto udp
remote craftyclown.ddns.net 1196
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert home2.crt
key home2.key
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 4
float
Code: Select all
client
dev tun1
proto udp
remote indigorebel.ddns.net 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client2.crt
key client2.key
ns-cert-type server
cipher AES-128-CBC
comp-lzo
verb 4
float
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: How can I enable automatic connection to more than one server?
what do your logs say ?
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
Both of the service logs read the same:
Code: Select all
Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Options error: --cert fails with 'home2.crt': No such file or directory (errno=2)
Mon Jan 08 14:26:47 2018 us=400157 WARNING: cannot stat file 'home2.key': No such file or directory (errno=2)
Options error: --key fails with 'home2.key'
Options error: Please correct these errors.
Use --help for more information.
Code: Select all
Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Options error: --cert fails with 'client2.crt': No such file or directory (errno=2)
Mon Jan 08 14:26:47 2018 us=371581 WARNING: cannot stat file 'client2.key': No such file or directory (errno=2)
Options error: --key fails with 'client2.key'
Options error: Please correct these errors.
Use --help for more information.
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
Anyone have any suggestions?
-
- OpenVPN Power User
- Posts: 69
- Joined: Sat Nov 01, 2014 9:55 am
Re: How can I enable automatic connection to more than one server?
I'm still struggling to get two connections working simultaneously. Is there a better place for me to be asking for assistance with this?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: How can I enable automatic connection to more than one server?
CraftyClown wrote: ↑Mon Jan 08, 2018 2:40 pmOptions error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Options error: --cert fails with 'home2.crt': No such file or directory (errno=2)
Mon Jan 08 14:26:47 2018 us=400157 WARNING: cannot stat file 'home2.key': No such file or directory (errno=2)
Options error: --key fails with 'home2.key'
Options error: Please correct these errors. Use --help for more information.
Please read this:
https://openvpn.net/index.php/open-sour ... tml#config