# OpenVPN client access, possible?

**URL:** <https://forums.plex.tv/t/openvpn-client-access-possible/66728>\
**Category:** Apps & Creations\
**Created:** [May 19, 2014, 8:39am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728 "2014-05-19T08:39:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 8:39am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/1 "2014-05-19T08:39:18Z")

</div>

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?

&nbsp;

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](https://openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html)

&nbsp;

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

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [May 19, 2014, 10:10am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/2 "2014-05-19T10:10:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 10:20am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/3 "2014-05-19T10:20:24Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 12:04pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/4 "2014-05-19T12:04:01Z")

</div>

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:&nbsp;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&nbsp;disappear when I reboot the rasplex.  
Ofc, I did allow the user to auto-login to the openvpn server.

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [May 19, 2014, 12:07pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/5 "2014-05-19T12:07:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 12:16pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/6 "2014-05-19T12:16:05Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 12:26pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/7 "2014-05-19T12:26:23Z")

</div>

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.  
&nbsp;

```
#! /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.

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [May 19, 2014, 12:45pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/8 "2014-05-19T12:45:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [May 19, 2014, 3:28pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/9 "2014-05-19T15:28:13Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [June 10, 2014, 9:37am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/10 "2014-06-10T09:37:45Z")

</div>

Keeping my fingers crossed you’re still watching this thread!  
  
  
I’ve managed to get this working 😃 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

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [June 10, 2014, 10:09am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/11 "2014-06-10T10:09:10Z")

</div>

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 😃   
  
  
Sent from my Nexus 5 using Tapatalk

---

<div class="post-metadata">

**Author:** ![Snurre2010](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Snurre2010](https://forums.plex.tv/u/Snurre2010)\
**Post date:** [June 12, 2014, 8:37pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/12 "2014-06-12T20:37:15Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![rdurdle](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rdurdle/32/122873_2.png) [@rdurdle](https://forums.plex.tv/u/rdurdle)\
**Post date:** [May 29, 2015, 4:34am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/13 "2015-05-29T04:34:24Z")

</div>

I'm using 6.0, they pulled vpn support?

[https://github.com/RasPlex/RasPlex/issues/373](https://github.com/RasPlex/RasPlex/issues/373)

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [May 29, 2015, 4:55am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/14 "2015-05-29T04:55:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Treebeard\_44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/treebeard_44/32/5563_2.png) [@Treebeard\_44](https://forums.plex.tv/u/Treebeard_44)\
**Post date:** [May 29, 2015, 1:55pm UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/15 "2015-05-29T13:55:43Z")

</div>

> I'm using 6.0, they pulled vpn support?  
>   
> [https://github.com/RasPlex/RasPlex/issues/373](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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 2:08am UTC](https://forums.plex.tv/t/openvpn-client-access-possible/66728/16 "2019-12-21T02:08:10Z")

</div>

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