I'm trying to set up a really simple network topology, including two Ubuntu 16.04 as two hosts as follow:
VM1 <--> VM2
Both VMs are connecting to the VirtualBox host-only network with static IP address (10.0.0.1 and 10.0.0.2). The task here is that VM2 sends VM1 a packet with spoofed IP address (e.g., 10.0.0.3) and gets the returning packet. Sending a spoofed packet is easy, but I don't know how to get the returning packet because it will be sent to the spoofed address.
I'm thinking of having another VM acting as the router in the middle:
VM1 <--> Router <--> VM2
but not sure how to reroute all the outgoing traffic from VM1 to VM2?
Will appreciate any hint, including for the original problem because I stuck for few days and surprisingly there is no related question.