Jump to content

https: am I wrong?


Go to solution Solved by sonusfaber,

Recommended Posts

sonusfaber
Posted

Hello,

I discovered something strange on my Emby server behaviour. Really can not understand even after reading many times the guide.

Emby running on an Ubuntu VMWare VM. I want to reach Emby from the public network with https.
I have a personal domain, DNS and certificate and everything was running fine... let me say... I was supposed to think that was fine.
Yesterday the certificate expired, but... from the public network, pointing to the the url https://myemby.mydomain.it:8444 I get the message that the certificate is expired then the browser fallbacks to http and I can access Emby !!!!!

I do not want such behaviour at all: i need http on the LAN and only https on the WAN
I have a rule on the router that forward incoming connections to the public 8444 to 8920 on the LAN. No other rules are defined.
According to this, I supposed that nothing was being forwarded to other ports, just to the 8920 that is configured for https, but it responds also http.

Emby Network config page:
- LAN Networks: blank
- Local IP: blank
- Local http port: 8096
- Local https: 8920
- Allow remote connections: allowed
- Remote IP filter: blank
- Filter mode: whitelist
- Public http port: 80... but whatever I put does not change the story (router just forward 8444 to 8920)
- Public httpS port: 8444 (the one the router is listening from)
- External domain: blank
- Secure connection mode: required for all remote connections
- Auto port mapping: not checked
 

Am I wrong?

Many thanks

Posted

Hi. What makes you think it falls back to http ?

sonusfaber
Posted

2 days, until the certificate was OK, hitting

https://myemby.mydomain.it:8444

I was able to use Emby in https. Then starting from yesterday, once the certificate was expired it happens that:
- I receive on the browser the message that the cert is expired
- it asks to me if I want to continue
- I click YES
- and the Emby gui pops us with the icon saying that it is secured, running in http

The only rule on the router forward the public 8444 port to the Emby IP address \ 8920 port
8920 is the port defined to work in https Emby side

Right now I am running a packet sniffer and it confirms that all the incoming traffic on the 8444 public port is forwarded only to the Emby IP port 8920

So... why Emby serves http packets through the 8920 port?

Any help is appreciated.

Thanks a lot

Lessaj
Posted

What makes you think it's http?

Posted

Right Emby does not serve http through port 8920. 

  • Solution
sonusfaber
Posted (edited)

 

I see. The traffic is still encrypted using the old, expired certificate. I thought Emby would reject the TLS handshake if the certificate had expired.

Any way to force it?

Edited by sonusfaber
Lessaj
Posted

I think the client apps would reject it if it was expired but web browsers wouldn't be stopped by it aside from the warning.

Posted
3 hours ago, sonusfaber said:

 

I see. The traffic is still encrypted using the old, expired certificate. I thought Emby would reject the TLS handshake if the certificate had expired.

Any way to force it?

In the browser it’s not the Emby web app that makes that decision, it’s the web browser.

sonusfaber
Posted
4 hours ago, Luke said:

In the browser it’s not the Emby web app that makes that decision, it’s the web browser.

Both the web browser and the Emby App are able to connect to Emby Server despite the expired certificate: the browser displays the warning (standard behavior) but the app does not.

Is this the correct behavior for the app?

Posted
14 hours ago, sonusfaber said:

I thought Emby would reject the TLS handshake if the certificate had expired

You specifically told it NOT to reject it. That is what the warning was about.

6 hours ago, sonusfaber said:

Is this the correct behavior for the app?

This will be controlled by the network stack on the device OR the app is falling back to an unsecured connection.  You control this in your network setting in the Emby dashboard.

sonusfaber
Posted
1 hour ago, ebr said:

You control this in your network setting in the Emby dashboard

where, exactly?

Lessaj
Posted

Network -> Secure connection mode.

sonusfaber
Posted

it is set to "required for all remote connections" but this does not mean that in case the certificate is expired.. then the handshake is refused... 

Connecting by using a web browser, I get the alert\message and I can accept

Connecting by using the app... is another story: it connects anyway despite the expired certificate without asking anything to me.

Posted
2 hours ago, sonusfaber said:

Connecting by using the app... is another story: it connects anyway despite the expired certificate without asking anything to me.

We'd have to see exactly how it is connecting to confirm but it sounds like the device is simply accepting the cert.

The app doesn't control any of this.  It just makes network requests.

sonusfaber
Posted

OK. so... just to recap what I understood.

Correct me if I am wrong, please:

Case: Emby Server (on Ubuntu) running https with expired certificate
A) conecting to the server with a web browser. The client browser receives the alert saying that the certificate is expired and, in case the user accepts to go on even without a valid certificate, pages are server anyway. traffic is still encrypted with the old certificate.
B)connecting to the server with the Emby App (on Android), no alerts are forwarded to the user by the app that continues to work in https even if the certificate is formally no more valid.

is this the expected behavior ?

 

Posted
7 hours ago, sonusfaber said:

connecting to the server with the Emby App (on Android), no alerts are forwarded to the user by the app that continues to work in https even if the certificate is formally no more valid.

 

21 hours ago, ebr said:

We'd have to see exactly how it is connecting to confirm

 

Posted
Quote

connecting to the server with the Emby App (on Android), no alerts are forwarded to the user by the app that continues to work in https even if the certificate is formally no more valid.

If that's what's happening then no, that's not ideal. It should be improved to be more like the browser.

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