April 7, 201214 yr Pleas post all issue you have in this thread http://lime-technology.com/forum/index.php?topic=35435 OpenVPN Client plugin DL the attached plugin (32-bit), unpack it to plugin folder, then update the plugin from UI to get the latest version it it exist. 64 Bit version: Read here for installation : http://lime-technology.com/forum/index.php?topic=35435.msg330045#msg330045 Installation: [*]If not exist, create folder called "plugins" inside the root folder of the flash drive - "/boot/config/plugins" [*]DL the attached plugin, unpack it to to /boot/config/plugins, then update the plugin from UI to get the latest version if it exist. [*]Unpack your provider certificate/files to /boot/openvpn (create that folder if it's not exist) , can now be several ovpn files [*]Reboot to install, or manually install... telnet in to the server and use the code below. installplg /boot/config/plugins/openvpn_client.plg [*]Enter the Settings page of your UnRAID WebGui, you should see an OpenVPN icon. [*]Enter the page and add your username and password, save the settings, the click on START [*]To be able to use "Route specific IP through VPN tunnel" you first need to create this file webbadress.txt in /boot/openvpn, preferred is to use a linux friendly editor (notepad2 or ultra edit to create this file or VI in command prompt [*]To be able to use "Bypass specific IP from VPN tunnel" you first need to create this file bypassed.txt in /boot/openvpn, preferred is to use a linux friendly editor (notepad2 or ultra edit to create this file or VI in command prompt, It shall be same format as webbadress.txt example of a webbadress.txt www.aftonbladet.se www.di.se lime-technology.com www.expressen.se x64 version: To start and stop manually use following command, this can be used in crontab if you like to stop and start in a specific time. To start: /usr/local/emhttp/plugins/openvpnclient/scripts/rc.openvpnclient start Stopping: /usr/local/emhttp/plugins/openvpnclient/scripts/rc.openvpnclient stop x32 version: To start and stop manually use following command, this can be used in crontab if you like to stop and start in a specific time. To start: /etc/rc.d/rc.openvpn start Stopping: /etc/rc.d/rc.openvpn stop JM2005 usiing this to start & stop, the code shall be added in the go file #Start openvpn at 11 pm every day crontab -l > /tmp/file; echo '#Start openvpn at 11 pm every day' >> /tmp/file; echo '00 23 * * * /etc/rc.d/rc.openvpn start >/dev/null 2>&1' >>/tmp/file; crontab /tmp/file; rm /tmp/file #Stop openvpn at 7 am every day crontab -l > /tmp/file; echo '#Stop openvpn at 7 am every day' >> /tmp/file; echo '00 7 * * * /etc/rc.d/rc.openvpn stop >/dev/null 2>&1' >>/tmp/file; crontab /tmp/file; rm /tmp/file Change log X64 Version 3.0.9 Version 3.0.8 Version 3.0.6 [*]64.bit version Change log x32 Version 2.7.25 [*]Updated openssl Version 2.7.24 [*]Updated openssl [*]updated with the new features from the x64 version Version 2.7.23 [*]Updated openssl Version 2.7.22 [*]Fix a bug in for path to sub folders below /boot/openvpn [*]Removed curl packages, this is now embedded in 5.04 [*]Do a save config after plugin is installed! Some changes have been done on the config file. Version 2.7.21 [*]A bug fix Version 2.7.20 [*]Minor changing in UI [*]Added timeout for curl when getting WAN IP. Using checkip.dyndns.org Version 2.7.19 [*]No longer using pid file to verify if it's running or not, no longer using the pid file to kill process Version 2.7.18 [*]Drop Down list now also includes sub folders [*]minor UI changes Version 2.7.16 [*]Using a pid file to kill process again, was removed in previous version Version 2.7.15 [*]Drop Down list for ovpn added, now you can have several ovpn choose from [*]Code and UI updated, thanks to unevent [*]Please report any issue, all features from unevent in not yet implemented Version 2.7.11 [*]Using http://my-ip-address.com/ for verify of your WAN IP [*]Fix the ovpn update Version 2.7.12 [*]Using either tap5 or tun5, depending or your ovpn, your ovpn file are being updated from the plugin [*]Using 'ip route show' to view the routing table Version 2.7.10 [*]New layout, based on the OpenVPN Server plugin [*]Now using start | stop from command prompt ( old was start | disable) [*]Prefered is to delete the old config file (rm /boot/config/plugins/openvpn/openvpn.cfg) [*]Added function to disable using username/password, if you going to connect to a OpenVPN server openvpn_client.plg.zip Store settings to config file works now. Updated file is attached on this post Update with OpenVPN 2.3.4
April 8, 201214 yr peter_sm, you have to create a bridge before create the vpn tunnel to route your traffic. #!/bin/bash br="br0" tap="tap0" eth="eth0" eth_ip="192.168.137.254" eth_gw="192.168.137.1" eth_netmask="255.255.255.0" eth_broadcast="192.168.255.255" for tap in $tap; do openvpn --mktun --dev $tap done brctl addbr $br brctl addif $br $eth for tap in $tap; do brctl addif $br $tap done for tap in $tap; do ifconfig $tap 0.0.0.0 promisc up done ifconfig $eth 0.0.0.0 promisc up ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast route add default gw $eth_gw dev $br But if you want to route all your traffic trough the VPN you just have to modify the gateway: route add default gw 46.246.88.128 dev tap0
April 11, 201214 yr Yeah, figure if you got the client running... Perhaps you could use that experience to build a VPN server plugin as well
April 12, 201214 yr Alright! I have been looking for something like this! Could you please clean up the How To Instructions? I would love to give this a try! Thanks for making this!
April 12, 201214 yr Pretty much Need the ability to have at least a pptp connection with user/pass auth! Depends on how easy L2TP is to setup.
May 22, 201214 yr hi peter! thanks for creating this plugin. i would like to install it but i haven't installed any packages manually on unraid before, so i have a couple of noob/basic questions before i dive in, hope that's ok. 1) what location should i install the OpenVPN client to? /boot/openvpn? or is there a better location like /boot/extra? 2) do i copy the .txz to /boot/openvpn, login with telnet, and run "installpkg /boot/openvpn/openvpn-2.1.1-i486-1-autologin.txz", is this the correct command? is this enough to complete the manual install? i appreciate your guidance, sorry for the basic questions. /johan
May 22, 201214 yr Hey Peter, Letting you know that Tom included the necessary modules for PPTP VPN server in the latest 5.0 RC. I ended up using DD-WRT for mine, but it could be a great plugin to peruse?
May 22, 201214 yr Hi Peter, Both the .txz and the plugin installed just fine with no apparent errors during installation. But when i tested the plugin it prints the "Starting openvpn!!" message then stops. So I tried to start OpenVPN via the command line with ./run_openvpn.sh and I get the following error message: root@Tower:/boot/openvpn# ./run_openvpn.sh openvpn: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: No such file or directory I even rebooted just to be sure everything installed ok, and I get the same error. Any idea on how to fix this? I'm guessing it's related to the openvpn install and not your plugin. I did some googling before posting but I am probably in over my head a bit /johan
May 23, 201214 yr Hi Peter, Thanks, this file worked I replaced the bundled file with the one from your post and installed it manually using with "installpkg /boot/extra/lzo-2.03-i486-1.txz" and now OpenVPN starts up from the command line using the "./run_openvpn.sh" script. success! During startup, OpenVPN exits after Peer Connection Initiated, with the following output: Wed May 23 10:22:34 2012 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2) Wed May 23 10:22:34 2012 Note: Attempting fallback to kernel 2.2 TUN/TAP interface Wed May 23 10:22:34 2012 Cannot allocate TUN/TAP dev dynamically Wed May 23 10:22:34 2012 Exiting Have you had the same issue? Should I try this potential fix? http://tobylockyer.com/blog/open-vpn-error-cannot-open-tuntap/ UPDATE: I can confirm that this fixed the issue for me. Some Linux distros will not create the tap device for you... You need to issue the following commands: mkdir /dev/net mknod /dev/net/tun c 10 200 /johan
May 23, 201214 yr Hi Peter, Almost there ... the only issue left for me is the start button. * Start button - not working for me yet ("Starting openvpn!!" text shows up in the left hand corner but the vpn doesn't start and IP doesn't change, but the start script works fine from the command line) * Stop button - works for me (after starting the vpn from commandline with the "./start-vpn.sh start", I can stop it using the plugin Stop button, the page also displays the green "OpenVPN is running" text & IP information changes correctly after pressing Stop.) * Check IP button - works for me (only after downloading a new copy of the curl package and re-installing manually) Any advice/ideas on how to fix the start button would be appreciated. Super excited to have this running, thank you! /Johan
July 3, 201214 yr Author Plugin updates version 2.0.9 are available on first post. Using now OpenVPN version 2.2.2 and also added iproute2 packages //Peter
July 7, 201214 yr Hi, I've been trying to get your plugin working but seem to be having a few issues, I'll apologise in advanced i'm new here and my Linux skills are.. limited. So a bit of background I'm using a clean install of unRAID 5.0-rc5-r8168, in addition i have unMenu and Simple Features installed, 3Tb as Parity, 2x3Tb as Disk 1 and 2, and a 120Gb SSD as Cache, other drives will be migrated over from my Windows Server as I empty them but I digress. I've gone through the installation of the package file openvpn_client_ver_2.0.9.zip as described in the first post and copied over my .ovpn .crt files and every thing seems to have worked. However OpenVPN will not start, and the following message is presented Warning: file(/tmp/openvpn/openvpn.out): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/openvpn/openvpn.php on line 11 Warning: implode(): Argument must be an array in /usr/local/emhttp/plugins/openvpn/openvpn.php on line 12 at the same time if i look at the Monitor connected to the unRAID box I see this run_cmd: /etc/rc.d/rc.openvpn enable "My Password" "My Username" curl: /usr/lib/libidn.so.11: no version information available (required by /usr/lib/libcurl.so.4) mkdir: cannot create directory '/tmp/openvpn': File exists now as I said I'm new to linux so the only thing of that I even half understand is the cannot create directoy as a test I deleted the /tmp/openvpn directory which made no difference Doh! ignore everything, I did a plugin install again, this time I saved it with the enabled option set to no, then set to yes, it now works. I am still getting the messages on the unRAID screen showing curl: /usr/lib/libidn.so.11: no version information available (required by /usr/lib/libcurl.so.4) mkdir: cannot create directory '/tmp/openvpn': File exists is this anything I should be worrying about?
July 7, 201214 yr Author curl: /usr/lib/libidn.so.11: no version information available (required by /usr/lib/libcurl.so.4) mkdir: cannot create directory '/tmp/openvpn': File exists is this anything I should be worrying about? These messages you can ignore, is OpenVPN up and running ?
July 7, 201214 yr Hello again, yes it is up and running, however I've just tried a restart on unRAID, using the power off script and OpenVPN did not start on boot, although I got a message on the Screen attached to unRAID as usual for the most part Welcome to Linux 3.0.35-unRAID (tty1) HomeServer login: then a few seconds later it changes to Welcome to Linux 3.0.35-unRAID (tty1) HomeServer login: No openvpn process is running. I had to go back to the Settings/openvpn change enabled to no, click apply then back to yes and apply for it to work again btw amazed by the quick response Cheers Edd
July 7, 201214 yr Author curl: /usr/lib/libidn.so.11: no version information available (required by /usr/lib/libcurl.so.4) These messages you can ignore, is OpenVPN up and running ? Next version will have a packages included to remove the messages above I had to go back to the Settings/openvpn change enabled to no, click apply then back to yes and apply for it to work again I will look into this later if it's a bug or not //Peter
July 7, 201214 yr Author Thanks Again, for your help Cheers Edd Can you try the new version 2.1.0, let me know if something have been solved ... //Peter
July 7, 201214 yr https://dl.dropbox.com/u/49442039/openvpn-2.2.2-i486-2-autologin.txz: 2012-07-07 16:14:07 ERROR 404: NOT FOUND.
July 7, 201214 yr Author strange, the path is not what it should be !!! new version on first post ......2.1.1 //Peter
July 7, 201214 yr Thanks, might have been a cached page as I did use the link on the 1st post but I see it was 2.1.0
Archived
This topic is now archived and is closed to further replies.