I'm trying to build custom Kernel for my specific requirement where I need the chain MASQUERADE
to be available. I'm using https://github.com/microsoft/WSL2-Linux-Kernel to build my kernel.
I've set all the config I could find for MASQ
and MASQUERADE
to y
.
No matter how I build the Kernel, every time I run iptables -t nat -C POSTROUTING -s 10.33.33.1 -j MASQUERADE --wait
I get iptables v1.8.7 (nf_tables): Chain 'MASQUERADE' does not exist
. Same happens with iptables-legacy
.
I can't load any custom built kernel module either using insmod
or modprobe
.
Anyone got it to work or knows how to make it work? I tried building a Linux Kernel from kernel.org but as it turns out, it's not usable with WSL.