- I have server A: memcache server 10.0.0.1:11211
- I have server B: memcache server 192.168.0.1:11211
- I have full access to server A. I have no access to server B
I want to replicate traffic received on 10.0.0.1:11211 to 192.168.0.1:11211
I have set a this rule:
iptables -t mangle -A PREROUTING -i eth0 -p TCP --dport 11211 -j TEE --gateway 192.168.0.1
I can see server B receive the packet, however the destination IP is still 10.0.0.1
How can I modify the packet on server A so it goes to the network with 192.168.0.1 destination IP ?
answering myself: never succeeded with iptables. maybe it's impossible because of TCP connected state.
instead, got it working with https://github.com/RobinUS2/teecp