ssldump/docker/mirror_traffic_to_container.sh

9 lines
230 B
Bash
Raw Normal View History

#!/bin/bash
2023-08-14 13:20:01 +00:00
local_if=eth0
container_ip=172.17.0.2
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}