So I have a few docker containers running and each of them configured to use a certain network interface for outgoing traffic.
Let's say for an example that there is a docker network called docker_1 , using interface eth1 and I have marked its outgoing traffic with 0x0c3f (--set-mark 0x0c3f).
Now, if eth1 is down the container will default to use eth0 instead for outgoing traffic, this is unwanted behavior. I would like for the container to never use eth0 even if eth1 is unavailable.
I have tried running:
iptables -t filter -I OUTPUT -p tcp -o eth0 -m mark --mark 0x0c3f -j REJECT
It does not work.
Does anyone have any idea of what is not working properly?