N
N
Nikita Melikhov2013-10-21 23:05:25
FreeBSD
Nikita Melikhov, 2013-10-21 23:05:25

freebsd openvpn multiple configs

Hello!
The question is - how can I run an openvpn server with several configuration files under FreeBSD 9.1?
On linux, it picks up all the configs that are in the directory. I looked at the init script, it is implemented in a cycle, in fryaha I see only one that you write to it. Googling didn't come up with good answers.
Tell me a human way to start, a few start scripts and just don’t offer commands to autoload, since there will be about 50 connections themselves, this is very inconvenient.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikita Melikhov, 2013-10-22
@Sl1mShady

6614***
7:47 over several openvpn configs
7:48 first config, default

скрипт /usr/local/etc/rc.d/openvpn
openvpn_enable="YES"
openvpn_if="tun"
openvpn_configfile="/usr/local/etc/openvpn/client.conf"
openvpn_dir="/usr/local/etc/openvpn"

7:49 second config
script /usr/local/etc/rc.d/openvpn_2 (just a copy of /usr/local/etc/rc.d/openvpn)
openvpn_2_enable="YES"
openvpn_2_if="tun"
openvpn_2_configfile="/usr/local/etc/openvpn/client.conf"
openvpn_2_dir="/usr/local/etc/openvpn"

7:49 in the second config folder and config file specify another
and, most importantly, another port this method is not particularly convenient, if it doesn’t work out differently, I’ll do it this way.

M
mrpsycho, 2013-10-23
@mrpsycho

can you tell me why you need several configs?
well, those 1-2 I can understand...but 50 is weird.

D
ded_Pihto, 2013-11-14
@ded_Pihto

well, openvpn has wonderful scripts on the client script-up\script-down.cmd ( Win_) , up\down parameters in the client config ( unix ), client-connect\client-disconnect in the server config setting. in the latter cases, a lot of parameters are passed to the bash script, for example: $username $ifconfig_pool_remote_ip $trusted_ip on the basis of which you can "resolve" someone where necessary in any combination .. you really need to run two or three instances of openvpn if you need to raise inputs on different input interfaces. this can also be (probably) done on one copy, but it’s too difficult to figure out what goes where and how.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question