Jump to content
peter_sm

OpenVPN Server & Client for unRAID 6.2+ (6.1 are still supported)

731 posts in this topic Last Reply

Recommended Posts

I have updated the OpenVPN Server & Client plugins for the V6.2+ plugin manager.

Post all issue you have in this thread !!

To install.

Install the plugins, go to the 'Extensions' page and enter the below links into the 'Install Extension' line and then click the 'Install' button.

Client

https://raw.githubusercontent.com/petersm1/openvpn_client_x64/master/openvpn_client_x64.plg
Unpack your provider certificate/files to /boot/openvpn (create that folder if it's not exist) , can now be several ovpn files.
 

More info about Client installation : http://lime-technology.com/forum/index.php?topic=19439.0

 

 

Server

https://raw.githubusercontent.com/petersm1/openvpnserver/master/openvpn_server_x64.plg
 

Post installation for OpenVPN server.

1: Change and save settings in Cert and Misc Settings.

2: Install Easy-rsa.

3:Generate server certificate ... This take several minutes .....

4: Set and save Server config even if you use default settings you need to save.

5:Generate clients.

6: start server .

7: When you created the client file, prefered a "inline file" (inline file is only one *.ovpn) on the server then you can email the config (with file extension .ovpn) as an attachment from an email account on your computer (or a webmail) to the email address setup on IOS in the Mail app. In the mail app open the email and open the .ovpn file, then choose to open it with OpenVPN. If you did it right, OpenVPN opens and you can click a + icon next to your config to import it. Now you can simply slide Off to On and your VPN connects.

Make sure the OpenVPN server will be accessible from the internet. That means:

you need to open the server ports on the router and forward this ports to the fixed LAN IP of the unRAID

 

More info : http://lime-technology.com/forum/index.php?topic=28557.0

 

 

btn_donate_74x21.png If you appreciate my work on my plugins.

 

//Peter

Edited by peter_sm
  • Upvote 1

Share this post


Link to post

Peter,

 

You are awesome as normal. Looking forward to testing this out tonight with beta 10!!

Share this post


Link to post

Nice work client installed without a hitch. I have some questions is this what I should be seeing:

 

default via 192.168.1.1 dev xenbr0  metric 1

10.15.0.0/16 dev tun5  proto kernel  scope link  src 10.15.4.27

127.0.0.0/8 dev lo  scope link

128.0.0.0/1 via 10.15.0.1 dev tun5

172.17.0.0/16 dev docker0  proto kernel  scope link  src 172.17.42.1

192.168.1.0/24 dev xenbr0  proto kernel  scope link  src 192.168.1.110

216.168.3.151 via 192.168.1.1 dev xenbr0

 

(192.168.1.110 unraid      192.168.1.1 router)

 

Should my KVM windows instance see the Vpn address?

 

    <interface type='network'>

      <mac address='52:54:00:45:05:d2'/>

      <source network='xenbr0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

    </interface>

 

Reed

Share this post


Link to post

peter_sm- yes, very nice!  One plg file to rule them all!  8)

 

Now put your icons inline using the "base64" attribute.

 

For example, for Device_status.png...

 

Change:

<FILE Name="/boot/config/plugins/openvpnserver/device_status.png">
<URL>--no-check-certificate http://lime-technology.com/wiki/images/9/97/Device_status.png</URL>
</FILE>

To:

<FILE Name="/usr/local/emhttp/plugins/openvpnserver/device_status.png" Type="base64">
<INLINE>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFJSURB
VDiNtZI9awJBEIafVctUSv6KvUUCEpPiDhsFsT2CVcSt5OqzlWBvKzb5QDCCvX8lYL2zsm4alTtR
MYRM987OPLzzssp7z1+qcKo5m81u8/n8s1KqDuC9nzjnXqvV6vdVAOecds69pFoxcAN0TwKm0+kS
WG+326Rer69EpA2glLrbOfgC2kB3MpmUc7mcBophGFZyACKiRYTNZqN3uiQiBEGwCIJgISKISAnA
WquNMYiIPjhoNBorINzbMsZkbKZ1s9kM028FgNFo9AE8AJ9RFNVEJANI6+PZAkAURbVzC8f6eLYA
MBgMyt57DRS11pVLgCRJlsBaKZX0er3VIURrLcaYfYiZpbQ2xmhrbTbEfr+fCeaSgziOM4Grf/nK
nU7nJHU4HKqrACIy997fp3tKqfmp2bMntFqtN+BxJ9/H4/HTrwDX1g/Ee8aNyc3z/wAAAABJRU5E
rkJggg==
</INLINE>
</FILE>

 

You can use the 'base64' command to convert a binary to base64.  For example, what I did was download your Device_status.png file to my current directory and then typed:

 

base64 Device_status.png

 

This will spew out the block you see above.  Next I used mouse to select it and paste into this post.  There are also online base64 encoders that will do the job as well.

 

Notice also, the icon is created directly in /usr/local/emhttp/plugins/openvpnserver/ - no need to save it on the flash separately (because it will always be regenerated when the plugin gets installed at boot-time).

 

Once this is done, no more dependency on the unRaid wiki.  ;)

 

Finally, I don't think it matters too much, but this is the mirror we use to fetch slack packages:

http://slackware.cs.utah.edu/pub/slackware/slackware64-current/slackware64/

 

 

 

Share this post


Link to post

Peter,

 

You are awesome as normal. Looking forward to testing this out tonight with beta 10!!

 

Are you hinting that we will be seeing this soon, or just trying to make us jealous?

 

Share this post


Link to post

Peter,

 

You are awesome as normal. Looking forward to testing this out tonight with beta 10!!

 

Are you hinting that we will be seeing this soon, or just trying to make us jealous?

 

Working on it ;-)

Share this post


Link to post

installing the server plg I get the following at the end:

 

Warning: copy(/boot/config/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/plgMan/plugin on line 220
plugin: unable to copy LOCAL file: /usr/local/emhttp/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png

 

Myk

 

Share this post


Link to post

installing the server plg I get the following at the end:

 

Warning: copy(/boot/config/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/plgMan/plugin on line 220
plugin: unable to copy LOCAL file: /usr/local/emhttp/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png

 

Myk

This lines should have been deleted, will remove it on next version.

 

//Peter

Share this post


Link to post
plugin: creating: /boot/config/plugins/openvpnserver/device_status.png - downloading from URL --no-check-certificate http://lime-technology.com/wiki/images/9/97/Device_status.png
plugin: creating: /boot/config/plugins/openvpnserver/new_config.png - downloading from URL --no-check-certificate http://lime-technology.com/wiki/images/b/b3/New_config.png
plugin: creating: /boot/config/plugins/openvpnserver/information.png - downloading from URL --no-check-certificate http://lime-technology.com/wiki/images/5/54/Information.png
plugin: creating: /boot/config/plugins/openvpnserver/openvpnserver.png - downloading from URL --no-check-certificate http://lime-technology.com/wiki/images/2/2f/Openvpn.png
plugin: running: 'anonymous'
/bin/bash: line 4: /etc/rc.d/rc.openvpnserver: No such file or directory
plugin: creating: /var/local/emhttp/plugins/openvpnserver/check-my-ip.sh - from INLINE content
plugin: setting: /var/local/emhttp/plugins/openvpnserver/check-my-ip.sh - mode to 0770
plugin: creating: /boot/config/plugins/openvpnserver/openvpnserver.cfg - from INLINE content
plugin: creating: /boot/config/plugins/openvpnserver/openvpnserver_cert.cfg - from INLINE content
plugin: creating: /etc/rc.d/rc.openvpnserver - from INLINE content
plugin: setting: /etc/rc.d/rc.openvpnserver - mode to 0770
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/openvpnserver.page - from INLINE content
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/device_status.png - copying LOCAL file /boot/config/plugins/openvpnserver/device_status.png
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/new_config.pn - copying LOCAL file /boot/config/plugins/openvpnserver/new_config.png
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/information.png - copying LOCAL file /boot/config/plugins/openvpnserver/information.png
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/openvpnserver.png - copying LOCAL file /boot/config/plugins/openvpnserver/openvpnserver.png
plugin: creating: /usr/local/emhttp/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png - copying LOCAL file /boot/config/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png

Warning: copy(/boot/config/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/plgMan/plugin on line 220
plugin: unable to copy LOCAL file: /usr/local/emhttp/plugins/openvpnserver/Ovpntech_logo-s_REVISED.png

Share this post


Link to post

I try to run the system and I get an error. What am I doing wrong.

 

Options error: In [CMD-LINE]:1: Error opening configuration file: Chose
Use --help for more information.

Share this post


Link to post

peter_sm- yes, very nice!  One plg file to rule them all!  8)

 

Now put your icons inline using the "base64" attribute.

 

Thanks Tom!

 

Both plugins updated with base64 for icons, and path to the packages.

 

And "Ovpntech_logo-s_REVISED.png" are removed from the server plugin.

 

 

//Peter

Share this post


Link to post

After updating, if I try to enter into the OpenVPN server settings my unRAID system hangs. I can still access it via PuTTY.

Share this post


Link to post

Can you do a "ps -ef" and see if you have a process with ipecho.net, if so it's hanging when get your IP address

Share this post


Link to post

root     14643 14642  0 00:45 ?        00:00:00 wget http://ipecho.net/plain -O

 

I can again access unRAID after killing that process. Is there an alternative to ipecho?

Share this post


Link to post

Yes, trying the same :-)

 

edit

nano /var/local/emhttp/plugins/openvpnserver/check-my-ip.sh

 

and remark the ipecho line and add this line

curl icanhazip.com

 

Will update plugin later today

Share this post


Link to post

In trying to find a problem I was also getting the following error:

Line 665: [: ==: unary operator expected

 

Line 665 is

if [ $NEWBRIDGING == "yes" ] ; then

 

Should it be

if [ "$NEWBRIDGING" == "yes" ] ; then

 

 

 

Share this post


Link to post

Upgraded unRAID to 6.0~beta10. OpenVPN Server is no longer listed as a plugin but I can access it in the Settings menu.

Share this post


Link to post

I try to run the system and I get an error. What am I doing wrong.

 

Options error: In [CMD-LINE]:1: Error opening configuration file: Chose
Use --help for more information.

 

I get same problem. How do we set up a config file? All I want to do is access another unRAID server and vice versa.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now