Running multiple server configs

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
lordmata
OpenVpn Newbie
Posts: 4
Joined: Mon Apr 15, 2019 12:30 pm

Running multiple server configs

Post by lordmata » Wed Apr 17, 2019 2:40 pm

I'm trying to run multiple server.conf files on my VPS, but it seems to
always look only for server.conf file.

I've edited the the /etc/default/openvpn file to AUTOSTART="server-tap"
to just try to redirect it to only one config for now and it doesn't work.
The service crashes with the following message: Apr 17 09:50:41
vps234963 systemd[1]: Failed to start OpenVPN connection to server.
I've ran "systemctl daemon-reload" after editing the AUTOSTART line.

As soon as I put back the original "server.conf" file back into the
/etc/openvpn/ directory it restarts fine (even if AUTOSTART is still
pointing to server-tap.conf).

I've installed OpenVPN using the angristan script
(https://github.com/Angristan/OpenVPN-install)

Any ideas what could be happening here?

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Running multiple server configs

Post by bitchange » Mon Apr 20, 2020 6:24 pm

@lordmata
hi.
Did you ever find out the issue?
I am running into similar situation.
I define an AUTOSTART= value and it keeps rotating all the .conf files in the folder.
I ended up deleting all other .con files but one.
now is better.
however, on a regular base .. but I cant see the intervals, it keeps dropping the defined server in the AUTOSTART= and loads a US server that is NOT present in the folder.
Very confusing.
If you have any resolution to your issue, please post it.
Maybe can lead me to solve my issue.
(see my post: viewtopic.php?f=1&t=30104&p=91175&hilit ... %3D#p91175 )
Thanks

300000
OpenVPN Power User
Posts: 196
Joined: Tue May 01, 2012 9:30 pm

Re: Running multiple server configs

Post by 300000 » Tue Apr 21, 2020 11:46 am

you need to make multi network card and run multi instant of openvpn config so it will work for you

viewtopic.php?f=4&t=29995&p=90731#p90731

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Running multiple server configs

Post by bitchange » Wed Apr 22, 2020 8:27 am

@300000
hi.
I cant see that apply to my setup; I use a raspberry pi as a openvpn router that connects to a commercial vpn server.
My issue:
the openvpn clients simply does not accept to connect to only one server. The only one set in the /etc/openvpn
The file /etc/default/openvpn claims to control /etc/init.d/openvpn: extract from comments in file: "This is the configuration file for /etc/init.d/openvpn"
So that is what I am trying to do.
In the /etc/init.d/openvpn there is a line that says: # Source defaults file; edit that file to configure this script.
and it always stays :
AUTOSTART="all"
I made sure the configuration scripts is changing to a specific server. Yet it wont change at /etc/init.d/openvpn
I probably could change it here to specific server, but 1st I dont know if is allowed by the system. 2nd it would become static and cant change server if I need to by modify the named script.
Thanks

300000
OpenVPN Power User
Posts: 196
Joined: Tue May 01, 2012 9:30 pm

Re: Running multiple server configs

Post by 300000 » Wed Apr 22, 2020 9:48 am

You need make as many openvpn config as you like but it must not the same port and the name mustnot be the same . You can connect to 10 openvpn server at the same time . Because you connect more than one openvpn provider so you must use split dns to make it work.openvpn run server and client as the same . Not real different at all .it base on point to point and routing at the and to make it work

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Running multiple server configs

Post by bitchange » Thu Apr 23, 2020 8:54 am

@300000
hi there.
sorry, maybe I dont understand your point.
I don't run multiple .conf at the same time.
I need one only connection at time.
To control the connection to take on charge, I modify the /etc/default/openvpn and I define one single server.conf file.
I dont want the AUTOSTART="all".
I want AUTOSTART="server"

The behave, no matter what I do, is AUTOSTART="ALL".
Soon I try to modify this /etc/init.d/openvpn directly. Maybe that solve the issue??
---
Back to your suggestion, if I understand right, you imply that I want to run several server.conf (es: server1, server2 server3) in my client?
Therefore having several active exit point?
If this s what you mean, this is not what I am trying to do.
If this is not what you mean, please explain me as I dont understand the idea of running severl server.conf files at the same time to connect to one single server at time.
Thank you

300000
OpenVPN Power User
Posts: 196
Joined: Tue May 01, 2012 9:30 pm

Re: Running multiple server configs

Post by 300000 » Thu Apr 23, 2020 9:05 am


I'm trying to run multiple server.conf files on my VPS, but it seems to
always look only for server.conf file.

I've edited the the /etc/default/openvpn file to AUTOSTART="server-tap"
to just try to redirect it to only one config for now and it doesn't work.
The post he ask run multi server and you come in with your question

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Running multiple server configs

Post by bitchange » Fri Apr 24, 2020 7:03 pm

Apologize.
as you responded after my post, I assumed was a response for me.
My excuses.

Post Reply