Jump to content

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


peter_sm

Recommended Posts

  • 2 weeks later...

I have a Dual wan connection with one Static & one Dynamic IP. Currently the OpenVPN server is showing the Dynamic IP as the wan IP, I have tried to set the server to the static IP, but the wan ip shown on the server setting page never changes & i can't seem to connect on the static ip. Where can I change that Static IP, I have tried stoping & restarting the OpenVPN server, but the IP either shows as blank, or as the dynamic, i can't see to get the static one to show up.... Any Idea's?

Link to comment

I have a Dual wan connection with one Static & one Dynamic IP. Currently the OpenVPN server is showing the Dynamic IP as the wan IP, I have tried to set the server to the static IP, but the wan ip shown on the server setting page never changes & i can't seem to connect on the static ip. Where can I change that Static IP, I have tried stoping & restarting the OpenVPN server, but the IP either shows as blank, or as the dynamic, i can't see to get the static one to show up.... Any Idea's?

Hi can you try these commands manually (These are the commands that displays the IP addresses.)

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

and

curl -s --max-time 15 --silent icanhazip.com

 /sbin/ip route | awk '/default/'

 /sbin/ip route | awk '/default/ { print $3 }'

 

What is your Network Settings on unRAID?

 

Link to comment

logged in this morning using the Dynamic IP (75.*.*.*) OpenVPN showed the Dynamic IP, ran the commands you noted, it came back with my Static IP (205.*.*.*), after running the command's, refreshing the Page it now shows the proper Static Wan IP.

 

I was also getting the following error in my syslog:

 

Nov 5 21:20:14 Poweredge kernel: TCP: request_sock_TCP: Possible SYN flooding on port 1194. Sending cookies. Check SNMP counters.

 

when I was having issues connecting last night, so I don't really know if the different wan IP showing in the openVPN page was really the problem.

It seems to be working for now, I'll monitor and see what happens.

Link to comment

logged in this morning using the Dynamic IP (75.*.*.*) OpenVPN showed the Dynamic IP, ran the commands you noted, it came back with my Static IP (205.*.*.*), after running the command's, refreshing the Page it now shows the proper Static Wan IP.

 

I was also getting the following error in my syslog:

 

Nov 5 21:20:14 Poweredge kernel: TCP: request_sock_TCP: Possible SYN flooding on port 1194. Sending cookies. Check SNMP counters.

 

when I was having issues connecting last night, so I don't really know if the different wan IP showing in the openVPN page was really the problem.

It seems to be working for now, I'll monitor and see what happens.

 

So an update on this, every couple days I get the same SYN flooding error in the syslog, at which point the OpenVPN plgin page becomes very slow, or unresponsive. Usually have to reboot the server to get any access. At which point openVPN plugin sometimes shows a wan IP, sometimes its blank.

Link to comment

Hi all,

 

I am using the OpenVPN client plugin on my Unraid 6.2.3 server.  I am testing out Emby Server and Plex and would like to be able to access them from the outside.  I have the firewall rules setup properly on my Sophos UTM (using that as my router) because i can get to Emby and plex when i have OpenVPN stopped.  How do i have the Emby and Plex traffic bypass OpenVPN but leave everything else going through the OpenVPN tunnel?  Please keep in mind i dont know to much about OpenVPN or how to do special routing, so if someone would be kind enough to walk me through it, it would be GREATLY appreciated!

 

Thanks!

 

NOTE:  using Docker for both Emby and Plex

Link to comment

I have a sweet little unRAID server for downloading movies and TV shows using Plex Media Server with PlexConnect to view on any of my 3 TV's via Apple TV boxes. A few months ago, TWC started sending me ugly emails about my downloading so I installed the OpenVPN client and have not heard from them since (Great Product, easy setup!!). However, I cannot view my media library on my Apple TV's like before but I can still use a Mac/PC. So my question is, What do I bypass? And How do I bypass? so that PlexConnect works?

Link to comment

I have a sweet little unRAID server for downloading movies and TV shows using Plex Media Server with PlexConnect to view on any of my 3 TV's via Apple TV boxes. A few months ago, TWC started sending me ugly emails about my downloading so I installed the OpenVPN client and have not heard from them since (Great Product, easy setup!!). However, I cannot view my media library on my Apple TV's like before but I can still use a Mac/PC. So my question is, What do I bypass? And How do I bypass? so that PlexConnect works?

