This was somewhat laborious: I had a minimal working config and guided by the errors I received while trying to put up the
wireguard network interface I had to enable, one by one, kernel config options I was not familiar with, until
wireguard worked (options like, say,
I now want to automate the replication of this process on another machine as much as possible. That other laptop, in turn, has a relatively small custom-configured kernel; it is an entirely different machine, so
make localmodconfig on the current machine is not really an option, because I would then somehow have to merge the two configs anyway.
What I would like to achieve
I would like to have a process that takes a module name as input, as listed by
iptable_mangle) and gives me back the kernel option(s) relevant to enabling it (presumably
CONFIG_IP_NF_MANGLE=m in this case?).
I have tried
grepping for the kernel module
iptable_manglein the Linux source (
githubclone) in the hope of maybe finding something that links it to the corresponding kernel option;
modinfo <target module name>on the current machine, hoping that the displayed info would mention the kernel config option.
Neither of these works: the output doesn't mention
CONFIG_IP_NF_MANGLE in either case.