Is NAT loopback/hairpinning required for Sonos to work with Plex?

sonos

#1

Is NAT loopback/hairpinning required for Sonos to work with Plex? I have Eero, which doesn't support NAT loopback / hairpinning. I have read lots on these boards but haven't found a definitive answer. If it is not required, is there a work-around? Thank you.


#2

It is required. Not sure if there’s a work around (unless you consider Plex Cloud).


#3

Some routers may internally support this but not provide a setting for it…

Also, some folks have found that manually creating the port forward, rather than letting it be automatically created through UPnP, will work in the absence of a NAT loopback/hairpin option. It really depends on your router.


#4

OK, So are we creating the Loopback for each Sonos device?


#5

If your router requires that you create a loopback manually, then yes you would want one for each Sonos device (or any Sonos device that you would be using to play music from Plex). My router (pfSense) just has a “NAT Reflection” option that I enable on the port forward, and that seems to allow it to work when any internal device makes a request to that port on the WAN address.


#6

This is all new to me but it sounds like I may be having similar issues. I’m using Luma for my routers, Sonos can find Plex and see all my library on my Synology NAS, but when I try to play a file it tells me it’s unable to connect to Plex. Luma allows me to set up port forwards - I tried setting up port forwards on Luma using 32400 (for Plex) on each Sonos device, but that isn’t working. Am I totally mixing everything up?


#7

I am too a bit confused on how to get the NAT hairpin/loopback setup on my TP-Link Archer D7. I have remote access working on my plex server/router, but when i go to create a port forward on my router for my Sonos Device (i am assuming i have to create one for each of my devices) do i use my public port (in plex) as my external port for port forwarding and my private port as my internal port? Do i also require TDP, UDP or both? Cheers


#8

Sorry, not a IT savy but it is really a nonsense to use NAT hairpin/loopback to play local content on Plex.


#9

Why doesn’t Plex refer to this NAT issue in their walkthrough?

I have manual port forward working fine and have no problems accessing my Plex server remotely. Plex on Sonos has never worked however. My router doesn’t support this NAT reflection option so guessing thIs is probably the issue most people are facing.

Have Plex acknowledged this problem and whether they are trying to develop a workaround?


#10

Plex hasn’t acknowledged anything except that they’re “working very slowly” on the Sonos connectivity at this time (that was as of March 8th 2017). They seemingly abandoned it within days of its release with only one Plex employee posting just a couple of times in this forum since the release about a year ago now.


#11

I had issues connecting to plex. I finally realised that if instead of going through the menu that first appears in the sonos application, if I select Other Libraries at the main menu, then click the plex server name where the music is stored on, then click on the folder where the music is on your plex server it works, it seems the authorisation process doesn’t select the correct plex server if you have more than one.


#12

Holy cow, this worked for me! I gave up trying to get Plex working on Sonos but this simple trick works!

@jfairham said:
I had issues connecting to plex. I finally realised that if instead of going through the menu that first appears in the sonos application, if I select Other Libraries at the main menu, then click the plex server name where the music is stored on, then click on the folder where the music is on your plex server it works, it seems the authorisation process doesn’t select the correct plex server if you have more than one.


#13

Today I setup:

  • 2 x Sonos Play 1
  • Plex running on Synology DS716+II
  • Router Mikrotik RB493G

Initially my Sonos Play was unable to connect to the Plex server because hairpin NAT was disabled.
I enabled it with the command below in my Mikrotik router:

[admin@MikroTik] > /ip firewall nat add chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.200 protocol=tcp dst-port=32400 out-interface=bridge1 action=masquerade

Where:

  • 192.168.1.0/24 is my private subnet.
  • 192.168.1.200 is the Plex server IP.
  • 32400 is the Plex service port.

Cheers!


#14

I tried hair pinning and NAT mappings and within minutes my NAS (where PMS runs) was attacked many times, though for some reason on my router Balance One Core by Peplink opened up the NAT interface to my WAN. It works but leaves me prone to attack.

