OpenWrt da zero: guida completa per principianti

OpenWrt da zero: guida completa per principianti

Obiettivo: portare un router supportato da OpenWrt da “zero” a router stabile e sicuro, con Wi-Fi, DHCP, aggiornamenti, backup e recupero. Per chi è: chi parte da firmware originale del produttore o da OpenWrt “vergine”.

Checklist iniziale

  • Router supportato OpenWrt (GL.iNet è l’opzione più semplice perché nasce già con OpenWrt).
  • PC + cavo Ethernet; modem/ONT dell’ISP; eventuali credenziali PPPoE.

Hardware consigliato

Trasparenza: link affiliati Amazon; potrei ricevere una piccola commissione sugli acquisti idonei.

A) Installazione / Flash

  1. Reset (opzionale), scarica l’immagine factory.bin corretta dal sito OpenWrt.
  2. Dal pannello originale: Firmware Upgrade → carica file → riavvia su 192.168.1.1.
  3. Su GL.iNet spesso OpenWrt è già presente (UI GL + LuCI).

B) Primo accesso e password

  1. PC su LAN → http://192.168.1.1.
  2. Imposta password forte per root.
  3. Timezone Europe/Rome (LuCI → System → System).

C) WAN: PPPoE/DHCP/VLAN

Esempio UCI PPPoE + VLAN 835:

uci set network.wan=interface
uci set network.wan.proto='pppoe'
uci set network.wan.username='tuo@utente'
uci set network.wan.password='tua_password'
uci set network.wan.device='eth0.835'     # VLAN 835 sulla porta WAN
uci commit network
/etc/init.d/network restart

D) LAN, DHCP e IP del router

Default: 192.168.1.1/24. Per 192.168.10.1/24:

uci set network.lan.ipaddr='192.168.10.1'
uci set network.lan.netmask='255.255.255.0'
uci commit network
/etc/init.d/network restart

E) Wi-Fi 2.4/5 GHz

  1. Network → Wireless → SSID (es. Casa_2G, Casa_5G).
  2. Sicurezza: WPA2-PSK o WPA2/WPA3 mixed.
  3. Canale auto (poi ottimizza).

F) Pacchetti utili

opkg update
opkg install luci-app-wireguard luci-app-sqm luci-app-statistics

G) SQM (cake)

  1. Installa luci-app-sqm.
  2. Network → SQM QoS → device WAN; inserisci banda reale; queue cake.

H) Backup & Failsafe

System → Backup/Flash Firmware → Generate archive. Per reset emergenza: Failsafe Mode → firstboot && reboot.

Link utili

Torna in alto