diff --git a/routers/default.nix b/routers/default.nix index caec98a..d23fe10 100644 --- a/routers/default.nix +++ b/routers/default.nix @@ -65,27 +65,29 @@ EOI uci set dropbear.@dropbear[0].RootLogin='1' + uci set dropbear.@dropbear[0].PasswordAuth='off' + uci set dropbear.@dropbear[0].RootPasswordAuth='off' uci commit dropbear service dropbear restart - # # Add a new wifi-iface for the upstream network (station mode) - # uci set wireless.wwan=wifi-iface - # uci set wireless.wwan.device='radio0' # radio1 for 5GHz - # uci set wireless.wwan.mode='sta' - # uci set wireless.wwan.network='wwan' - # uci set wireless.wwan.ssid='${router-config.upstream-wifi.ssid}' - # uci set wireless.wwan.encryption='psk2' - # uci set wireless.wwan.key='${router-config.upstream-wifi.password}' - # uci commit wireless - # - # uci set network.wwan=interface - # uci set network.wwan.proto='dhcp' - # uci commit network - # - # uci set network.relay=interface - # uci set network.relay.proto='relay' - # uci set network.relay.network='lan wwan' - # uci commit network + # Add a new wifi-iface for the upstream network (station mode) + uci set wireless.wwan=wifi-iface + uci set wireless.wwan.device='radio0' # radio1 for 5GHz + uci set wireless.wwan.mode='sta' + uci set wireless.wwan.network='wwan' + uci set wireless.wwan.ssid='${router-config.upstream-wifi.ssid}' + uci set wireless.wwan.encryption='psk2' + uci set wireless.wwan.key='${router-config.upstream-wifi.password}' + uci commit wireless + + uci set network.wwan=interface + uci set network.wwan.proto='dhcp' + uci commit network + + uci set network.relay=interface + uci set network.relay.proto='relay' + uci set network.relay.network='lan wwan' + uci commit network # Edit the existing AP or add a new one: uci set wireless.default_radio0.ssid='${router-config.wifi.ssid}' @@ -94,17 +96,17 @@ uci set wireless.default_radio0.disabled='0' uci commit wireless - # uci set dhcp.lan.ignore='1' - # uci commit dhcp - # - # uci set firewall.@zone[1].network='wan wan6 wwan' - # uci commit firewall - # - # /etc/init.d/relayd enable - # /etc/init.d/relayd start - # /etc/init.d/network restart - # - # /etc/init.d/firewall restart + uci set dhcp.lan.ignore='1' + uci commit dhcp + + uci set firewall.@zone[1].network='wan wan6 wwan' + uci commit firewall + + /etc/init.d/relayd enable + /etc/init.d/relayd start + /etc/init.d/network restart + + /etc/init.d/firewall restart wifi EOF