We often use RUT 4G LTE routers for remote access to locations and often use a subdomain off the service domain we have setup for the client. The reason being that we’ll often have a wildcard certificate setup for the service domain that we can use to secure the HTTPS access to the device. However the RUT routers require a moment of tinkering to allow you to use a pre-existing certificate and key.

Firstly upload the PEM versions of the certificate and key via the RUT web user interface in the SystemAdministrationCertificates section. Then in the Certificates Manager tab you can import the certificate file then the key file. Note that the certificate file should be the full chain of certificates needed, not just the certificate that corresponds to the key.

To actually use these you will need to access the router’s command line, either via the web interface to the CLI or by SSH’ing into the router. Once at a command prompt you can edit the configuration file for the uhttpd webserver that provides the web user interface:

vi /etc/config/uhttpd

You will want to edit the lines that define the certficate and key files changing them from:

	option cert '/etc/uhttpd.crt'
	option key '/etc/uhttpd.key'

to point instead at the certificates you uploaded. These should be in the /etc/certificates/ directory. So say the certficate chain we uploaded were called STAR.example.net.chain and the key STAR.example.net.key then the changed lines would be:

option cert '/etc/STAR.example.net.chain'
option key '/etc/STAR.example.net.key'

Once this change has been made we need to restart the the uhttpd web server:

/etc/init.d/uhttpd restart

That should be all done and using your new certificate.