Remote connection via VPN - [Resolved] but ongoing discussion


Thanks for that. I tried it and no difference - I don’t see anything particularly different in your server.conf. Maybe it’s because my openVpn and Roon core are on a mac, not linux. Something at the OS level.

(Johan N) #103

There are settings in the OS, other than the ones in server.conf, needed to get openvpn to work.
Does OpenVPN work for other applications?


Yes my OpenVPN setup works perfectly for all other apps/use cases - full routing of internet, access to other servers behind the vpn, etc. I have also successfully set up an L2TP VPN using MacOS Server VPN, and the L2TP vpn built in to the Synology router. They all work well except for Roon!

My next step is to monitor the TCP/UDP connections being attempted by Roon. The first thing I have noticed is that the Roon remote client appears to be sending discovery UDP packets to port 9003 on all other servers that it can “see” locally - it must be pulling a list though some kernel level call. This is where the first failure is … getting the server with openVPN/Roon core to be advertised properly on the network.

(Robert Sink) #105

I just tried with 1.5 core and remote. Still no connection via OpenVPN.

(Johan N) #106

Still works for me.

(BryanA) #107

Well, I have all Cisco equipment so it’s possible with standard networking and firewall gear from Cisco.

(Johan N) #108

Did you really mean to reply to that post?

(BryanA) #109

I was replying your post where you said:

Just in case it wasn’t clear, Robert was the one who came up with running the OpenVPN server in the same server as where Roon Core runs. So he should get all credits for it.

I just wanted those who use other equipment to know they can do this as well, they don’t need to use OpenVPN – that’s all.

(BryanA) #110

I’d also add that I’ve discovered there are some issues with doing this and that Roon doesn’t handle network hiccups very well. Here’s quick list of issues I’ve run into once I got it working:

1 - if the connection starts to drop packets because it can’t keep up with a 16/44 bitstream then Roon will freak out and start skipping down the playlist and jump over 20-30 songs at once and start playing something way down your queue, or go to radio.
2 - If you “punt” and make a backup copy of your DB and your music collection and take them with you to a vacation home where there’s a slow Internet connection AND had Tidal integrated into Roon, it doesn’t have a setting for Tidal’s quality. So Tidal will want to stream 16/44 and that just doesn’t work (same reason why I had to “punt” in the first place). So there are no Tidal streaming quality settings in Roon. You’ll have to use the Tidal app but that screws up all your playlists if they have any Tidal songs in them on Roon.

Roon could solve a lot of these issues by simply buffering the datastream on the client better but perhaps the “Real Time” part is too important for them. RAAT is only good enough for a wired network IMO – insufficient fault tolerance. And I’m a Network Engineer for several decades so I do have experience in this area.

(Johan N) #111

Of course you can use other VPN protocols then VPN although it has little to do with my credits to Robert. :slight_smile:

(Robert Sink) #112

In the event I wasn’t clear before, the streaming still works via the OpenVPN solution I highlighted above, however, while I can stream audio to the remote iPhone, the iPhone app itself while playing music just displays “Looking for your Roon Core.”

This feels like some kind of confusion within the app/Core not knowing how to deal with multiple interfaces or IP addresses.

In my spare time I’ve played with several masquerade scenarios to no avail, but the thing that proves to be the most finicky (streaming) works, while simple app control does not.

Maybe this info will help someone.

(Johan N) #113

Lately, I’ve had the same problems.
Sometimes it helps restarting the app, but most of the times it doesn’t. Other times it helps starting it with VPN while st home and in my WLAN. All in all it’s unfortunately not usable any more. :frowning:

I can’t pinpoint it to new the new Roon release, OpenVPN in my iDevice, OpenVPN server, iOS, or OS in Roon Core and OpenVPN server, at least not yet.

(Robert Sink) #114

Same here. If I first connect my iOS Roon client via wifi, then break the wifi connection, go over OpenVPN, I can get control AND music streaming.

This feels very much like an app-side issue to me.

(Johan N) #115

It’s working for me but there was a router firmware upgrade and I changed some LAN IPTV settings in my router in between. I’ve not confirmed whether the IPTV settings makes a difference or not.

