So I enable NETFILTER in kernel, and build the kernel.
But when I typed "iptables -L" in adb shell.
It always promoted:
iptables v1.3.7: can't initialize iptables table `filter': iptables
who? (do you
need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Does anyone know what the problem?
thanks!
On 29 Jan., 09:22, Alpha Jin <alphali...@gmail.com> wrote:
> I just wanted to use iptables in android
>
> So I enable NETFILTER in kernel, and build the kernel.
>
> But when I typed "iptables -L" in adb shell.
> It always promoted:
>
> iptables v1.3.7: can't initialize iptables table `filter': iptables
> who? (do you
> need to insmod?)
The dependencies aren't that great... for intance, to do basic
tethering you'll need:
insmod /system/libmodules/nf_conntrack.ko
insmod /system/libmodules/nf_conntrack_ipv4.ko
insmod /system/libmodules/nf_nat.ko
insmod /system/libmodules/x_tables.ko
insmod /system/libmodules/ip_tables.ko
insmod /system/libmodules/xt_multiport.ko
insmod /system/libmodules/iptable_filter.ko
insmod /system/libmodules/iptable_nat.ko
insmod /system/libmodules/ipt_MASQUERADE.ko
insmod /system/libmodules/xt_state.ko
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
I think CONFIG_NETFILTER needs to be set in your kernel config.
--
Best regards,
nfsnfs
> I don't understand, could you please describe it in details?Thanks!
Those are the modules which are needed to setup the filter table. The
corresponding .config entries:
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
#
# Core Netfilter Configuration
#
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NETFILTER_XTABLES=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
#
# IP: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_FILTER=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m