davidc502 wrote:starcms wrote:btrv wrote:Hi David, looks like uhhtpd-mod-tls did not make it into this build - could you add it please? Thanks
Downloading http://davidc502sis.dynamic-dns.net/sna … vfpv3.ipk.
Unknown package 'uhttpd-mod-tls'.
Configuring px5g-polarssl.
Collected errors:
* opkg_install_cmd: Cannot install package uhttpd-mod-tls.
Accorting to https://wiki.openwrt.org/doc/howto/secure.access uhttpd-mod-tls hasn't been needed for Luci-SSL since Dec 2013. I installed Luci-ssl-openwrt and it generated px5g the certicates just as it should. Everything working perfectly.
Edit: "Note that uhttpd-mod-tls is not needed after r35295 in Jan2013. But you need a ustream-ssl wrapper library on top of the actual SSL library (polarssl, mbedtls, cyassl, openssl). Luci-ssl includes by default libustream-mbedtls (since Dec2016)."
But since OpenSSL is already included in @david's builds, I find it simpler to simply install Luci-SSL-openSSL and all requried depencies (such as px5g) will be installed with it. That simple.
Thanks for explaining because I searched in menuconfig and couldn't find it, so I went out to the lede trunk packages and couldn't find it there either.
I'm guessing someone ended up taking it out completely.
I made a few more edits to the post to clarify things further. If you do decide to start including Luci-SSL-openSSL in your builds, it has at least one dependency (px5g, and possibly 1, maybe 2 others), but I'm sure your build-env should automatically determine that and include them, just like when you do opkg install.
Regardless if you decide to include Luci-ssl-openssl, I would highly recommend setting 2 default settings for future builds for those that are new to LEDE to ensure maximum security and avoid potential access from the WAN to SSL and Luci.
First, configure dropbear from the default unspecified interface to the LAN interface.
Secondly, in the uhttpd configuration (/etc/config/uhttpd):
-Change the default settings of listen_http and listen_https from the default of (I think it was) 0.0.0.0 (which allows WAN access to Luci) to 192.168.1.1. Also comment out or remove the second listen_http and listen_https of '[::]:80' and '[::]:443, respectively (which also allow WAN access to Luci over IPv6).
This is how mine looks:
config uhttpd 'main'
list listen_http '192.168.1.1:80'
# list listen_http '[::]:80'
list listen_https '192.168.1.1:443'
# list listen_https '[::]:443'
Because of the default configuration line " option redirect_https '1' ", the user isn't forced to type in https://192.168.1.1 if you decide to install Luci-SSL-OpenSSL. It'll automatically redirect to https://192.168.1.1. And if Luci-SSL isn't installed, that line doesn't auto-redirect to https:// (because like I said, option redirect_https '1' is the default setting in your builds now and obviously they don't redirect to https:// (which wouldn't work and return a 404 if Luci-SSL isn't installed).
Edit: Also in the uhttpd config file, in the config cert 'defaults', if you start using Luci-SSL, you'll want to change the " option commonname to 192.168.1.1
option commonname '192.168.1.1'
The country, state, and location options are of no importance, but I have them changed to country US, state LA, and location WRT-Router (just because I'm OCD).
Obviously, the browser is going to bitch about the certificate not being source in the trusted root certification authorities store (the same error your website is now giving when accessing via https://), but if the codename is not set to the IP/address used to access the router, it will bitch about that, and even if you pay for a certificate from a trusted source, it still will bitch.)
Lastly, there is a way to manually install the certificate generated by px5g by uhttpd when using Luci-SSL into the trusted root store, so it doesn't give any errors, but it's a long, complicated process that would have to be done on each PC/phone/tablet/etc, so I've never bothered trying. But again, if the codename isn't set to 192.168.1.1, you couldn't even do that.
One very last thing. You can see in the uhttpd config file that the certificate is stored at /etc/uhttpd.crt. For some reason, I've noticed that on some people's builds of LEDE, a very old certificate is created there when building (even if they don't have Luci-SSL or Luci-SSL-OpenSSL included in the build). So if you decide to start including Luci-SSL-OpenSSL in your builds, make sure that no certificate is being build/included at /etc/uhttpd.crt. A new certificate will automatically be generated on first boot using the config present in the uhttpd config. But if an old certificate is present, a new one won't be generated.
(Last edited by starcms on 29 Dec 2016, 23:26)