[G1 Apps and Games] daniel.weck:
I get segmentation fault problems (as well as modprobe "not found" issues) with DroidWall's iptable since I compiled my own kernel and crafted my own initramfs ramdisc. Of course I double-checked that the kernel contains all the required dependencies for the "iptable" network utility (such as "xt_multiport" or "xt_owner", which are built directly into my kernel), and that my busybox installation is correct. I will continue investigating...

#/data/data/com.googlecode.droidwall.free/cache/iptables_n1 -V
modprobe: chdir(2.6.32.9): No such file or directory
Segmentation fault

UPDATE: I tried another iptables 1.4.7 binary (from an XDA ROM called "Eight-Minutes-to-Eight-oClock-AM"), and I also get a segfault.

I tried to compile my own iptables 1.4.7 binary from the Cyanogen source ( https://github.com/CyanogenMod/android_external_iptables

), but I get the dreaded "iphdr" redefinition error (which is actually easy to fix by editing "/usr/include/netinet/ip.h", but there are other configure/compile issues to overcome...I have not yet been able to generate the correct "iptable" binary using the ARM cross-compiler):

CC libipt_DNAT.oo
In file included from ../include/libiptc/ipt_kernel_headers.h:9,
from ../include/libiptc/libiptc.h:6,
from ../include/iptables.h:6,
from libipt_DNAT.c:8:
/usr/include/netinet/ip.h:47: error: redefinition of ‘struct iphdr’

#/system/bin/iptables -V
modprobe: chdir(2.6.32.9): No such file or directory
iptables v1.3.7

#/system/bin/iptables -t nat --flush
modprobe: chdir(2.6.32.9): No such file or directory

If I remove the /data/data/com.googlecode.droidwall.free/cache/busybox_g1 and iptables_n1 executables, and run the droidwall.sh script, here is what I get:

#. ./droidwall.sh
modprobe: chdir(2.6.32.9): No such file or directory
iptables v1.3.7
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
modprobe: chdir(2.6.32.9): No such file or directory
iptables: Protocol wrong type for socket

#/system/bin/iptables -t nat -L -n -v
modprobe: chdir(2.6.32.9): No such file or directory
Chain PREROUTING (policy ACCEPT 33 packets, 3735 bytes)
pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 295 packets, 16283 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 295 packets, 16283 bytes)
pkts bytes target prot opt in out source destination

Test in isolation:

#/system/bin/iptables -A droidwall-wifi -m owner --uid-owner 1014 -j RETURN
modprobe: chdir(2.6.32.9): No such file or directory
iptables: Protocol wrong type for socket

Checking modprobe:

#/system/xbin/modprobe -h
/system/xbin/modprobe: invalid option -- h
BusyBox v1.18.3 (2011-02-19 13:01:07 EST) multi-call binary.

Usage: modprobe [-alrqvsb] MODULE [symbol=value]...

Options:
-a Load multiple MODULEs
-l List (MODULE is a pattern)
-r Remove MODULE (stacks) or do autoclean
-q Quiet
-v Verbose
-s Log to syslog
-b Apply blacklist to module names too

#/sbin/modprobe -h
/sbin/modprobe: invalid option -- 'h'
BusyBox v1.19.0.git.adrynalyne (2010-12-21 22:03:30 MST) multi-call binary.

Usage: modprobe [-qfwrsv] MODULE [symbol=value]...

Options:
-r Remove MODULE (stacks) or do autoclean
-q Quiet
-v Verbose
-f Force
-w Wait for unload
-s Report via syslog instead of stderr

Checking lsmod:

#/sbin/lsmod
dhd 202550 0 - Live 0xbf1cb000
bthid 3960 0 - Live 0xbf194000
storage 1245 0 - Live 0xbf18e000 (P)
modemctl 6741 0 - Live 0xbf187000
svnet 21828 1 storage, Live 0xbf17a000
onedram 10325 2 modemctl,svnet, Live 0xbf171000
param 12109 0 - Live 0xbf169000 (P)
j4fs 63410 1 - Live 0xbf153000 (P)
rfs_fat 225391 5 - Live 0xbf110000 (P)
rfs_glue 70047 1 rfs_fat, Live 0xbf0f6000 (P)
fsr_stl 243293 6 j4fs, Live 0xbf0b3000 (P)
fsr 323575 3 storage,param,fsr_stl, Live 0xbf05d000 (P)
vibrator 6525 2 - Live 0xbf055000
s3c_bc 3260 0 - Live 0xbf04f000
s3c_lcd 5298 0 - Live 0xbf048000
pvrsrvkm 225440 42 s3c_bc,s3c_lcd, Live 0xbf000000

Checking kernel config (note that both

NETFILTER_XT_MATCH_MULTIPORT and NETFILTER_XT_MATCH_OWNER are set):

#zcat /proc/config.gz | grep NETFILTER
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
# CONFIG_NETFILTER_TPROXY is not set
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_DSCP=y
# CONFIG_NETFILTER_XT_TARGET_HL is not set
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
CONFIG_NETFILTER_XT_TARGET_RATEEST=y
CONFIG_NETFILTER_XT_TARGET_TRACE=y
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
CONFIG_NETFILTER_XT_MATCH_ESP=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_HL=y
# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_RATEEST=y
CONFIG_NETFILTER_XT_MATCH_REALM=y
# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
CONFIG_NETFILTER_XT_MATCH_SCTP=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
CONFIG_NETFILTER_XT_MATCH_TIME=y
CONFIG_NETFILTER_XT_MATCH_U32=y
# CONFIG_NETFILTER_XT_MATCH_OSF is not set