PDA

View Full Version : Experimenting remote access with Openvpn: discovery works, but player stalls.



epoch1970
2016-04-30, 07:08
UPDATE: Forget all that. LMS was set to transcode AAC/ALAC with LAME and to limit bandwidth to 128kb/s, and LAME gives me "Illegal Instruction" when I run it...
Streaming PCM works fine, but it is buffering a lot since the remote uplink is not beefy enough.
I've found a precompiled i386 binary debian package for LAME that runs on the AMD Geode, at http://www.rarewares.org.
I'm leaving the original post in place in case anyone is interested in an ovpn bridge setup.


I have upgraded my broadband connection and the setup of my (numerous) openvpn tunnels recently.
So I went back to have a look at remote LMS access and tried to play locally from a remote server.

I use Openvpn to bridge a split network (192.168.1.0/24), it is a p2p setup, udp transport.
Ping is stable and, I expect, good enough, at around 45ms (measured at each vpn endpoint, pinging either the LMS server or the SB3 player)
On each site, there is a local default gateway and a DHCP server (ebtables is used on each vpn endpoint to block leases that could be offered across the bridge.)
Long story short on name resolution: both sides have global mDNS resolution capability. For DNS, my side has an autoritative DNS server, and the remote side has nothing except a few static /etc/hosts entries.

On the remote side, the LMS server is colocated with the vpn endpoint. It is about certain that LMS was started before the tunnel was up, however the machine has only one L3 device, a bridge that gets its fixed address (192.168.1.51) via the local DHCP server
On my side, I connected an SB3 to the wired vlan, the local DHCP server gives it a fixed address (192.168.1.251)

Discovery works perfectly well. I pointed my SB3 to connect to the remote LMS server. Menu navigation via IR is snappy.
I can use the LMS server web interface at 192.168.1.51:9000 and all looks perfectly fine.

Problem, when I press the play button on the SB3 (or the web interface), the player meditates a bit and then comes to a stop. I can't get anything to play at my site (music files or radios).
This is what I see at the local vpn endpoint when I press play on the remote:
# tcpdump -v -n -i br0 tcp and host 192.168.1.251 and port not 3483
tcpdump: listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes

15:03:44.661146 IP (tos 0x0, ttl 64, id 2963, offset 0, flags [none], proto TCP (6), length 44)
192.168.1.251.47733 > 192.168.1.51.9000: Flags [S], cksum 0x6133 (correct), seq 1628005325, win 4096, options [mss 1460], length 0
15:03:44.705383 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 44)
192.168.1.51.9000 > 192.168.1.251.47733: Flags [S.], cksum 0xca4c (correct), seq 2413471094, ack 1628005326, win 29200, options [mss 1320], length 0
15:03:44.705801 IP (tos 0x0, ttl 64, id 2973, offset 0, flags [none], proto TCP (6), length 40)
192.168.1.251.47733 > 192.168.1.51.9000: Flags [.], cksum 0x3066 (correct), ack 1, win 9000, length 0
15:03:44.706513 IP (tos 0x0, ttl 64, id 2974, offset 0, flags [none], proto TCP (6), length 93)
192.168.1.251.47733 > 192.168.1.51.9000: Flags [P.], cksum 0xd31f (correct), seq 1:54, ack 1, win 9000, length 53
15:03:44.757389 IP (tos 0x0, ttl 64, id 15237, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.51.9000 > 192.168.1.251.47733: Flags [.], cksum 0xe148 (correct), ack 54, win 29200, length 0
...

I have no idea of what the problem can be. [EDIT: pb was due to the LAME binary not working ok....] I don't want to restart the LMS server now, because it is in use ;)
I feel knowledge of the server<->client protocol for "play" could help, here.

Anyone?