Skip to content

Instantly share code, notes, and snippets.

@shyba
Last active December 30, 2022 19:07
Show Gist options
  • Save shyba/8f5f88329de01b212eb5f06aa7bfdd3d to your computer and use it in GitHub Desktop.
Save shyba/8f5f88329de01b212eb5f06aa7bfdd3d to your computer and use it in GitHub Desktop.
Openwrt cheatsheet for stuff I do often

Openwrt cheatsheet for stuff I do often

set router ip address and bring network up

uci set network.lan.ipaddr=x.x.x.x
uci commit
ifup lan

set router ip and default route in failsafe

ip addr add x.x.x.x/24 dev eth0
ip route add default via x.x.x.x

copy-pastable steps to compile from source

git clone https://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
 
make menuconfig

Choose router model, etc

Optional:

make -j $(nproc) kernel_menuconfig

Finish

make -j $(nproc) defconfig download clean
make -j $(nproc) world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment