How to apply a NAT with source restrictions at iptables
I have a computer with two interfaces (eth0 and eth1), eth0 is connected with a local network and eth1 is connected to the internet, also it implements a NAT in the interface eth1. Nevertheless, I'm trying to create spoofed packets with sockets raw in the computer that runs the NAT and send the packets to the interface eth1. The problem is that the NAT is changing the IP source to the real one before send the packets.
So, anyone have any idea how can I implements the NAT in eth1 but only apply the NAT to the packets that are from/to eth0?
I was thinking in something like (I am really newbie with iptables):
iptables -t nat -A POSTROUTING -o eth1 -i eth0 -j MASQUERADE
Well, it didn't work.