Jump to content

Cannot access Emby server via public port


arthur87
Go to solution Solved by dcrdev,

Recommended Posts

arthur87

I have just installed Emby Server on my Ubuntu Server and trying to configure remote access settings. Right after installation I noticed that server can be accessed from outside of my local network via both - local and public ports which I didn't liked. After a little bit of googling it seemed that this issue partially caused by UPnP (and I think that partially it's a bug). After I disabled "Enable automatic port mapping" in Emby settings situation hasn't changed, so I disabled UPnP in router settings. It helped, but then I have faced another issue.

 

Even after I manually configured port forwarding rules in my router settings, I'm for some reason cannot access Emby server via public port.

 

Here is the error message I'm getting:

 

5b50d5a0b9e76_screenshot9418015768428902

 

 

 

At the same time remote access via local port (I created a separate port forwarding rule for it) is working fine. It's also interesting that remote access via local port works only if "Allow remote connections to this Emby Server" setting is enabled (otherwise it's just showing "Forbidden") which meany that Emby can distinguish local and remote connections, it's just seems that for some reason connections on public port are completely disabled.

 

Can someone please tell what is causing this issue and how to fix it. I'm also attaching screenshots of Advanced settings from Emby and screenshot of port forwarding rules from my router.

 

Thanks.

post-333212-0-47790500-1532025042_thumb.png

post-333212-0-48647600-1532025051_thumb.png

Edited by arthur87
Link to comment
Share on other sites

Hi, this looks to me beyond Emby's control and that the traffic just isn't making it to Emby Server. 

 

I notice you've changed multiple variables here, the upnp setting, the public port values. I would probably suggest going back to defaults and then changing one thing at a time, testing, and repeating. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

arthur87

Hi, this looks to me beyond Emby's control and that the traffic just isn't making it to Emby Server. 

 

I notice you've changed multiple variables here, the upnp setting, the public port values. I would probably suggest going back to defaults and then changing one thing at a time, testing, and repeating. Please let us know if this helps. Thanks.

Thank you for the answer. A reset settings by removing /var/lib/emby/config folder and started some experiments.

 

Here a the results:

 

By default both local and public ports are set to 8096, I believe this is why remote access worked for me at the beginning. This time I decided to change local port to 8097 and leave default value 8096 for public port. As a result after I restarted the server remote access via port 8096 stopped working, however it worked for new local - 8097. So I believe this proves my theory that Emby just cannot receive connections to the port which specified as public.

Link to comment
Share on other sites

  • Solution
dcrdev

Isn't the issue here that you're forwarding the public port to the public port you've specified within Emby and are expecting Emby to listen on that port? Setting the public port within Emby doesn't make it listen on that port - it's just for identifying ports within the apps.

 

So try:

Emby local http: 8096

Emby local https: 8920

Emby public http: 42890

Emby public https: 42891

 

Router:

Forward 42890 to 8096

Forward 42891 to 8920.

Edited by dcrdev
  • Like 2
Link to comment
Share on other sites

arthur87

Isn't the issue here that you're forwarding the public port to the public port you've specified within Emby and are expecting Emby to listen on that port? Setting the public port within Emby doesn't make it listen on that port - it's just for identifying ports within the apps.

 

So try:

Emby local http: 8096

Emby local https: 8920

Emby public http: 42890

Emby public https: 42891

 

Router:

Forward 42890 to 8096

Forward 42891 to 8920.

Thank you for explanation.

 

Yes, now it's working. I just misunderstood meaning of these settings, I thought connections to local and public port will be handled differently by Emby.

Link to comment
Share on other sites

So I believe this proves my theory that Emby just cannot receive connections to the port which specified as public.

 

