I already have a raspberry pi3, which is working as a router. There is also a bridge br0 to combine eth1 and wlan0 together. Now I want to use mitmproxy to check if some applications on my mobile phone have security issues.
I added two iptables entries on the raspberry:
iptables -t nat -D PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -D PREROUTING -i br0 -p tcp --dport 443 -j REDIRECT --to-port 8080
But now I don’t have any connection to the internet with my mobile phone… as example: google.com is running in a redirect loop
In the mitmproxy there’s the following error: Cannot connect to server, no server address given
Any tips how to troubleshoot/resolve this? What’s not clear for me at the moment: how can I setup the mitmproxy to log all communication (ports: 80,443) from my mobile phone and how does the mitmproxy know where to send the data when received from my mobile phone?