Jump to content

Recommended Posts

crusher11
Posted

But right now, IP:8096 gets me my Emby server.

Which makes no sense, because 8096 is not listed in the Emby settings anywhere.

 

Posted

If you mean from remote then that would indicate you have a port forward from the WAN side of your router to either Emby or an instance of NGINX set to listen on on 8096.  Most likely it's the first.

What is IP addresses of your Emby Server?
What is the IP address of your NGINX server?

crusher11
Posted

They're the same, aren't they?

 

Posted
4 minutes ago, crusher11 said:

They're the same, aren't they?

 

Not my setup so I wouldn't know. :)

Do they run on the same machine?

crusher11
Posted

They're both on my NAS, yeah, but come to think of it did you mean local or remote IP? Because I would assume everything on my local network has the same remote IP, no?

Posted

Yes then same IP internally.  Yes outside/wan address will appear the same for any traffic from inside your network.

The reason I asked is being the same IP address anything bound to a port will be able to listen/respond to traffic.  So in this case 8096 will be Emby itself doing the communication.

8096 will be Emby
80 will be NGINX
443 will be NGINX
based on your config you posted previously.

Thus you will want your port forwarding to be WAN:80 to NAS-IP:80 & WAN:443 to NAS-IP:443

Have you tried that yet?
 

crusher11
Posted

But where does 8096 come from? Emby's ports are 4343 andd 7241.

 

rodainas
Posted (edited)
12 minutes ago, crusher11 said:

But where does 8096 come from? Emby's ports are 4343 andd 7241.

 

8096 is local port used by emby, nginx communicates with those internally.

if you are using nginx the public ports on emby doesnt matter, are not used.

You have set proxypass on nginx to 8096 so you need to use that local port on emby config

Edited by rodainas
crusher11
Posted

But if I just enter my IP and that port, how does NGINX get involved?

 

rodainas
Posted (edited)
1 minute ago, crusher11 said:

But if I just enter my IP and that port, how does NGINX get involved?

 

Go over an example, which ip which port.

 

local ip or public ip, local port 8096?

Edited by rodainas
crusher11
Posted

Public IP, port 8096.

 

rodainas
Posted

Nginx is not involved if you access within your network, is involved when you access outside from 80 or 443 ports.

rodainas
Posted
1 minute ago, crusher11 said:

Public IP, port 8096.

 

You cant use public ip with local port.

you use public ip with public port, being 80 or 443 if https

crusher11
Posted

But I literally can. I can type "123.456.789.101:8096" into my browser's address bar, and it gets me a remote connection to my Emby server.

 

rodainas
Posted

That sounds like you are forwarding that port to emby directly on your router, because your nginx config doesnt listen on that port.

  • Like 1
crusher11
Posted

Where? How? There's nothing in the router settings about it that I can see, and UPnP is disabled in Emby.

 

vdatanet
Posted (edited)
On 7/9/2021 at 3:57 AM, crusher11 said:

I just got a new router, which means my server has moved from local IP 10.0.x.x to 192.168.x.x.

I added exactly the same port-forwarding rules to the new router that I had in the old router, changed the local IP address in the NGINX config, restarted NGINX and...it doesn't connect. The domain gets a CloudFlare 524 error. My IP address followed by ports 80, 443, 4343, 8920 and 7241 fails. My IP address followed by port 8096 succeeds.

This doesn't make any sense. I have Emby's ports in the network config set to 4343 for secure and 7241 for non-secure. CanYouSeeMe.org can only see me on port 8096.

NGINX isn't jumping in front of any of the attempts at direct-IP access, which from memory it's supposed to.

 

Screenshot 2021-07-09 01.38.38.png

According to these rules, Nginx was not involved in your old router configuration. 7241 and 4343 are ports used by Emby.

Try 80 and 443 as internal ports (Nginx is listening those ports)

Edited by vdatanet
crusher11
Posted (edited)

And yet 8096 works. This makes no sense.

As for why those ports, someone said something about not using 80 and 443 because those are the default ports for things and hackers might try them, which means using other ports is a security-by-obscurity measure, and also that if it's a port known for being a media server ISPs might throttle it. Thus I could forward the external ports 80 and 443 to 7241 and 4343 respectively, working around those issues.

I think. The conversation was a while ago.

Edited by crusher11
vdatanet
Posted

You have to change this:

proxy_pass http://192.168.0.2:8096;

By this:

 

proxy_pass http://192.168.0.2:7241;
rodainas
Posted (edited)
6 minutes ago, vdatanet said:

You have to change this:






proxy_pass http://192.168.0.2:8096;

By this:

 






proxy_pass http://192.168.0.2:7241;

Other thing you could do is close port 8096

And letting nginx like it is, you will be forced to use 80 or 443 connected remotely, if you dont want those just change the listening ports on nginx, and remember to forward those new ones

 

the reason you can still connect to 8096 is because is still open.

Edited by rodainas
crusher11
Posted
4 minutes ago, vdatanet said:

You have to change this:


proxy_pass http://192.168.0.2:8096;

By this:

 


proxy_pass http://192.168.0.2:7241;

Domain still doesn't work.

vdatanet
Posted
1 minute ago, crusher11 said:

Domain still doesn't work.

and using public IP, it works?

Posted
5 minutes ago, crusher11 said:

And yet 8096 works. This makes no sense.

Don't trust a test done from inside your LAN.  Test this from a remote location or cell phone not using WIFI.

Your router could be doing some "loopback" magic getting in the way and making your testing confusing.

  • Like 1
vdatanet
Posted
Just now, cayars said:

Don't trust a test done from inside your LAN.  Test this from a remote location or cell phone not using WIFI.

Your router could be doing some "loopback" magic getting in the way and making your testing confusing.

Again thinking the same thing.

  • Like 1
rodainas
Posted (edited)

I set a remote vps with nginx, similar config like you, I could still access with public ip and 8096, I closed it, now the only way to access if by using the listening on nginx

It was impossible for me to test locally because the vps is outside my network, am sure you only need to close it, and use what nginx listens to.

Edited by rodainas

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...