# Notes on Libre Router (LiRo) refer this page after completing initial setup using the GUI. After initial setup, you cannot do anything much with the GUI anyways... [TOC] ## SSH into the Router All tasks start by ssh into the router. so open terminal (Ctrl+Alt+T) and type ``` ssh root@thisnode.info ``` ## Password Protect "root" By default there is no password 1. ssh in to the router 2. run the following command and do the needful ``` passwd ``` ## Password Protect WiFi Network By default, the WiFi access points are unprotected 1. ssh in to the router 2. execute the following commands ``` uci set lime-community.wifi.ap_key='your-password' uci set lime-community.wifi.ap_encryption='psk2' uci set lime-community.wifi.apname_key='your-password' uci set lime-community.wifi.apname_encryption='psk2' lime-config ``` 3. Reboot the router - ```reboot``` ## To make your Mesh Network more Independent Say a mesh network A is created using couple of LiRos. Say another mesh network B is created using another set of LiRos. If one router from A is in the range of any router in B, then A and B gets meshed automatically and it becomes one big network. Internet gateways also gets shared from A to B or vice-versa. If you do not want A and B to mesh automatically, then we need to change the ssid of the 5GHz mesh wifi for each router in A (and aprropriately for B). The default is LiMe. We will change that with the Network Name (ap_ssid). 1. ssh into the router 2. execute following commands ``` uci set lime-community.wifi.ieee80211s_mesh_id=$(uci get lime-community.wifi.ap_ssid) lime-config ``` 3. Reboot the router - ```reboot``` ## Schedule a Reboot to Bypass the Default 27-hour Reboot Cycle For device maintenance the LiRo reboots every 27 hours. This will cause abrupt network downtime at unwanted times. So we can force reboot every 24h to bypass the 27h cycle. 1. ssh in to the router 2. first we need to localize the timezone. default is UTC. refer [here](https://github.com/openwrt/luci/blob/master/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua) for your country ``` uci set system.@system[0].timezone=<enter-timezone> ``` 3. setup a cronjob to reboot everyday at 4am ``` (crontab -l 2>/dev/null; echo "0 4 * * * reboot") | crontab - ``` 4. Reboot the router - ```reboot``` ## Add Alternative Names to thisnode.info say we want to add alternatives like XXX.YYY where XXX is the ap_ssid (Network Name) and YYY is the apname_ssid (Node Name) 1. ssh in to the router 2. execute the following commands ``` uci add_list dhcp.anygw_dns.name='XXX.YYY' uci commit dhcp /etc/init.d/dnsmasq restart ``` ## Check DHCP Leases ``` cat /tmp/dhcp.leases ``` --- sanketh@janastu.org shalini@janastu.org