3

My host OS is: Linux Mint 15, my guest OS on virtualBox is: androVM. What I want to do is take all http/s traffic from androVM and tunnel it though mitmproxy. I am using the following, I usually connect to the internet via vpn (tun0). The virtualbox is attached to the NAT, tun0 interface. Here is the iptables script I am using, and yes I did install the cert on androVM via adb.

I am running the following bash script as follows:

#!/bin/sh
echo "Setting up IP tables"
echo "Resetting iptables rules"
iptables -t nat -F
echo "Now setting up ip forwarding rules"
sysctl -w net.ipv4.ip_forward=1
echo "Setting up the routing rules so all traffic from tun0(whatever interface) goes to mitmproxy"
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 443 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 80 -j REDIRECT --to-port 8080
echo "Completed task"



$ sudo ./iptables.sh
$ sudo mitmproxy

What happens at this point is the androVM won't even access the internet, I have previously used this and it has worked, maybe something else is doing on, any hints, clues or guidance would be appreciated.

Thanks

Nizam
  • 5,698
  • 9
  • 45
  • 57

0 Answers0