In my ASUS RT-AC88U I enabled IGMP proxy and IGMP Snooping in the Advanced Settings -> LAN IPTV.
Might be worth a try.

(Robert Sink) #116

No dice here, even with IGMP snooping and proxy enabled. Looking at RoonServer.txt, it sees the iPhone, communicates with it, the iPhone reports in its capabilities, and I can even stream music TO the phone if I select the iPhone’s zone from another Roon UI and play music to the device.

The only thing I can’t get is control of the music from the app, which just sits there and spins. Please Roon take a look at this, would you?

(Robert Sink) #117

So, while my iPhone, connected via OpenVPN is sitting on this screen:

I can go to another remote, configure this iPhone, and even stream music to it, stopping, starting, and fast-forwarding songs.

Here is what the RoonServer.txt say during some of this:

06/22 01:44:52 Trace: [zone IFiZzoneX] PlayPause
06/22 01:44:52 Trace: [zone IFiZzoneX] Unpause
06/22 01:44:52 Trace: [zone IFiZzoneX] Selecting Source state=Paused
06/22 01:44:52 Trace: [zone IFiZzoneX] Unsuspend
06/22 01:44:52 Info: [IFiZzoneX] [zoneplayer] Playing: /backups/NuteBranks/Garbage-Version 2.0 -01.flac
06/22 01:44:53 Trace: [prebuffer] ready 149940/441000 (34%) @ 0/276 sec
06/22 01:44:53 Info: [IFiZzoneX] [zoneplayer]     Open Result (Playing):Result[Status=Success]
06/22 01:44:53 Info: [IFiZzoneX] [zoneplayer] Performing initial seek to 10000
06/22 01:44:53 Info: SEEK MS 10000
06/22 01:44:53 Info: [IFiZzoneX] [zoneplayer] Starting playback
06/22 01:44:53 Trace: [IFiZzoneX] [raatclient] SENT [9]{"request":"refresh_supported_formats"}
06/22 01:44:53 Info: [zone IFiZzoneX] OnPlayFeedback Playing
06/22 01:44:53 Debug: Lastfm 'KWDIXUmNsZpNJ2g-zoPmcErrevbI9pgg' START: Garbage - Temptation Waits
06/22 01:44:53 Trace: [IFiZzoneX] [Inactive] [PLAYING @ 0:10/4:36] Temptation Waits - Garbage
06/22 01:44:53 Trace: [musicpowerstate] music is playing, preventing idle sleep
06/22 01:44:53 Trace: [prebuffer] ready 149940/441000 (34%) @ 10/276 sec
06/22 01:44:53 Info: [IFiZzoneX] [zoneplayer] Queueing: /backups/NuteBranks/Garbage-Version 2.0 -02.flac
06/22 01:44:53 Info: [IFiZzoneX] [zoneplayer] Open result (Queueing): Result[Status=Success]
06/22 01:44:53 Trace: [prebuffer] ready 149940/441000 (34%) @ 0/218 sec
06/22 01:44:53 Trace: [IFiZzoneX] [raatclient] GOT [9] {"status":"Changed","supported_formats":"48000/16/2,48000/24/2"}
06/22 01:44:54 Trace: [IFiZzoneX] [zoneplayer/raat] StartStream Sooloos.Broker.Transport.RaatZonePlayer+Endpoint: StreamFormat(channels=2, bitspersample=16, samplerate=44100, isdts=False) => StreamFormat(channels=2, bitspersample=24, samplerate=48000, isdts=False) streamid=401303439
06/22 01:44:54 Trace: [IFiZzoneX] [raatclient] SENT [12]{"request":"setup","format":{"sample_type":"pcm","sample_rate":48000,"bits_per_sample":24,"channels":2,"sample_subtype":"none"}}
06/22 01:44:54 Trace: [roonapi] [apiclient] CONTINUE Changed {"message":"Extension Repository loaded","is_error":false}
06/22 01:44:54 Trace: [IFiZzoneX] [raatclient] GOT [12] {"status":"OutputMessage","message":{"signal_path":[{"method":"coreaudio_ios","quality":"lossless","type":"output","sub_type":"speakers"}]}}
06/22 01:44:54 Trace: [IFiZzoneX] [raatclient] GOT [12] {"audio_port":0,"audio_port_tcp":49183,"status":"Success","clock_port":61928}
06/22 01:44:54 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Idle => Prepared
06/22 01:44:54 Trace: [IFiZzoneX] [zoneplayer/raat] pausing for 0.05s for server-side resync delay
06/22 01:44:54 Trace: [IFiZzoneX] [zoneplayer/raat] synced to endpoint IFiZzoneX clock: realtime=225325459 rtt=26500us offset=-59211674us delta=-59211674us
06/22 01:44:54 Trace: [IFiZzoneX] [raatclient] SENT [13]{"request":"stream","stream_id":401303439,"first_seq":-1,"nak_port":-1,"buffer_size":10,"ready_threshold":0.2}
06/22 01:44:55 Info:
--[ SignalPath ]---------------------------------------------
SignalPath Quality = HighQuality
    Source Format=Flac 44100/16/2 BitRate=1021 Quality=Lossless
    UpgradeBitDepth FromBitsPerSample=16 ToBitsPerSample=64 Quality=Lossless
    SampleRateConversion FromSampleRate=44100 ToSampleRate=48000 Algorithm=HighQuality Quality=HighQuality
    Truncate FromBitsPerSample=64 ToBitsPerSample=24 Quality=Lossless
    Raat Device=IFiZzoneX
    Output OutputType=Local_CoreAudio_iOS Quality=Lossless SubType=speakers Model=IFiZzoneX
