Hi, we’d like to use the new local (LAN) REST API in our fleet (RUT955 mostly) since we believe it is a great integration solution, but I’ve been running in circles regarding TLS.
The certificate used by the API is valid only for a hostname formed by “Teltonika” and the mac address of the device, e.g: “Teltonika001122334455”
The router doesn’t seem to have this name in the local DNS, instead it has RUT955.lan, which is not valid using the certificate.
Right now our approach is:
- ping 192.168.1.1
- use arp to get the MAC address
- parse the MAC and format it to form the host name “Teltonika001122334455”
- insert that entry in /etc/hosts (192.168.1.1 Teltonika001122334455)
- use that name within our app to communicate using https with the router
However, aside how cumbersome this looks, it also presents problems in containerized environments, since the mac address cannot be obtained directly unless you set the network interface mode to host, but that adds it’s own set of risks since the app is exposed directly to the outside.
How is the api intended to be used? I also haven’t found a way to change the certificate used by this api in the WebUI.
Thanks in advance!