ffthemediumway
Differences
This shows you the differences between two versions of the page.
| ffthemediumway [2025/10/25 12:03] – gabor | ffthemediumway [2025/10/25 12:37] (current) – gabor | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Example | + | ===== Installing openwrt on the router for the first time ===== |
| + | Go to the [[[https:// | ||
| - | < | + | |
| + | ===== Generating the funkfeuer firmware image ===== | ||
| + | |||
| + | - Go to the [[[https:// | ||
| + | - Select your device. | ||
| + | - Click on " | ||
| + | - Add the following packages to the list | ||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | - Copy the following script and paste it to " | ||
| + | - Replace xxx in the first line with your location' | ||
| + | - (optional) change LAN_IP and LAN_NET | ||
| + | The script contains some default values that make configuration easier. | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | #written by gabor | ||
| + | export FF_HOSTNAME=" | ||
| + | export LAN_IP=" | ||
| + | export LAN_NET=" | ||
| + | |||
| + | #check if already configured. prevents overwriting settings when upgrading openwrt | ||
| + | [ "$(uci -q get system.@system[0].hostname)" | ||
| + | |||
| + | #disable olsrd6 (not used in ffgraz) | ||
| + | / | ||
| + | / | ||
| + | |||
| + | # / | ||
| + | uci del dhcp.@dnsmasq[0].server | ||
| + | uci del dhcp.@dnsmasq[0].address | ||
| + | uci del dhcp.@dnsmasq[0].filterwin2k | ||
| + | uci del dhcp.@dnsmasq[0].nonegcache | ||
| + | uci del dhcp.@dnsmasq[0].nonwildcard | ||
| + | uci del dhcp.@dnsmasq[0].filter_aaaa | ||
| + | uci del dhcp.@dnsmasq[0].filter_a | ||
| + | |||
| + | #set dns resolver to 10.12.0.10 | ||
| + | uci add_list dhcp.@dnsmasq[0].server=' | ||
| + | |||
| + | #enable reverse dns lookup for 10.12.xxx.xxx addresses | ||
| + | uci add_list dhcp.@dnsmasq[0].address='/ | ||
| + | uci set dhcp.@dnsmasq[0].boguspriv=' | ||
| + | |||
| + | uci del dhcp.free | ||
| + | |||
| + | uci set dhcp.free=dhcp | ||
| + | uci set dhcp.free.interface=' | ||
| + | uci set dhcp.free.start=' | ||
| + | uci set dhcp.free.limit=' | ||
| + | uci set dhcp.free.leasetime=' | ||
| + | uci add_list dhcp.free.dhcp_option=' | ||
| + | |||
| + | # / | ||
| + | while uci -q delete firewall.@zone[0]; | ||
| + | while uci -q delete firewall.@forwarding[0]; | ||
| + | while uci -q delete firewall.@nat[0]; | ||
| + | while uci -q delete firewall.@rule[0]; | ||
| + | uci set firewall.cfg01e63d.synflood_protect=' | ||
| + | uci add firewall zone # =cfg0edc81 | ||
| + | uci set firewall.@zone[-1].name=' | ||
| + | uci set firewall.@zone[-1].input=' | ||
| + | uci set firewall.@zone[-1].output=' | ||
| + | uci set firewall.@zone[-1].forward=' | ||
| + | uci add_list firewall.@zone[-1].network=' | ||
| + | uci add_list firewall.@zone[-1].network=' | ||
| + | |||
| + | uci add firewall zone | ||
| + | uci set firewall.@zone[-1].name=' | ||
| + | uci set firewall.@zone[-1].input=' | ||
| + | uci set firewall.@zone[-1].output=' | ||
| + | uci set firewall.@zone[-1].forward=' | ||
| + | uci add_list firewall.@zone[-1].network=' | ||
| + | |||
| + | uci add firewall rule # =cfg0f92bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].dest_port=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | |||
| + | uci add firewall rule # =cfg1092bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].dest_port=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | |||
| + | uci add firewall zone # =cfg11dc81 | ||
| + | uci set firewall.@zone[-1].name=' | ||
| + | uci set firewall.@zone[-1].input=' | ||
| + | uci set firewall.@zone[-1].output=' | ||
| + | uci set firewall.@zone[-1].forward=' | ||
| + | uci add_list firewall.@zone[-1].network=' | ||
| + | |||
| + | uci add firewall forwarding # =cfg13ad58 | ||
| + | uci set firewall.@forwarding[-1].src=' | ||
| + | uci set firewall.@forwarding[-1].dest=' | ||
| + | |||
| + | uci add firewall forwarding # =cfg12ad58 | ||
| + | uci set firewall.@forwarding[-1].src=' | ||
| + | uci set firewall.@forwarding[-1].dest=' | ||
| + | |||
| + | uci add firewall nat # =cfg1393c8 | ||
| + | uci set firewall.@nat[-1].name=' | ||
| + | uci add_list firewall.@nat[-1].proto=' | ||
| + | uci set firewall.@nat[-1].src=' | ||
| + | uci set firewall.@nat[-1].src_ip=' | ||
| + | uci set firewall.@nat[-1].target=' | ||
| + | |||
| + | uci add firewall nat # =cfg1393c8 | ||
| + | uci set firewall.@nat[-1].name=' | ||
| + | uci add_list firewall.@nat[-1].proto=' | ||
| + | uci set firewall.@nat[-1].src=' | ||
| + | uci set firewall.@nat[-1].src_ip=" | ||
| + | uci set firewall.@nat[-1].target=' | ||
| + | |||
| + | uci add firewall rule # =cfg1492bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].dest_port=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | |||
| + | |||
| + | uci add firewall rule # =cfg1592bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].dest_port=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | |||
| + | |||
| + | uci add firewall rule # =cfg1692bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | |||
| + | uci add firewall rule # =cfg1792bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | |||
| + | uci add firewall rule # =cfg0c92bd | ||
| + | uci set firewall.@rule[-1].name=' | ||
| + | uci add_list firewall.@rule[-1].proto=' | ||
| + | uci set firewall.@rule[-1].src=' | ||
| + | uci set firewall.@rule[-1].src_port=' | ||
| + | uci set firewall.@rule[-1].dest_port=' | ||
| + | uci set firewall.@rule[-1].target=' | ||
| + | |||
| + | # / | ||
| + | uci del network.wan | ||
| + | uci del network.wan6 | ||
| + | |||
| + | uci del network.lan.netmask | ||
| + | uci del network.lan.ipaddr | ||
| + | uci add_list network.lan.ipaddr=" | ||
| + | |||
| + | uci del network.globals.ula_prefix | ||
| + | uci set network.globals.packet_steering=' | ||
| + | |||
| + | uci add network device # =cfg080f15 | ||
| + | uci set network.@device[-1].type=' | ||
| + | uci set network.@device[-1].name=' | ||
| + | uci set network.@device[-1].bridge_empty=' | ||
| + | |||
| + | uci del network.free | ||
| + | uci set network.free=interface | ||
| + | uci set network.free.device=' | ||
| + | uci set network.free.proto=' | ||
| + | uci add_list network.free.ipaddr=' | ||
| + | |||
| + | # / | ||
| + | i=0 | ||
| + | while uci -q get " | ||
| + | do | ||
| + | uci set wireless.wifinetfree$i=wifi-iface | ||
| + | uci set wireless.wifinetfree$i.device=radio$i | ||
| + | uci set wireless.wifinetfree$i.mode=' | ||
| + | uci set wireless.wifinetfree$i.ssid=' | ||
| + | uci set wireless.wifinetfree$i.encryption=' | ||
| + | uci set wireless.wifinetfree$i.network=' | ||
| + | uci set wireless.wifinetfree$i.disabled=' | ||
| + | i=$(( $i + 1 )) | ||
| + | done | ||
| + | |||
| + | # / | ||
| + | uci del system.ntp.enabled | ||
| + | uci del system.ntp.enable_server | ||
| + | uci set system.cfg01e48a.hostname=$FF_HOSTNAME | ||
| + | uci set system.cfg01e48a.zonename=' | ||
| + | uci set system.cfg01e48a.timezone=' | ||
| + | uci set system.cfg01e48a.log_proto=' | ||
| + | uci set system.cfg01e48a.conloglevel=' | ||
| + | uci set system.cfg01e48a.cronloglevel=' | ||
| + | # / | ||
| + | |||
| + | while uci -q delete olsrd.@Interface[0]; | ||
| + | |||
| + | uci set olsrd.@LoadPlugin[-1].ignore=' | ||
| + | uci set olsrd.@LoadPlugin[-1].library=' | ||
| + | |||
| + | while uci -q delete olsrd.@InterfaceDefaults[0]; | ||
| + | uci add olsrd InterfaceDefaults | ||
| + | uci set olsrd.@InterfaceDefaults[-1].Mode=' | ||
| + | uci set olsrd.@InterfaceDefaults[-1].Ip4Broadcast=' | ||
| </ | </ | ||
| + | |||
| + | - Click on " | ||
| + | - Download the newly built custom sysupgrade image | ||
| + | - Log in to your router using the web interface ([[http:// | ||
| + | - Go to " | ||
| + | - Click on "Flash image" and select your newly downloaded sysupgrade image. | ||
| + | - Untick the box "Keep settings and retain the current configuration" | ||
| + | - Click " | ||
| + | |||
| + | |||
| + | ===== Accessing the router ===== | ||
| + | After the installation has completed the router should be reachable by connecting to it LAN port using the configured LAN_IP (192.168.10.1 as default). | ||
| - | ==== Display ==== | ||
| - | xxx | ||
| + | ===== TODO: add interfaces for olsrd, setup olsrd, setup wifi, setup free wifi ===== | ||
ffthemediumway.1761393794.txt · Last modified: by gabor
