3

我的主机操作系统是:Linux Mint 15,我在 virtualBox 上的客户操作系统是:androVM。我想要做的是从 androVM 获取所有 http/s 流量并通过 mitmproxy 将其隧道化。我正在使用以下内容,我通常通过 vpn (tun0) 连接到互联网。virtualbox 连接到 NAT,tun0 接口。这是我正在使用的 iptables 脚本,是的,我确实通过 adb 在 androVM 上安装了证书。

我正在运行以下 bash 脚本,如下所示:

#!/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

此时发生的情况是 androVM 甚至无法访问互联网,我以前使用过它并且它已经工作了,也许正在做其他事情,任何提示、线索或指导将不胜感激。

谢谢

4

0 回答 0