How to setup HTTPS for web interface in OpenWRT

By default, you can log in to the OpenWRT firmware installed on your router using http://192.168.1.1. However, if you want to add encryption on that connection, you need to be able to login using https://192.168.1.1. To do that, you need to enable HTTPS support on the router. To do so, open a terminal window on your computer and follow the steps below.

Login to the router using SSH
$ ssh 192.168.1.1 <enter>

Next, install the required packages
# opkg install px5g uhttpd-mod-tls luci-ssl <enter>

luci-ssl will allow you to use the https protocol to access the web interface.