I think that ZNC should have the ability to do what apache can do in terms of changing an HTTP request to HTTPS automatically. This would be awesome because then you wouldn't have to worry about adding HTTPS every time.
I think that ZNC should have the ability to do what apache can do in terms of changing an HTTP request to HTTPS automatically. This would be awesome because then you wouldn't have to worry about adding HTTPS every time.
https://wiki.apache.org/httpd/RedirectSSL
<!-- github-sync-id:36619844 -->
@dylanhansch Look around for guides to setting up your preferred HTTP server (Apache, nginx, lighttpd, etc.) as a "reverse proxy". Note that ZNC really needs to be a nightly version at the moment, if you want webadmin to work behind a reverse proxy without random logouts. (It needs the X-Forwarded-For header support that was added since the last stable release.)
@dylanhansch Look around for guides to setting up your preferred HTTP server (Apache, nginx, lighttpd, etc.) as a "reverse proxy". Note that ZNC really needs to be a nightly version at the moment, if you want webadmin to work behind a reverse proxy without random logouts. (It needs the X-Forwarded-For header support that was added since the last stable release.)
<!-- github-comment-id:47307071 -->
But... this breaks concept of SSL?
As initial connect it not SSL, mitm can simply make it not redirect.
So users, instead of relying that mitm isn't presented, learn to use SSL from the start.
But... this breaks concept of SSL?
As initial connect it not SSL, mitm can simply make it not redirect.
So users, instead of relying that mitm isn't presented, learn to use SSL from the start.
<!-- github-comment-id:47310697 -->
A Strict-Transport-Security header could force the browser to replace the users 'http' with 'https'. I think this would produce results similar as wanted.
A Strict-Transport-Security header could force the browser to replace the users 'http' with 'https'. I think this would produce results similar as wanted.
<!-- github-comment-id:47315135 -->
Uhm. If I understand this correctly, RedirectSSL just means to redirect requests that go to http port 80 to https port 443. However, ZNC doesn't use the standard ports and there is no usable connection between any ssl and non-ssl port.
So if you want to force everything to be SSL, just don't enable a non-SSL port? You have to explicitely state the port number anyway since your ZNC likely doesn't listen on port 443. If it does, just use a tiny HTTP server that listens on port 80 and redirects requests to https and port 443...?
Do I misunderstand something or what is the actual issue here?
Uhm. If I understand this correctly, RedirectSSL just means to redirect requests that go to http port 80 to https port 443. However, ZNC doesn't use the standard ports and there is no usable connection between any ssl and non-ssl port.
So if you want to force everything to be SSL, just don't enable a non-SSL port? You have to explicitely state the port number anyway since your ZNC likely doesn't listen on port 443. If it does, just use a tiny HTTP server that listens on port 80 and redirects requests to https and port 443...?
Do I misunderstand something or what is the actual issue here?
<!-- github-comment-id:47315751 -->
In case he wants a redirect http://znc.in:1337 -> https://znc.in:1337
Port 80/443 is not needed here. HSTS and an HTTP reply if the browser erroneously talk to an HTTPS port with HTTP would do that
In case he wants a redirect http://znc.in -> https://znc.in:1337, this should be done with an external program, because http with omitted port defaults to port 80, and to get this behavior znc needs to bind to port 80 by some kind of default. And i dont think thats acceptable.
I suspect you are thinking of some kind like http://znc.in -> https://znc.in, which is a special case of the second one where znc is bound to 443 and therefore the port doesnt need to be specified.
In case he wants a redirect http://znc.in:1337 -> https://znc.in:1337
Port 80/443 is not needed here. HSTS and an HTTP reply if the browser erroneously talk to an HTTPS port with HTTP would do that
In case he wants a redirect http://znc.in -> https://znc.in:1337, this should be done with an external program, because http with omitted port defaults to port 80, and to get this behavior znc needs to bind to port 80 by some kind of default. And i dont think thats acceptable.
I suspect you are thinking of some kind like http://znc.in -> https://znc.in, which is a special case of the second one where znc is bound to 443 and therefore the port doesnt need to be specified.
<!-- github-comment-id:47317697 -->
In case he wants a redirect http://znc.in:1337 -> https://znc.in:1337
Port 80/443 is not needed here. HSTS and an HTTP reply if the browser erroneously talk to an HTTPS port with HTTP would do that
That's not what the RedirectSSL wiki page that was linked to explains/does.
> In case he wants a redirect http://znc.in:1337 -> https://znc.in:1337
> Port 80/443 is not needed here. HSTS and an HTTP reply if the browser erroneously talk to an HTTPS port with HTTP would do that
That's not what the RedirectSSL wiki page that was linked to explains/does.
<!-- github-comment-id:47319353 -->
I was talking about having http://znc.in:1337 -> https://znc.in:1337. (I use port 7778, and that is SSL. I want to keep SSL. But it's annoying to have to manually type in https every time)
I was talking about having http://znc.in:1337 -> https://znc.in:1337. (I use port 7778, and that is SSL. I want to keep SSL. But it's annoying to have to manually type in https every time)
<!-- github-comment-id:47344764 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I think that ZNC should have the ability to do what apache can do in terms of changing an HTTP request to HTTPS automatically. This would be awesome because then you wouldn't have to worry about adding HTTPS every time.
https://wiki.apache.org/httpd/RedirectSSL
I currently run ZNC's webadmin behind nginx to get this (among other things). +1
How do I run it under a different web server?
@dylanhansch Look around for guides to setting up your preferred HTTP server (Apache, nginx, lighttpd, etc.) as a "reverse proxy". Note that ZNC really needs to be a nightly version at the moment, if you want webadmin to work behind a reverse proxy without random logouts. (It needs the X-Forwarded-For header support that was added since the last stable release.)
But... this breaks concept of SSL?
As initial connect it not SSL, mitm can simply make it not redirect.
So users, instead of relying that mitm isn't presented, learn to use SSL from the start.
A Strict-Transport-Security header could force the browser to replace the users 'http' with 'https'. I think this would produce results similar as wanted.
Uhm. If I understand this correctly, RedirectSSL just means to redirect requests that go to http port 80 to https port 443. However, ZNC doesn't use the standard ports and there is no usable connection between any ssl and non-ssl port.
So if you want to force everything to be SSL, just don't enable a non-SSL port? You have to explicitely state the port number anyway since your ZNC likely doesn't listen on port 443. If it does, just use a tiny HTTP server that listens on port 80 and redirects requests to https and port 443...?
Do I misunderstand something or what is the actual issue here?
In case he wants a redirect http://znc.in:1337 -> https://znc.in:1337
Port 80/443 is not needed here. HSTS and an HTTP reply if the browser erroneously talk to an HTTPS port with HTTP would do that
In case he wants a redirect http://znc.in -> https://znc.in:1337, this should be done with an external program, because http with omitted port defaults to port 80, and to get this behavior znc needs to bind to port 80 by some kind of default. And i dont think thats acceptable.
I suspect you are thinking of some kind like http://znc.in -> https://znc.in, which is a special case of the second one where znc is bound to 443 and therefore the port doesnt need to be specified.
That's not what the RedirectSSL wiki page that was linked to explains/does.
Is reimplementing RedirectSSL for ZNC the only solution to achive the wanted behavior?
I was talking about having http://znc.in:1337 -> https://znc.in:1337. (I use port 7778, and that is SSL. I want to keep SSL. But it's annoying to have to manually type in https every time)
Duplicate of #320