首先找到模块的名字,然后去源码中x86/x86_build/output/build/linux-4.0找到模块对应的iptable_nat.c文件
在x86/x86_build/output/build/linux-4.0/目录下grep -rn "iptable_nat.o"找到
x86/x86_build/output/build/linux-4.0/net/ipv4/netfilter/Makefile52: \
obj-$(CONFIG_IP_NF_NAT) \+= iptable_nat.o
得到配置变量是CONFIG_IP_NAT
继续在linux4.0下grep -rn "IP_NAT"
找到x86/x86_build/output/build/linux-4.0/output/build/linux-4.0/net/ipv4/netfilter/Kconfig:248:config IP_NF_NAT
config IP_NF_NAT
tristate "iptables NAT support" //即是内核中的开启该选项的地方
depends on NF_CONNTRACK_IPV4 //注意这些depend选项必须先打开才能看到你想要打开的选项
default m if NETFILTER_ADVANCED=n
select NF_NAT
select NF_NAT_IPV4
select NETFILTER_XT_NAT
help
This enables the `nat' table in iptables. This allows masquerading,
port forwarding and other forms of full Network Address Port
Translation.
To compile it as a module, choose M here. If unsure, say N.
if IP_NF_NAT
如何查找要编译的内核模块
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 1.早起,送小孩,准备办入台证的各种材料去扫描,买菜; 2.写计划; 3.去泡小报名,车上看基金豆的简书; 4.填...