Quite often I find myself in the need in order to analyse traffic for applications on an jailbroken Android device which ignore the global system proxy settings.
In such cases I usually leverage iptables in order to send the traffic into a forwarding proxy by using:
1 |
iptables -A OUTPUT -t nat -p tcp --dport 80 -j DNAT --to-dest 127.0.0.1:1000 |
You have got to make sure that you configure the proper NAT routing though:
1 2 3 4 5 |
echo 1 > /proc/sys/net/ipv4/ip_forward iptables --table nat --append POSTROUTING --out-interface (EXT) -j MASQUERADE iptables --append FORWARD --in-interface (INT) -j ACCEPT |