06/22 01:44:55 Trace: [IFiZzoneX] [raatclient] GOT [13] {"status":"Buffering"}
06/22 01:44:55 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Prepared => Buffering
06/22 01:44:55 Trace: [IFiZzoneX] [zoneplayer/raat] [zoneplayer/raat] selected IFiZzoneX as clock master
06/22 01:44:55 Debug: [raat/tcpaudiosource] connecting to
06/22 01:44:55 Debug: [raat/tcpaudiosource] connected
06/22 01:44:56 Trace: [IFiZzoneX] [raatclient] GOT [13] {"status":"Ready"}
06/22 01:44:56 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Buffering => Ready
06/22 01:44:56 Trace: [IFiZzoneX] [zoneplayer/raat] wait for ready in 663ms
06/22 01:44:56 Trace: [IFiZzoneX] [zoneplayer/raat] Doing 'ASAP' Start since we are just playing to one device
06/22 01:44:56 Trace: [IFiZzoneX] [raatclient] SENT [14]{"request":"start","min_offset":50000000,"stream_sample":0}
06/22 01:44:56 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Ready => Playing
06/22 01:44:56 Trace: [IFiZzoneX] [raatclient] GOT [13] {"status":"Playing"}
06/22 01:44:56 Trace: [IFiZzoneX] [raatclient] GOT [14] {"status":"Success","time":1725544250}
06/22 01:44:57 Info: [stats] 1500mb Virtual, 416mb Physical, 115mb Managed, 0 Handles, 64 Threads
06/22 01:44:59 Trace: [IFiZzoneX] [HighQuality 57.4x, 16/44 FLAC => 24/48] [100% buf] [PLAYING @ 0:12/4:36] Temptation Waits - Garbage
06/22 01:45:03 Trace: [zone IFiZzoneX] PlayPause
06/22 01:45:03 Trace: [zone IFiZzoneX] Pause
06/22 01:45:03 Trace: [IFiZzoneX] [zoneplayer/raat] Pausing at streamtime_ns 7427328375 now_ns 9152872625
06/22 01:45:03 Trace: [IFiZzoneX] [raatclient] SENT [22]{"request":"stop"}
06/22 01:45:03 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Playing => Paused
06/22 01:45:03 Info: [zone IFiZzoneX] OnPlayFeedback Paused
06/22 01:45:03 Trace: [IFiZzoneX] [HighQuality, 16/44 FLAC => 24/48] [100% buf] [PAUSED @ 0:17/4:36] Temptation Waits - Garbage
06/22 01:45:04 Trace: [IFiZzoneX] [raatclient] GOT [13] {"status":"Stopped"}
06/22 01:45:04 Trace: [IFiZzoneX] [raatclient] GOT [22] {"status":"Success"}
06/22 01:45:08 Trace: [zone] no playback for 5s, suspending to release audio device
06/22 01:45:08 Trace: [zone IFiZzoneX] Suspend
06/22 01:45:08 Trace: [zone IFiZzoneX] Stop
06/22 01:45:08 Info: [zone IFiZzoneX] OnPlayFeedback Stopped
06/22 01:45:08 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Paused => Prepared
06/22 01:45:08 Trace: [IFiZzoneX] [raatclient] SENT [24]{"request":"end_stream"}
06/22 01:45:08 Info: [audio/env] [zoneplayer] All streams were disposed
06/22 01:45:08 Info: [audio/env] [zoneplayer -> stream] All streams were disposed
06/22 01:45:08 Info: [audio/env] [zoneplayer -> stream -> endpoint] All streams were disposed
06/22 01:45:08 Trace: [IFiZzoneX] [raatclient] SENT [25]{"request":"teardown"}
06/22 01:45:08 Trace: [IFiZzoneX] [zoneplayer/raat] Endpoint IFiZzoneX State Changed: Prepared => Idle
06/22 01:45:08 Debug: [raat/tcpaudiosource] disconnecting
06/22 01:45:08 Info: sleep 28ms after flush
06/22 01:45:09 Trace: [IFiZzoneX] [raatclient] GOT [13] {"status":"Ended"}
06/22 01:45:09 Trace: [IFiZzoneX] [raatclient] GOT [24] {"status":"Success"}
06/22 01:45:09 Trace: [IFiZzoneX] [raatclient] GOT [12] {"status":"Teardown"}
06/22 01:45:12 Info: [stats] 1500mb Virtual, 416mb Physical, 115mb Managed, 0 Handles, 62 Threads
06/22 01:45:27 Info: [stats] 1500mb Virtual, 417mb Physical, 115mb Managed, 0 Handles, 56 Threads
06/22 01:45:42 Info: [stats] 1500mb Virtual, 417mb Physical, 115mb Managed, 0 Handles, 56 Threads

