Thursday, October 8, 2026

Alpine wsl

usbipd -b 2-1

usbipd attach -b 2-1 -w alpine


su-d

modprobe ax88179_178a

ip addr flush dev eth1

ip addr add 192.168.137.1/24 dev eth1

ip link set eth1 up


echo 1 > /proc/sys/net/ipv4/ip_forward


echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/99-forward.conf


apk add iptables

iptables -t nat -A POSTROUTING -s 192.168.137.0/24 -o eth0 -j MASQUERADE

iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT

iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT


apk add dnsmasq

cat > /etc/dnsmasq.conf <<'EOF'

interface=eth1

bind-interfaces

dhcp-range=192.168.137.10,192.168.137.100,255.255.255.0,12h

dhcp-option=option:router,192.168.137.1

dhcp-option=option:dns-server,192.168.137.1

server=1.1.1.1

EOF


rc-service dnsmasq start

rc-update add dnsmasq


dnsmasq --conf-file=/etc/dnsmasq.conf