Surfshark connection using OpenVPN gives no playback

Hi. I’d like to use my Surfshark VPN. I can make the connection using OpenVPN on the latest Volumio OS on a 2Gb RasPi 4B. Without the VPN the system works great. I use it solely for Spotify and the music plays and everything is awesome.
When I connect to the VPN I can SSH to the system and load the Web interface without issue. However when I press the play button to resume playback the track doesn’t play and the time counter of the song stays still.
Is there a way to use a VPN with Volumio OS please. I like to keep all my systems on VPN and Surfshark is one account for as many devices as you like.
If a different way to create a VPN connection (not using OpenVPN) thar will work then I’d love to hear it please. Happy to give the output of routing and IP addresses etc. I have not configured the local firewall in any way either.
Thanks
ActionParsnip

Wouldn’t it be easier then to setup your router to route all traffic via the VPN instead of individually setting up each system?

Not a bad idea. Will investigate but is what I’m proposing not possible? Is there a hostname or IP the the Spotify client needs to be able to hit to get the audio etc please?

If you have setup your interfaces correctly, it technically shouldn’t matter. But then again your pretty much out in the deep end by yourself when it comes to messing with networking stuff with Volumio.
maybe start with what you have done, and how you have set things up, and look at your logs for some hints on what is going wrong…

If I setup a proxy and use bash variables to set the http and https proxy, will volumio honour these please?

Not sure, you would have to try :slight_smile:
Spotify Connect (using Vollbrespot) will not work…

What Spotify implementation are you using? VolSpotConnect2?
Because if you don’t use SPOP, your phone needs to be able to scan the local network (probably the VPN subnet you’ve configured) to see the client and I presume it will need internet breakout as well (this counts for both the client and your phone).

Spotify (internet) <-> your Spotify client <-> local network scan for device connection option <-> Volumio instance <-> Spotify for playback (internet)

If you use SPOP (the other Spotify implementation), the Volumio instance should just be able to call out to the internet for playback purposes.

The problem could be that your Spotify instance just uses its interfaces’ local network for scanning, and not the tunnel (VPN).

In other news, some googling led me to this answer: No VPN support: Why? - The Spotify Community
And this answer (same, but newer): App not working with VPN - The Spotify Community

In short, Spotify and VPN is not a happy marriage. However… in 2021 I’m not buying this… it should be possible, try turning all protection in the VPN tunnel off for testing purposes on a test machine in a test network! :wink:

Its the Volumio OS on a Raspberry Pi 4b 2Gb. The Spotify instance is the plugin to Volumio which has a premium family account set and should call down the VPN to get the audio for playback. I’m accessing it just fine using the web UI and this works fine.
Will check the links. Really appreciate it. Will let you know how this goes and maybe make a guide :slight_smile:

If I set up a squid proxy on the LAN and point to that then VPN on the other side, is that possible? I can’t see a proxy setting in Volumio but I can set BASH variables. Will volumio follow this please?

Bit of an update. I have ncspot running on Raspian using OpenVPN. It seems to be DNS. I switched from my ISP DNS to Google and it plays OK.
Will test tonight with Volumio

Yep. DNS. I’ve a script to echo over /etc/resolv.conf after the tunnel is brought up. All fine. Will mark as solved. Hopefully this helps others

Hi,

Looks like You’ve managed to set up a VPN on Volumio system - congratulations!

Trying to do something similar: attaching my NAS (Synology DS213) nfs (have read that it is a better option than cifs?) share as a source to the Volumio. The problem lies in the fact, that the NAS is in a different location and network (attached to a fiber-optic modem/router), while I’m using my mobile phone (SM-N9005) as a wireless hotspot for my PC and Raspberry Pi Zero W (with HiFiBerry DAC+). NAS has a configured OpenVPN server that I access via full-tunel VPN using my phone or PC, but not both at the same time, because it turns out that Android (without root’ing and adding some IPtable rules in a script android.stackexchange.com/questions/60819/can-i-share-my-androids-vpn-connection-over-a-hotspot {at the moment actually I am using a rooted phone with a custom ROM, but don’t think it will last - not really an option…}) does not allow VPN tethering… So need to set up an OpenVPN client on Volumio!

I’m not very experienced in Linux, using SSH, or writing scripts, so no way I can figure it out by myself! Would really appreciate some help - a tutorial…

PS. Also not very experienced in forums (used to searching and reading only), so please excuse me, if not appropriate!

Best regards!

I installed openvpn using SSH then grabbed the connection files as stated by this guide

I then chose one I liked and set a credentials file in the ovpn file I liked.

I can now connect with the below command:

/usr/bin/nohup /usr/bin/sudo /usr/sbin/openvpn /etc/openvpn/us-atl.prod.surfshark.com_tcp.ovpn &

You may need to set a different DNS as your LAN DNS may not be contactable so I use Google DNS to work around it. You can set this with the below command:

echo “nameserver 8.8.8.8” | sudo tee /etc/resolv.conf > /dev/null

WFM

Thanks for the info!
Wanted to reply sooner, but couldn’t… still haven’t succeeded in getting Volumio to play… but not because of VPN - making RPiZw work as OpenVPN client turned out not to be that difficult - problems lay elsewhere (my lack of knowledge in Linux and scripting; how Volumio updates and rescans its music database; Volumios NFS support; RPiZw combination with HiFiBerry DAC)…
Want RPiZw to continuously search for my mobile hotspot and when it succeeds, to automatically make a VPN connection to the music server and retain the music library after it loses connection…
Still determined to continue trying - will see how it goes…

PS. Was very close, in making playback, but got “Failed to open “alsa”” - most likely due to an issue with HiFiBerry DAC - needed a reboot, that resulted in NFS share fail and “/usr/bin/mpc update error: No database”…

He, he - succeeded (without addressing any of those issues…)! Will see how reliable this is! ;D
PS. If this pans out good - maybe will make a post with a tutorial…