I'm using Linux Mint 16 and i have installed the following packages for them to connect to my VPN using apt:
openvpn, bridge-utils, network-manager-openvpn, network-manager-openvpn-gnome
they are connecting to an IPcop OpenVPN server using a host to network connection (roadwarrior)
After this IPcop returns me an .ovpn and .p12
the command I'm running to start the connection is:
openvpn --config /home/user/VPN/user.ovpn
after which openvpn will try to connect. While trying to start a connection I get the following error:
ERROR: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
After looking around I read that OpenVPN tries to create a device to set up the connection, which only root is allowed to do
If I use root it does work, However I cannot give my users root access.
I have read about entering an exception in sudoers for a group.
So i created a group and placed my user in it
groupadd vpnusers
usermod -G user,vpnusers user
echo %vpnusers ALL = NOPASSWD: /path/to/openvpn /path/to/openvpn.conf >> /etc/sudoers
This last command is where I have issues. When checking /etc/openvpn there is no .conf file, and I cannot seem to find any openvpn executable.
How can I allow my users to connect to my VPN without giving them root access?
My users really cannot use GUI tools or use command line, I just need them to have a button to click on and connect.
It really work well when trying this out using root though. Does anyone have any idea how to get this done?