Instead of VPN'ing the whole server, I'd recommend using binhex's VPN enabled download clients, there are several variants available.
Link to comment
  • 1 month later...

Greetings,

 

I just tried to install this plugin on Unraid v6.2.4 and it gave the following error:

 

Warning: file_put_contents(): Only 0 of 1 bytes written, possibly out of free disk space in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 297
plugin: unable to create file: /var/log/plugins/openvpnserver

 

The previous sections show to have completed correctly. Any ideas?

Link to comment

Hello,

 

I'm using sabnzbd and deluge.

How to be sure that the both softwares are covering by the vpn?

 

Thanks

Using this plugin? Dunno, I'm doing it the easy way, using Binhex's excellent VPN enabled dockers. He builds them with failsafes against accidental IP leakage, and as a bonus has privoxy baked in so you can use the same VPN tunnel to browse through if you want.

 

I wouldn't use this plugin to connect to a VPN service, it's meant for you to create a private tunnel to allow secure remote access for your own devices when you are away from home.

Link to comment

OpenVPN server plugin is updated with OpenVPN 2.4!

 

According to the new 2.4 I would recommend all to regenerate new server certs and client files!

The new features that are in OpenVPN 2.4 are not functional yet in some client application like iOS OpenVPN Connect

These new features are not enabled as default setting! However default settings is a recommended settings to get a very good security,  and of course your LAN is accessible with these settings.

 

More info about changes in Version 2.4 ....

https://github.com/OpenVPN/openvpn/blob/master/Changes.rst

https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn24

 

Windows client can be downloaded from --> https://openvpn.net/index.php/open-source/downloads.html

 

 

Plugin changes/updates

 

2016.12.31

 

Update of OpenVPN packages to 2.4.0 !

Updated list of selectable Encryption Ciphers.

The list have the new cipher AEAD (GCM) data channel cipher.

Update settings for compression. Now including the new LZ4 compression, which is slicker and faster.

Added OpenDNS to DHCP options.

Added a button to restart OpenVPN server.

Added tls-crypt feature. This will also encrypt the client (and server) certificates that usually contain information that can be traced back to a person and/or machine.

Small GUI updates.

Link to comment

Hi Peter,

 

I've searched the whole post but I wasn't able to find a solution. I think it is pretty obvious but I'm lost ;)

 

I've upgraded to Unraid 6.2.4 and have updated OpenVPN Client plugin accordingly. But it doesn't work.

Logs tell me that there is an error :

 

Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: config (2.4.0)
Use --help for more information.

 

and when I'v checked my configuration files, it seems that the plugin has changed it. The config file of my providers is initially made like this :

 

client
remote xx1.xxxxxx.net 443
dev tun
proto tcp
nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo
auth-user-pass

 

and it is updated like that after launching the plugin :

 

client
remote xx1.xxxxxx.net 443
proto tcp
dev tun5nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo


auth-user-pass /boot/config/plugins/openvpnclient/password.txt status /tmp/openvpn/openvpn-status.log

 

The line 4 seems to be incorrect. I've added a return after the tun5 and save it but it doesn't work.

 

Can you help me ?

 

Thank you for your help and for your continuing effort to maintain this plugin.

 

Have a nice day !

 

Guillaume

 

Link to comment

Hi Peter,

 

I've searched the whole post but I wasn't able to find a solution. I think it is pretty obvious but I'm lost ;)

 

I've upgraded to Unraid 6.2.4 and have updated OpenVPN Client plugin accordingly. But it doesn't work.

Logs tell me that there is an error :

 

Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: config (2.4.0)
Use --help for more information.

 

and when I'v checked my configuration files, it seems that the plugin has changed it. The config file of my providers is initially made like this :

 

client
remote xx1.xxxxxx.net 443
dev tun
proto tcp
nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo
auth-user-pass

 

and it is updated like that after launching the plugin :

 

client
remote xx1.xxxxxx.net 443
proto tcp
dev tun5nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo


auth-user-pass /boot/config/plugins/openvpnclient/password.txt status /tmp/openvpn/openvpn-status.log

 

The line 4 seems to be incorrect. I've added a return after the tun5 and save it but it doesn't work.

 

Can you help me ?

 

Thank you for your help and for your continuing effort to maintain this plugin.

 

Have a nice day !

 

Guillaume

Try new version!

 

