Other popular software, most notably apache, have long had the capability of breaking their large or complex configurations into smaller more manageable files which are included into the main configuration.
Like SQUID: "include /etc/squid/peers.conf"
http://wiki.squid-cache.org/Features/ConfigIncludes
is it possible to add this feature in the OpenVPN?
Suggestion: include another config (part) in conf-file
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Mar 12, 2014 2:19 am
- maikcat
- Forum Team
- Posts: 4200
- Joined: Wed Jan 12, 2011 9:23 am
- Location: Athens,Greece
- Contact:
Re: Suggestion: include another config (part) in conf-file
most common openvpn configs are usually about 20 lines....
i dont think that it would any good to break config file...
as you correctly pointed out
just my 2 cents.
Michael.
i dont think that it would any good to break config file...
as you correctly pointed out
do you think 20 lines of config is large or complex?their large or complex configurations
just my 2 cents.
Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)
Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)
"objects in mirror are losing"
Long live Dino Dini (Kick off 2 Creator)
Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)
"objects in mirror are losing"
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Mar 12, 2014 2:19 am
Re: Suggestion: include another config (part) in conf-file
it's useful in this case:
main config file server.conf conatins:
ipbind.include file contains:
i can simply change the contents only in file ipbind.include and restart openvpn.
Without include i need two exacly config-files with different "local" line
main config file server.conf conatins:
Code: Select all
***openvpn config lines***
include ipbind.include
Code: Select all
local 1.2.3.4
Without include i need two exacly config-files with different "local" line
-
- OpenVpn Newbie
- Posts: 1
- Joined: Tue Jan 27, 2015 5:07 am
Re: Suggestion: include another config (part) in conf-file
I need this function too.
I have a very long route list.
About 3600 lines.
I don't want put them in main config file.
I have a very long route list.
About 3600 lines.
I don't want put them in main config file.
-
- OpenVpn Newbie
- Posts: 1
- Joined: Thu Oct 15, 2015 8:01 am
- Location: Russia
- Contact:
Re: Suggestion: include another config (part) in conf-file
Guys, I found workaround
main.conf:
From manual:
It's works for me.
Important notice: file can be managed and apply without restart OpenVPN, and it's perfect.
main.conf:
Code: Select all
client-config-dir /etc/openvpn/routes
/etc/openvpn/routes/DEFAULT:OpenVPN will try to open and parse a default file called "DEFAULT", which may be provided but is not required.
Code: Select all
push "route 1.2.3.1 255.255.255.255"
push "route 1.1.2.3 255.255.255.255"
push "route 2.3.44.22 255.255.255.255"
Important notice: file can be managed and apply without restart OpenVPN, and it's perfect.
-
- OpenVpn Newbie
- Posts: 7
- Joined: Thu Feb 12, 2015 12:25 pm
Re: Suggestion: include another config (part) in conf-file
Notice that you can use --config multiple times, to merge several configuration files. Or you can use 'config' inside a configuration file to "include" another configuration file.
https://community.openvpn.net/openvpn/w ... edwithOVPN
https://community.openvpn.net/openvpn/w ... edwithOVPN