OpenWRT
Hardware considerations
- Ansible: min. 128 MB Storage/128 MB RAM to be able to use advanced Ansible collections like imp1sh/ansible_openwrt
- Tailscale:
Tailscale cannot be installed on devices with 16MB or less of flash memory
First setup
- Set root-pw
- Set IP, reboot
- add ssh key
- Login in via ssh
Install packages:
opkg update
opkg install git tmux
- Check in
/etc
cd /etc
git init .
git add .
git commit -m'Initial commit'
Upgrade all packages
Since OpenWrt firmware stores the base system in a compressed read-only partition, any update to base system packages will be written in the read-write partition and therefore use more space than it would if it was just overwriting the older version in the compressed base system partition. It's recommended to check the available space in internal flash memory and the space requirements for updates of base system packages.
Run in tmux (!):
tmux
opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
reboot
Add packages
Basics
opkg install curl luci-app-ddns luci-app-upnp screen rsync
openssh
opkg openssh-client openssh-sftp-server
Wlan uplink
- Connect to client Wi-Fi networkhttp://192.168.8.1/
- Network/Wireless
- Scan
- Join Network
Recovery
Failsafe mode
Failsafe mode is useful if you have lost control of your device, and it has become inaccessible, perhaps through a configuration error. It allows you to reboot the router into a basic operating state, retaining all your packages and (most) settings.
Power on the device, wait for a flashing LED and press a button. This can be the WPS, Reset, or other button on the device.
The LEDs provide clues for timing the button press. Watch the LED blinking speeds immediately after powering up the router. Most routers show three different (power) LED blinking speeds during boot:
- A power-on sequence of lights that is specific to the device's bootloader
- Then a semi-rapid 5-per-second blinking rhythm during four seconds, while router waits for a button press
- Then either:
- A really fast 10-per-second blink if failsafe mode was triggered. The device is listening on 192.168.1.1
- A slower, 2.5-per-second blink continuing to the end of normal boot, if the failsafe was not triggered
Then ssh into the device: ssh root@192.168.1.1 (no password needed)