You're correct and it was never designed this way. The only reason you enter the public port in Emby is for these two purposes:

  • So that Emby Server can display the correct remote access url on your server dashboard
  • So that the automatic port mapper knows what to map to (which you've disabled)

That's it. Would it be easier if we just didn't allow you to change the ports at all? Then there would have never been a problem?

Link to comment
Share on other sites

dcrdev

So basically what I said then?

 

You're correct and it was never designed this way. The only reason you enter the public port in Emby is for these two purposes:

  • So that Emby Server can display the correct remote access url on your server dashboard
  • So that the automatic port mapper knows what to map to (which you've disabled)

That's it. Would it be easier if we just didn't allow you to change the ports at all? Then there would have never been a problem?

 

 

Probably a bit rash - maybe just try documenting things better for new users pal?

Link to comment
Share on other sites

That's it. Would it be easier if we just didn't allow you to change the ports at all? Then there would have never been a problem?

 

There actually wasn't a problem in the beginning as everything worked automatically - but he didn't like that and wanted to change the configuration.

Link to comment
Share on other sites

arthur87

Would it be easier if we just didn't allow you to change the ports at all? Then there would have never been a problem?

Maybe it will be more intuitive and less confusing if public ports settings will be grayed out if automatic mapping is disabled. Or there could be at least some note that without automatic mapping this setting doesn't do anything besides changing remote link in the Dashboard.

Link to comment
Share on other sites

Maybe it will be more intuitive and less confusing if public ports settings will be grayed out if automatic mapping is disabled. Or there could be at least some note that without automatic mapping this setting doesn't do anything besides changing remote link in the Dashboard.

 

Right, we can't gray them out for the reason that you noted but yes i think the help text can be improved. thanks.

Link to comment
Share on other sites

Maybe it will be more intuitive and less confusing if public ports settings will be grayed out if automatic mapping is disabled. Or there could be at least some note that without automatic mapping this setting doesn't do anything besides changing remote link in the Dashboard.

 

Isn't this also key information for Emby Connect...?

Link to comment
Share on other sites

Isn't this also key information for Emby Connect...?

 

Correct, I was just simplifying my explanation by saying the display on the server dashboard. But yes there are other areas that utilize that information.

Link to comment
Share on other sites

arthur87

There actually wasn't a problem in the beginning as everything worked automatically - but he didn't like that and wanted to change the configuration.

I didn't liked that by default (when UPnP is enabled) Emby can be accessed from the Internet via both local and public ports, so I started to look for the settings to change that. When I found a setting called "Public http port number" I expected that if I'll change it Emby will listen to this port for connections from the Internet and local port will be inaccessible. But this is not what happened as you already know.

 

 

Isn't this also key information for Emby Connect...?

Without UPnP it's still won't mean much since you actually should specify the port which you set it port forwarding settings and not in Emby settings. So it seems that Emby Connect is just another feature that won't be working correctly if ports are not configured properly.

Link to comment
Share on other sites

 

 

I didn't liked that by default (when UPnP is enabled) Emby can be accessed from the Internet via both local and public ports, so I started to look for the settings to change that. When I found a setting called "Public http port number" I expected that if I'll change it Emby will listen to this port for connections from the Internet and local port will be inaccessible. But this is not what happened as you already know.

 

The startup wizard asks you about the upnp port mapper, so it could have been changed at that point. 

Link to comment
Share on other sites

Without UPnP it's still won't mean much since you actually should specify the port which you set it port forwarding settings and not in Emby settings. So it seems that Emby Connect is just another feature that won't be working correctly if ports are not configured properly.

 

Yes of course, if Emby Server doesn't' know it's remote access url, then there is going to be a problem.

Link to comment
Share on other sites

  • 8 months later...
PhillyIdol

Ok - hitting up an older post, but...

 

I use Emby Connect, I'm also pretty IT savvy, so first off - my Emby server is on Linux Mint-Mate, successfully set port fwd'ing on router to the listed Ext port in my Emby settings (default 8096) - which works, but I want to use a dif Ext port than the default 8096 (I like defining my own Ext ports for xtra security), so set the port, tested it via canyouseeme.org - came back Success, but (you guessed it) tried thru my phone app now and get the 'unable to connect to server'

 

What ID 10T  ;)  thing did I miss?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...