WorkingTipsOnVirtualNetworkCrossGFW
Oct 18, 2021
Technology
Environment Description
In virt-manager, create a new isolated virtual network via:

Create VM
Get the openwrt x86 images from:
wget https://downloads.openwrt.org/releases/21.02.0-rc4/targets/x86/64/openwrt-21.02.0-rc4-x86-64-generic-ext4-combined.img.gz
gunzip openwrt-21.02.0-rc4-x86-64-generic-ext4-combined.img.gz
mv /root/openwrt-21.02.0-rc4-x86-64-generic-ext4-combined.img /var/lib/libvirt/images
Create a new virtual machine using this image:

2-Core , 1024 MB:

Named it zzzz_OpenWRT:

Customize the vm, first define an ethernet card which use default network:

Add a second nic which uses isolated network:

Bootup the machine until you see:

You should use passwd for generating a new password for security.
Configure
Swith the eth0/eth1, cause eth0 will be the lan, while eth1 will be the wan.

Manually set the br-lan address via:
# vim /etc/config/network
- option ipaddr '192.168.1.1'
+ option ipaddr '10.17.18.254'
Login luci via:

Install redsocks via:
# opkg update
# opkg install redsocks