the modified ovpn should looks like this. Don't know why you have this line dev tun5nobind ???

client
proto udp
dev tun5
remote sweden.privateinternetaccess.com 1197
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-256-cbc
auth sha256
tls-client
remote-cert-tls server
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.4096.pem
ca ca.rsa.4096.crt

auth-user-pass /boot/config/plugins/openvpnclient/password.txt

status /tmp/openvpn/openvpn-status.log

Link to comment

Hi!,

 

What I'm gonna ask is probably going to be really noob-y but I'm not exactly sure where to go to find the information (tried googling!).

 

I have the plugin for the client running and from what I can tell from the logs it is correctly connecting to my VPN provider. On the settings page it says it's connected, it gives me a WAN IP that's different from my ISP's provided one and the Interface column shows "tun5". Also, if I run the Speedtest.net plugin from unRAID it matches me with a Miami based server that says it's something like 10 miles away... I'm more than 9 hours flight time from Miami in South America so that's another good sign haha.

 

What I don't know is... is there a way to route all the traffic coming from a specific docker or VM through the VPN tunnel?. I have it set to 'Route specific IPs' and filled in a couple IPs in the 'webaddress.txt' file but don't know if that's doing anything haha.

 

Basically what I'd like to do is to route all sabnzbd, Deluge and an IRC client (all 3 of them separate dockers) traffic through the VPN tunnel then maybe a VM too. The reason I'm trying to do it this way is because my current VPN provider only allows 1 connected device at any single time.

 

Is that doable?. Thanks :D.

Link to comment

Hi Peter,

 

I've searched the whole post but I wasn't able to find a solution. I think it is pretty obvious but I'm lost ;)

 

I've upgraded to Unraid 6.2.4 and have updated OpenVPN Client plugin accordingly. But it doesn't work.

Logs tell me that there is an error :

 

Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: config (2.4.0)
Use --help for more information.

 

and when I'v checked my configuration files, it seems that the plugin has changed it. The config file of my providers is initially made like this :

 

client
remote xx1.xxxxxx.net 443
dev tun
proto tcp
nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo
auth-user-pass

 

and it is updated like that after launching the plugin :

 

client
remote xx1.xxxxxx.net 443
proto tcp
dev tun5nobind
persist-key
persist-tun
tls-auth ta.key 1
ca ca.crt
cipher AES-256-CBC
keysize 256
link-mtu 1560
comp-lzo


auth-user-pass /boot/config/plugins/openvpnclient/password.txt status /tmp/openvpn/openvpn-status.log

 

The line 4 seems to be incorrect. I've added a return after the tun5 and save it but it doesn't work.

 

Can you help me ?

 

Thank you for your help and for your continuing effort to maintain this plugin.

 

Have a nice day !

 

Guillaume

Try new version!

 

the modified ovpn should looks like this. Don't know why you have this line dev tun5nobind ???

client
proto udp
dev tun5
remote sweden.privateinternetaccess.com 1197
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-256-cbc
auth sha256
tls-client
remote-cert-tls server
comp-lzo
verb 1
reneg-sec 0
crl-verify crl.rsa.4096.pem
ca ca.rsa.4096.crt

auth-user-pass /boot/config/plugins/openvpnclient/password.txt

status /tmp/openvpn/openvpn-status.log

 

Perfect ! It works now thanks to the update from ver. 2016.12.31 to 2016.12.31a

 

Thanks for your help.

 

Have a nice day,

 

Guillaume

Link to comment

Hello I just updated to the newest release and also updated config files. Everything seems to be running fine but after checking the logs it shows errors. Should I be concerned?

 

 

 

Tue Jan  3 21:07:25 2017 WARNING: file 'ta.key' is group or others accessible

Tue Jan  3 21:07:25 2017 WARNING: file '/boot/config/plugins/openvpnclient/password.txt' is group or others accessible

Tue Jan  3 21:07:25 2017 OpenVPN 2.4.0 x86_64-slackware-linux-gnu [sSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Dec 29 2016

Tue Jan  3 21:07:25 2017 library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09

Tue Jan  3 21:07:25 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]

Tue Jan  3 21:07:25 2017 UDP link local: (not bound)

Tue Jan  3 21:07:25 2017 UDP link remote: [AF_INET]

Tue Jan  3 21:07:25 2017 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]

Tue Jan  3 21:07:27 2017 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]

