Docker container traffic through mitmproxy

I am trying to set up a mitm using only docker containers. I want to have mitmproxy running inside a container and I want it to be able to sniff the packets that are coming and going from another docker container. Outside of docker containers this requires some editing of iptables. I want to be able to mitm a container and see its traffic from another container. Here is a link to what I want to be able to do: http://blog.philippheckel.com/2013/07/01/how-to-use-mitmproxy-to-read-and-modify-https-traffic-of-your-phone/

Any ideas on what might be a possible solution? Also, I would like to avoid running either of the containers in privileged mode.

1 Like