Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server as client (remote => []) doesn't work #255

Open
cjeanneret opened this issue Nov 20, 2017 · 3 comments
Open

Server as client (remote => []) doesn't work #255

cjeanneret opened this issue Nov 20, 2017 · 3 comments

Comments

@cjeanneret
Copy link
Contributor

Hello,

The generated configuration for openvpn has (at least) one error when we activate only the "remote" option for openvpn::server:

Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal puppet-agent[30586]: Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal systemd[1]: Starting OpenVPN Robust And Highly Flexible Tunneling Application On lsn...
Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal puppet-agent[30586]: Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal openvpn[30973]: Options error: You must define DH file (--dh)
Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal puppet-agent[30586]: Nov 20 14:31:34 ip-192-168-4-8.sandbox.internal openvpn[30973]: Use --help for more information.

After a small check, it appears the "dh" is ignored from the configuration file as soon as we enable the "remote" parameter:
https://github.com/voxpupuli/puppet-openvpn/blob/master/templates/server.erb#L20-L22
https://github.com/voxpupuli/puppet-openvpn/blob/master/templates/server.erb#L30-L32

The first one excludes dh parameter even if we pass it as a parameter to the openvpn::server (in case we use an external CA), the second one ignores it "by default".

For information, we're wanting to make a site-to-site VPN, which is neither client nor server. I'm not sure this module covers that specific use, in fact. I'm OK for providing at least a base configuration for that kind of use-case.

Care to advice?

Cheers,

C.

@bastelfreak
Copy link
Member

Hi @cjeanneret, thanks for rising this issue. Are you able to provide a patch for this?

@cjeanneret
Copy link
Contributor Author

@bastelfreak I think I can, but I'd like to do it in the right way© ;).

I think the patch would add a new param to the openvpn::server, something like s2s (site-to-site) that will enable some of the options in the server.erb template and drop the "client" mode (as well as the mode server and related option).

Does it sounds good to you?

Cheers,

C.

@cjeanneret
Copy link
Contributor Author

oh, and, of course, some way to generate the dh file as, for now, it's related to openvpn::ca only…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants