I have a system in which I have two NIC cards enp2s0 and enp3s0. Each of the NIC card is connected to packet generator. The packet generator will generate the packets and sent it to enp2s0 and I want to forward the packets from enp2s0 to enps30, whcih later on passes it to the packet generator. I am able to transmit the packet till enp2s0 from the packet generator, but I am not able to forward it.
I have tried running the below commands:
Open /etc/sysctl.conf and uncomment net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING --out-interface enp2s0 -j MASQUERADE
sudo iptables -A FORWARD --in-interface enp3s0 -j ACCEPT
​But still I see not changes.