05.03.2024, 09:12
(05.03.2024, 06:18)admin Wrote: Use this:
Code:routes = io.readproc('route') gateway = routes:match('default%s+([%d%.]+)') ifinfo = require('ifinfo')() ip = ifinfo.eth0.inetaddr log(ip, gateway)
If DHCP is used it is highly recommended to use a static IP-MAC binding so LM IP cannot change randomly.
Thanks
Peppe