Use the same common parameters for all openvpn config files
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have several openvpn .conf
files for various vpns, and they all need to have these lines at the end of the file, like
script-security ...
setenv PATH ...
up ...
down ...
down-pre ...
Is there a way to set this configuration globally across all files or in openvpn somewhere? I don't want to modify any of the individual vpn files if it's possible to configure it someplace centrally or globally.
I'm starting the config files with systemd
, so sudo systemctl start openvpn-client@vpn1.service
.
networking openvpn vpn
add a comment |Â
up vote
3
down vote
favorite
I have several openvpn .conf
files for various vpns, and they all need to have these lines at the end of the file, like
script-security ...
setenv PATH ...
up ...
down ...
down-pre ...
Is there a way to set this configuration globally across all files or in openvpn somewhere? I don't want to modify any of the individual vpn files if it's possible to configure it someplace centrally or globally.
I'm starting the config files with systemd
, so sudo systemctl start openvpn-client@vpn1.service
.
networking openvpn vpn
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have several openvpn .conf
files for various vpns, and they all need to have these lines at the end of the file, like
script-security ...
setenv PATH ...
up ...
down ...
down-pre ...
Is there a way to set this configuration globally across all files or in openvpn somewhere? I don't want to modify any of the individual vpn files if it's possible to configure it someplace centrally or globally.
I'm starting the config files with systemd
, so sudo systemctl start openvpn-client@vpn1.service
.
networking openvpn vpn
I have several openvpn .conf
files for various vpns, and they all need to have these lines at the end of the file, like
script-security ...
setenv PATH ...
up ...
down ...
down-pre ...
Is there a way to set this configuration globally across all files or in openvpn somewhere? I don't want to modify any of the individual vpn files if it's possible to configure it someplace centrally or globally.
I'm starting the config files with systemd
, so sudo systemctl start openvpn-client@vpn1.service
.
networking openvpn vpn
edited Nov 10 '17 at 10:11
asked Nov 10 '17 at 9:49
user779159
21728
21728
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
You can use the --config
command line option multiple times to merge configurations or also include the config
option inside a config file to refer to others.
Source:OpenVPN - Getting started How-To
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.
â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.
â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating theExecStart=
line to include an extra--config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...
â Zip
Nov 10 '17 at 10:56
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You can use the --config
command line option multiple times to merge configurations or also include the config
option inside a config file to refer to others.
Source:OpenVPN - Getting started How-To
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.
â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.
â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating theExecStart=
line to include an extra--config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...
â Zip
Nov 10 '17 at 10:56
add a comment |Â
up vote
4
down vote
accepted
You can use the --config
command line option multiple times to merge configurations or also include the config
option inside a config file to refer to others.
Source:OpenVPN - Getting started How-To
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.
â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.
â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating theExecStart=
line to include an extra--config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...
â Zip
Nov 10 '17 at 10:56
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You can use the --config
command line option multiple times to merge configurations or also include the config
option inside a config file to refer to others.
Source:OpenVPN - Getting started How-To
You can use the --config
command line option multiple times to merge configurations or also include the config
option inside a config file to refer to others.
Source:OpenVPN - Getting started How-To
edited Nov 10 '17 at 13:20
GAD3R
22.7k154895
22.7k154895
answered Nov 10 '17 at 10:03
Zip
51118
51118
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.
â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.
â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating theExecStart=
line to include an extra--config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...
â Zip
Nov 10 '17 at 10:56
add a comment |Â
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.
â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.
â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating theExecStart=
line to include an extra--config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...
â Zip
Nov 10 '17 at 10:56
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the
--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.â user779159
Nov 10 '17 at 10:12
I've updated my question to show that I'm starting the vpns with systemd, how could I pass the
--config
option to systemd? I don't want to include the config option inside the config file because there are a lot of config files, I'd rather do it centrally like in some openvpn or systemd central configuration.â user779159
Nov 10 '17 at 10:12
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
You can edit/copy the systemd unit file to include the option as it calls openvpn. Also a good practice would be to remove the duplicate lines from existing configs (avoiding conflicts), hence you can just add the config entry as you do it. Would it be enough? I can add it to the answer...
â Zip
Nov 10 '17 at 10:38
Is
/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.â user779159
Nov 10 '17 at 10:50
Is
/usr/lib/systemd/system/openvpn-client@.service
the systemd unit file you're referring to? How exactly can I modify that file to add the 5 config params I need to from the question? Ideally I could create a single file with just those 5 lines it and refer to it in the unit file so that so I can add just one thing to that unit file instead of 5 things.â user779159
Nov 10 '17 at 10:50
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating the
ExecStart=
line to include an extra --config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...â Zip
Nov 10 '17 at 10:56
It's pretty much that what I am suggesting. You can "override" the openvpn unit file, updating the
ExecStart=
line to include an extra --config path/to/conf
, where you can have as many parameters as you'd like. If your unit doesn't have such line, please add it to the question so I can figure it out, but mine does. Tell me so I can update the answer accordingly...â Zip
Nov 10 '17 at 10:56
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403715%2fuse-the-same-common-parameters-for-all-openvpn-config-files%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password