[Android Software Development] Sapiem:
Nothing, step by step as you explain....

My kernel can use iptables because before I use ProxyDroid until one day. I have iptables 1.4.7 in my system.

iptables -L and iptables -t NAT -L show only standard chains empty....

This is the log from SandroProxy 1.4.78

Proxy listening on 127.0.0.1:8010

Proxy listening on 127.0.0.1:8009

Proxy listening on 127.0.0.1:8008

Using CA from file: /mnt/sdcard/Android/data/org.sandroproxy/cache/.keystoreca

CA cert exported to /mnt/sdcard/Android/data/org.sandroproxy/cache/.keystoreca_export.crt

Loading keys from /mnt/sdcard/Android/data/org.sandroproxy/cache/.keystoreca

Using /mnt/sdcard/Android/data/org.sandroproxy/cache for data storage

client cert file name is not valid so it will not be used:

using ssl os trust managers

#attach sandroproxy to INPUT chain

/data/data/org.sandroproxy/files/iptables_armv7 -A INPUT -j sandroproxy

- successful.

#attach sandroproxy to nat PREROUTING chain

/data/data/org.sandroproxy/files/iptables_armv7 -t nat -A PREROUTING -j sandroproxy

- successful.

#attach sandrop_proc to nat OUTPUT chain

/data/data/org.sandroproxy/files/iptables_armv7 -t nat -A OUTPUT -j sandrop_proc

- successful.

#redirect outbound port from 443 to 127.0.0.1:8010

/data/data/org.sandroproxy/files/iptables_armv7 -t nat -A sandrop_proc -m owner ! --uid-owner 10106 -p tcp --dport 443 -j DNAT --to 127.0.0.1:8010

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#redirect outbound port from 80 to 127.0.0.1:8009

/data/data/org.sandroproxy/files/iptables_armv7 -t nat -A sandrop_proc -m owner ! --uid-owner 10106 -p tcp --dport 80 -j DNAT --to 127.0.0.1:8009

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#create sandro_proc chain

/data/data/org.sandroproxy/files/iptables_armv7 -t nat --new sandrop_proc

- successful.

#list of iptables

/data/data/org.sandroproxy/files/iptables_armv7 -L

Chain INPUT (policy ACCEPT)

target prot opt source destination

Chain FORWARD (policy ACCEPT)

target prot opt source destination

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

Chain sandroproxy (0 references)

target prot opt source destination

ACCEPT tcp -- anywhere anywhere tcp dpt:www

ACCEPT tcp -- anywhere anywhere tcp dpt:https

FIX ME! implement getprotobynumber() bionic/libc/bionic/stubs.c:384

FIX ME! implement getprotobynumber() bionic/libc/bionic/stubs.c:384

- successful.

#list of iptables nat

/data/data/org.sandroproxy/files/iptables_armv7 -L -t nat

Chain PREROUTING (policy ACCEPT)

target prot opt source destination

Chain INPUT (policy ACCEPT)

target prot opt source destination

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

Chain POSTROUTING (policy ACCEPT)

target prot opt source destination

Chain sandroproxy (0 references)

target prot opt source destination

REDIRECT tcp -- anywhere anywhere tcp dpt:www redir ports 8009

REDIRECT tcp -- anywhere anywhere tcp dpt:https redir ports 8010

FIX ME! implement getprotobynumber() bionic/libc/bionic/stubs.c:384

FIX ME! implement getprotobynumber() bionic/libc/bionic/stubs.c:384

- successful.

#redirect 443 to 8010

/data/data/org.sandroproxy/files/iptables_armv7 -A sandroproxy -t nat -p tcp --dport 443 -j REDIRECT --to-port 8010

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#redirect 80 to 8009

/data/data/org.sandroproxy/files/iptables_armv7 -A sandroproxy -t nat -p tcp --dport 80 -j REDIRECT --to-port 8009

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#create sandroproxy chain, , it could fail if already exist

/data/data/org.sandroproxy/files/iptables_armv7 -t nat --new sandroproxy

- successful.

#accept connection on port 443

/data/data/org.sandroproxy/files/iptables_armv7 -A sandroproxy -p tcp --dport 443 -j ACCEPT

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#accept connection on port 80

/data/data/org.sandroproxy/files/iptables_armv7 -A sandroproxy -p tcp --dport 80 -j ACCEPT

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

- successful.

#create sandroproxy chain, it could fail if already exist

/data/data/org.sandroproxy/files/iptables_armv7 --new sandroproxy

- successful.