Skip to content

Instantly share code, notes, and snippets.

@vimagick
Last active October 26, 2026 06:14
Show Gist options
  • Select an option

  • Save vimagick/e9817be67ca782d0a75dcfab23ba7ad4 to your computer and use it in GitHub Desktop.

Select an option

Save vimagick/e9817be67ca782d0a75dcfab23ba7ad4 to your computer and use it in GitHub Desktop.
OpenWrt on Hype-V

Create External Switch

image

Download OpenWrt VHDX

https://github.com/vimagick/rpi-bin/actions/workflows/build-openwrt-vdisk.yaml

Create Virtual Machine

image

First Time Setup

uci set network.lan.proto=dhcp
uci delete network.lan.ipaddr
uci delete network.lan.netmask
uci delete network.lan.gateway
uci delete network.lan.dns
uci set dhcp.lan.ignore=1
uci changes
uci commit
service network restart
service dnsmasq restart
ifconfig br-lan

Tip

OpenWrt LuCI web interface: http://192.168.100.172

Firewall Setup

https://gist.github.com/vimagick/4b613316a17e626d8676d2a1f41e1406

Test on RaspberryPi

# change default gateway from 192.168.100.1 to 192.168.100.172
sudo ip route replace default via 192.168.100.172 dev eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment