Extract traffic mirroring commands from docker run scripts

This commit is contained in:
William Robinet 2021-03-24 17:47:06 +01:00
parent 15ad7190fb
commit 850ab0acb3
8 changed files with 8 additions and 56 deletions

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-bullseye
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-buster
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-stretch
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,8 @@
#!/bin/bash
local_if=ens3f0
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}

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-bionic
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-focal
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-groovy
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -1,15 +1,7 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-xenial
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}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1