Any help on this would be tremendously appreciated from the Roon team. In my estimation, the hardest thing works: the streaming of music; I just want to be able to control the music from the phone, too.

(Robert Sink) #118

I had an interesting revelation while playing around with this yesterday. If I restart the OpenVPN server after RoonServer has completely initialized, when I connect my iPhone via OpenVPN over LTE, then the Roon iOS app works as expected, as if I were on my home’s wifi, directly adjacent to the Linux box RoonServer is running on.

I don’t have time to delve deeper, but hopefully this will prove helpful at some point.

(Adam Goodfellow) #119

For many of us this problem would go away if there was a setting in Roon clients to simply enter an IP address for use when it cant find a core quickly.

Many apps that rely upon SSDP or other broadcast/multicast discovery mechanics have this as a fallback.

For many of us running Roon server on a NAS, the NAS is probably on a fixed IP address on our home LAN anyway, probably via a fixed address allocation in our router’s DHCP.

With apps that use harmony for eg, it is quite common to cache to last discovered IP address of the hub to allow for quick startup and then fallback to discovery in the case of no adequate response from the quick-start ip address.

(Matthew Fioravante) #120

I’ve been able to get roon working using OpenVPN in TAP mode. The OpenVPN server is pfsense, client is Windows 10. It’s been a few weeks and it works great. I can listen to music all day at work using roon.

Sometimes I’ve gotten the “Audio file is playing slowly” error, but that’s due to internet connection speeds not the VPN. I fallback to plex in that case. This only happened once.

People mentioned turning on IGMP proxy. You don’t need this in TAP mode. I also disabled LZO compression entirely, as flac’s and mp3’s are already compressed.

(Charles Snider) #121

I am able to get my Android phone to connect to my Roon Core at home over
a OpenVPN-AS server connection. It takes a minute or so for the Roon app to “find” my Roon core (which btw is on the same machine as the OpenVPN-AS server). But performance is good, no break ups, but I do have a STRONG wifi connection. Not 100% reliable though.