I have two machines each with two valid network interfaces, an Ethernet interface eth0
and a tun/tap interface gr0
. The goal is to start a TCP connection on machine A using interface gr0
but then have the responses (ACKs, etc) from machine B come back over the Ethernet interface, eth0
. So, machine A sends out a SYN on gr0
and machine B receives the SYN on its own gr0
but then sends its SYN/ACK back through eth0
. The tun/tap device is a GNU Radio wireless link and we just want the responses to come through the Ethernet.
What's the easiest way to accomplish this? I need to research more on TCP/IP, but I was initially thinking that source-spoofing outgoing packets would tell the receiver to respond to the spoofed address (which should get routed to eth0
). This would involve routing the IPs from the tun/tap interfaces through gr0
and leave the other traffic to eth0
.
We are using Linux and a Python solution would be preferable.
Thanks for looking!