Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm working on a project that will require that I set up many nodes (raspberry pies, at the moment) to connect to a VPN (I'm thinking of using openvpn). In order to try to minimize my work while still keeping things to using a plain user and not a root account to set up each node, I ended up asking myself something like: Is there an openvpn wrapper available for a given language (say python) that could connect to the openvpn server and be available to create sockets (which would not be kernel-based sockets nor routing nor anything but completely process based).
Something like https://github.com/0xa/pyopenvpn, perhaps??? But it hasn't had any work in the last 2 years and it only supports UDP.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
From my understanding network-manager will work. It has a command line interface and it runs as a service, allowing you to run openvpn as a service. I have no idea what the sockets thing is all about. Normally the client opens a socket to the server, which opens a socket in and a socket out for each client.
Openvpn normally uses udp only, but it can use tcp.
What I'm talking about is, say, a process-based encapsulation layer for openvpn that could open up objects with a socket-like interface (that would use the openvpn encapsulation in order to send traffic to the other side of the openvpn connection) that therefore would not require to modify host's configuration files which would, normally, require root access because a plain user shouldn't be able to run openvpn under normal conditions (not considering the changes that are introduced at the networking layer on the host by the setup of an openvpn connection).
I think I could write wrapper scripts for openvpn that could then be configured with sudo so that plain users could call them and that could take care of the details.... then a python script could take care of controlling this openvpn processes. Perhaps I shouldn't try to go that "elegant" and stick with the simpler solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.