Tue Jan  3 21:07:31 2017 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]

Link to comment

I have a sweet little unRAID server for downloading movies and TV shows using Plex Media Server with PlexConnect to view on any of my 3 TV's via Apple TV boxes. A few months ago, TWC started sending me ugly emails about my downloading so I installed the OpenVPN client and have not heard from them since (Great Product, easy setup!!). However, I cannot view my media library on my Apple TV's like before but I can still use a Mac/PC. So my question is, What do I bypass? And How do I bypass? so that PlexConnect works?

Instead of VPN'ing the whole server, I'd recommend using binhex's VPN enabled download clients, there are several variants available.

 

I installed the Deluge and SABnzbd VPN enabled docker applications and they work well. Thanks.

Link to comment

I have been using your server plugin successfully for several years to access my server remotely.  Today, I want to have my unRaid to be a client to another network where a vpn exists for the purpose of doing remote backups.  I control both ends of this connection.  OpenVPN server is running on unRaid and I want to run OpenVPN client via script for a few minutes to kick off the backupl

 

I already have the remote backups running via rsync ssh, but now I want to take it to the next level whereby my local backup script fires off an IPMI wakeup call to the remote server over the VPN.  So all I need is for a VPN to be created briefly where unRaid can see the other network like this.

 

# Start the VPN tunnel to the network where my backup server is and where a raspberry pi is running an OpenVPN server 24/7
openvpn --config load_my_opvn_file
# Now that the network is accessible use IPMI to start the backup server at the remote location
ipmitool -I lan -H 192.168.1.95 -U ADMIN -P ADMIN chassis power on
# Wait for unRaid to boot remotely and check that it is up
sleep 180
# Check if the remote backup server is up and working
# If everything is good, close the VPN connection and continue the backup by SSH
# Once the backup has completed successfully via IPMI tell the remote backup server to gracefully shut down.
ipmitool -I lan -H 192.168.1.95 -U ADMIN -P ADMIN chassis power soft

 

Does this seem to be a reasonable way to use this?  (I know this is different than the way most of you are using the client.)

 

I installed the client VPN on unRaid 6.2.4, and then attempted to use the following command to test;

 

 openvpn --config /boot/openvpn/karli.ovpn
Mon Jan  9 11:11:54 2017 OpenVPN 2.4.0 x86_64-slackware-linux-gnu [sSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Dec 29 2016
Mon Jan  9 11:11:54 2017 library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09
Mon Jan  9 11:11:54 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]23.127.yyy.xxx:1197
Mon Jan  9 11:11:54 2017 UDP link local: (not bound)
Mon Jan  9 11:11:54 2017 UDP link remote: [AF_INET]23.127.yyy.xxx:1197
Mon Jan  9 11:11:55 2017 [server] Peer Connection Initiated with [AF_INET]23.127.yyy.xxx:1197
Mon Jan  9 11:11:56 2017 TUN/TAP device tun1 opened
Mon Jan  9 11:11:56 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Mon Jan  9 11:11:56 2017 /usr/sbin/ip link set dev tun1 up mtu 1500
Mon Jan  9 11:11:56 2017 /usr/sbin/ip addr add dev tun1 10.8.0.2/24 broadcast 10.8.0.255
RTNETLINK answers: File exists
Mon Jan  9 11:11:56 2017 ERROR: Linux route add command failed: external program exited with error status: 2
RTNETLINK answers: File exists
Mon Jan  9 11:11:56 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Mon Jan  9 11:11:56 2017 Initialization Sequence Completed

^CMon Jan  9 11:29:58 2017 event_wait : Interrupted system call (code=4)
Mon Jan  9 11:29:58 2017 /usr/sbin/ip addr del dev tun1 10.8.0.2/24
Mon Jan  9 11:29:58 2017 SIGINT[hard,] received, process exiting

 

After sitting locked up for 20 minutes, I cancelled by hitting Ctrl C.  I know this .ovpn file is good as I can use it via the Windows client to get access to that network.

 

What am I doing wrong?

Link to comment

Hi,

 

"Initialization Sequence Completed" indicate that all went OK, and the process are running. and you stopped the connection with "ctrl +c"

If you like to see the prompt after connection you need to add a & at the end of your command, like this

 

openvpn --config /boot/openvpn/karli.ovpn &

 

You can then check if the process are running with this command.

 ps -ef | grep openvpn

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...