I am setting up a simulation environment using docker containers. I am able to send traffic across a client container to a server container via a WAN emulator.
Simulation setup
From the client container, I am able to ping the server container (10.202.0.1) and even do an iperf test. I am trying to something similar but from the clientTraffic container instead.
I am trying to send traffic from the clientTraffic container to eth3 in the client container, forward that traffic to tun0 (10.202.0.2).
I tried changing the iptable rules and able to send ping requests from clientTraffic (10.0.2.2) to server container (10.202.0.1)but don't get back any replies.
These are the rules I am adding
iptables -t nat -A PREROUTING -i eth3 -j DNAT --to-destination 10.202.0.1
iptables -t nat -A POSTROUTING -d 10.202.0.1 -j SNAT --to-source 10.0.2.2
No comments:
Post a Comment