So after many hours of trawling through the web and trying a loads of peoples tips/tricks i found that “Service forwarding” all requests on the current vlan network via port 32400 to the NAS IP (on the same port) on the same local network works perfectly!!

Thumbnails appear, music plays as it SHOULD DO! (no thanks to plex or sonos) Common Plex!! your LG TV app too needs some love (i have to use Xplay for movies), i wish you would put more effort into your apps as you’re pissing off a lot of customers.

Thank you to everyone who has commented across the web with their solutions, i finally found mine!!!

NAS: QNAP TS-453a
Router: Peplink Balance Once Core (this i think also works on my old Surf Soho MK II)
Plex ver: 1.11.3.4803
Sonos: latest.


#15

@Wolf_666 said:
Sorry, not a IT savy but it is really a nonsense to use NAT hairpin/loopback to play local content on Plex.

I need to agree to Wolf. Must be a joke that I need to enable NAT loopback… I have a DS-lite connection. That option doesn’t work for me. At the end I expect Plex to provide the correct player IP to the Sonos app.

Come on Plex- Team… its in the same network. You made a big announcement - Sonos also - so get together and solve this problem for your users!

By the way… better IP6 support for WAN-IP might be good also.

NAS: QNAP TS-470U-RP + i5-3570T + 8GB RAM + UX-1200U-RP
Router: AVM Fritzbox 6490 with DS-lite
Plex: 1.11.3.4803
Sonos: latest


#16

Wanted to chime in and confirm that unfortunately, yes, NAT loopback is required for Sonos to be able to play music from a PMS on the same network. The reason it’s necessary is that we don’t actually run any code on the Sonos device itself - it’s all cloud based. Unlike any other native Plex app that can test the various connection routes to a PMS instance, the best we can do is infer what the network looks like from the outside. We are looking at ways to better infer when a local connection would work when a remote connection fails due to NAT loopback not being supported, the challenge is doing so in a way that doesn’t break the app for everyone else.


#17

Thanks for addressing the NAT loopback requirement. I feel this is something that should be documented more clearly, although it’s talked about on this forum and Google returns results immediately back here with the errors.

My steps:
Disabled UPnP on Router.
Plex Server Settings > Remote Access > (Advanced Enabled) Checked manually specify public port, using default 32400
Created a manual port forward from external (WAN) connections to my Plex server (IP) referencing the ports in this list.
Opened ports manually on Windows Server Firewall.
Re-enabled UPnP on Router.

Due to this though, because I set a 3Mbps/stream and 8.2Mbps total limit on my ‘Remote Access’ page for Plex, I’m unable to play an amount of my library as some music is more than 3Mbps and I get an error from Sonos saying the files are “not found”. I can’t lift this limit as it allows me to run my Plex server for the friends that I share it with in a manageable state. A nice workaround (and overall feature for Plex Server/Remote Access settings) would be to add a force audio/music transcode and/or limit type function of some sorts if Sonos requests need to come from outside the network.


#18

Thank you John. I really appreciate your information. Would it be an option to check if the Sonos device and the PMS have the same WAN? If yes -> forward the local IP to the Sonos app. Or else to check the alternative urls in the server settings (if available).

As I have a DS-lite connection from my ISP, here are my steps:

  • DDNS for my IPv6 via myfritz on my AVM router (basicly this is a DDNS + Port forwarding of the port 32400 for IPv4/6)
  • manual public port set to 32400
  • universal portmapping via feste-ip.net
  • resulting dns from feste-ip.net and myfritz dns set to the alternative urls in the PMS settings

I do have n access from WAN to my PMS and friends can connect to my PMS. The connection is only limited by my upload speed of 6 Mbit.

If you guys from the plex team need beta testers for improving the connectivity to Sonos devices, I would be happy to help.


#19

I have a dynamic dns hostname and manual port forwarding.
All works for me. Works well now since the last update. Minus the occasional shuffle all problem.


#20

Thanks for chiming in John. It is a relief that it is at least a known problem and we’re being heard.

Still sucks but doesn’t suck as much.

Here’s hoping you figure something out!