lime-config
The command lime-config configures LibreMesh on top of OpenWrt.
lime-files
Merge them from the low level lime-defaults to top level lime-node to produce the complete configuration in lime-autogen
Modules
Modules are configured in this order hardware_detection, wireless, network, firewall, system, generic_config
hardware_detection
Loads all packages starting with lime-hwd-*lime-hwd-openwrt-wan configures the OpenWrt wan port as WAN. If disabled, or the package is not installed, the wan port is configured as LAN.
wireless
Scan the OpenWrt device to find existing radios.
Produce the UCI configuration for each radio, loading configs from lime-autogen in the order: wifi, 2ghz|5ghz, specific radioN
network
scan
Scan the OpenWrt device to find existing ethernet devices.
general protocols
Configure all general protocols from lime-autogen.network.protocols
interface specific protocols
For each ethernet device if it is present a specific config net use it, else take the protocols list from the general protocols.
Configures all protocols on the ethernet device.
The file lime-defaults provides default configuration for large list of protocols.
Only the protocols for which the relative package lime-proto-<proto-name>is installed are configured. In the default configuration they are
ieee80211sincluded in the packagelime-systemlanincluded in the packagelime-systemanygw- provided bylime-proto-anygwbabeld- provided bylime-proto-babeldbatadv- provided bylime-proto-batadv
firewall
Provides a default configuration for: general settings, LAN zone, WAN zone.
Refers to OpenWrt firewall zones.
default
default firewall configuration: input: ACCEPToutput: ACCEPTforward: ACCEPT`
LAN zone
Provide default firewall configuration for the LAN zone, and referesh the list of lan interfaces:
Example of autogenerated configuration in a dualband router with 4 lan/1 wan ethernet ports.
config zone
option name 'lan'
list network 'lan'
list network 'lm_net_br_lan_anygw_if'
list network 'lm_net_wlan0_mesh_batadv_if'
list network 'lm_net_wlan0_mesh_babeld_if'
list network 'lm_net_wlan1_mesh_batadv_if'
list network 'lm_net_wlan1_mesh_babeld_if'
list network 'lm_net_lan1_babeld_if'
list network 'lm_net_lan1_batadv_if'
list network 'lm_net_lan2_batadv_if'
list network 'lm_net_lan2_babeld_if'
list network 'lm_net_wan_batadv_if'
list network 'lm_net_wan_babeld_if'
list network 'lm_net_lan3_batadv_if'
list network 'lm_net_lan3_babeld_if'
list network 'lm_net_lan4_batadv_if'
list network 'lm_net_lan4_babeld_if'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option mtu_fix '1'mtu_fix: 1 - Enable maximum segment size (MSS) clamping also for LAN. Enabled by default only for WAN.network: <list-of-lan-interfaces> - List of interfaces inside the bridge br-lan LAN interfaces are determined before during the configuration of the network protocol lan
WAN zone
Keeps the OpenWrt's default settings.
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'system
Set hostname and root_password
generic_config
Apply the sections generic_uci_config, copy_asset and run_asset
generic_uci_config
config generic_uci_config 'uhttpd_https'
list uci_set 'uhttpd.main.redirect_https=0'By default uhttpd is instructed to avoid force redirect from http to https
copy_asset
--! copy_asset copy an file from the assets directory into a specified path. --! The node asset directories are /etc/lime-assets/node and /etc/lime-assets/community. --! The community directory should contain the same files in all the community nodes. --! --! config copy_asset collectd --! option asset 'community/collectd.conf' # or 'node/collectd.conf' or 'community/mynode_collectd.conf' --! option dst '/etc/collectd.conf' --!
run_asset
--! Executes a file from the assets directory scheme explained in copy_asset. --! --! config run_asset dropbear --! option asset 'community/dropbear.sh' --! option when 'ATFIRSTBOOT' # ATFIRSTBOOT, ATCONFIG