OpenVPN client access, possible?

Hi,
I have OpenVPN access server installed on my server and I wonder if it's possible to make rasplex to login on my VPN network?

 

here is the linux client:

https://openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html

 

It should bee great if Rasplex automatic logins on the VPN network when you start the Raspberry Pi.

Would love to see this implemented. There have been questions about whether a RPI would be up to the task - I can’t comment as I’ve not tried it and don’t have one

Would love to see this implemented. There have been questions about whether a RPI would be up to the task - I can't comment as I've not tried it and don't have one

Sent from my Nexus 5 using Tapatalk

I don't see why the RPI should not handle it?
It's like joining a ordinary network.

I did find under Rasplex settings, VPN - I'll play around with it and see if I can join my VPN connection.

Okej guys!
I'm currently on the right track, what I have done is that I have downloaded the client.ovpn file and transferred it to the Downloads folder with Samba on my Rasplex.
Then in terminal I did write: openvpn --config client.ovpn

And it do work, now I only need to make sure that it do "write" that when I boot the rasplex as this do disappear when I reboot the rasplex.
Ofc, I did allow the user to auto-login to the openvpn server.

Have you actually been able to play media whilst connected via VPN? If so, I might have to get myself RPi!! :slight_smile:


Sent from my Nexus 5 using Tapatalk

Have you actually been able to play media whilst connected via VPN? If so, I might have to get myself RPi!! :-)

Sent from my Nexus 5 using Tapatalk

Yes I have, I did put my openvpn server to only route the internaltrafik from my Plex media server.

The issue I have now is that when I drop the command in Autostart.sh the boot halt's after loading the vpn config.

What I have got working is to manually activate it trough ssh, but I guess that I'll figure it out how to autostart in the background.

Okej, Now I got everything working!
After upgrading the Rasplex I think that you need to do this all over again, but only maybe don't know as the have not rlsed RC4 yet.


1. Install OpenVPN connect. ( on your server! )

2. Create a user in OpenVPN that you allow auto-login.

3. Download the client.opvn file from the server.

4. Move the client.opvn file to the Rasplex, I did use Samba but I guess that it should work with SSH also. I did move it to the download directory in the home folder. ( You need to activate Samba on your Rasplex )

5. Login with SSH to the Rasplex, username root and password rasplex .

6. Create a script-file that activate the OpenVPN profile when Rasplex start's. You do that with the command:

nano ~/vpn.sh 

Write the following in the script-file, when your done press ctrl+x then Y to save the file.
 

#! /bin/bash
#
openvpn --config ~/downloads/client.ovpn

7. Now we need to make it possible to auto-start so then we need to add the following line to Autostart.sh, and to do so write the command.

nano /storage/.config/autostart.sh

Add the following in the autostart.sh-file, when your done press ctrl+x then Y to save the file.

bash ~/vpn.sh &

8. Now just write reboot and press enter.

All done!


P.S I recommend that you in the server config the user so it do not rout all the internet traffic trough the VPN.

Okay I’m biting… I’ll be placing an order for a RPi this afternoon!! Thanks for working out how to accomplish this and sharing with the community :slight_smile:


Sent from my Nexus 5 using Tapatalk

Okay I'm biting... I'll be placing an order for a RPi this afternoon!! Thanks for working out how to accomplish this and sharing with the community :-)

Sent from my Nexus 5 using Tapatalk

No problem, if you have any kind of issues just write here and I'll help you.
I have my plexserver now running only inside the VPN and to get access to it my clients need to connect trough the VPN.

Keeping my fingers crossed you’re still watching this thread!


I’ve managed to get this working :smiley: however it only works if I execute it from SSH, the autostart part doesn’t seem to work - any ideas on that?


Sent from my Nexus 5 using Tapatalk

Got there in the end with a bit of trial and error!


Needed to put all the key and cert files in the same directory as the vpn.sh (I put everything in ‘~/downloads/’ )


I then had to add the following to autostart.sh


‘#! /bin/bash

cd /storage/downloads

bash vpn.sh &’


For some reason it seemed to error out if I did it exactly as you mentioned above - no idea why, but hey… It works!


Thanks for giving me the starting point and proving this configuration works…! Hopefully this will be helpful to others too :smiley:


Sent from my Nexus 5 using Tapatalk

Got there in the end with a bit of trial and error!

Needed to put all the key and cert files in the same directory as the vpn.sh (I put everything in '~/downloads/' )

I then had to add the following to autostart.sh

'#! /bin/bash
cd /storage/downloads
bash vpn.sh &'

For some reason it seemed to error out if I did it exactly as you mentioned above - no idea why, but hey... It works!

Thanks for giving me the starting point and proving this configuration works..! Hopefully this will be helpful to others too :-D

Sent from my Nexus 5 using Tapatalk

Hi,
Sorry for the late answer, I don't know have are you running RC3 or RC4?
For me, the auto-start works on RC3.
I have not updated to RC4 yet, 'll do that next week if I have the time.

I'm using 6.0, they pulled vpn support?

https://github.com/RasPlex/RasPlex/issues/373

Really disappointed to see this…


I see for openelec they’ve got openvpn available through a repo.


Does anyone know how to manually install the openvpn binary in Rasplex 6.0?

I'm using 6.0, they pulled vpn support?

https://github.com/RasPlex/RasPlex/issues/373


I made a post on GitHub and one of the devs has kindly said he will consider whether OpenVPN support can be salvaged. Keeping my fingers crossed! :)

If there was support for it previously then perhaps we could salvage that
work at a minimal development cost.

I do like the idea of using rasplex on the go like this



Sent from my iPhone using Tapatalk

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.