Hi Amitsharma, I'm sorry I have been away for a while. I fixed up the arp problem somehow I think, and I have been trying the iptables rule that you suggested.
I'll draw the connection again just to refresh our memory since it's been a while now.
PC1-eth0 -----> PC2-eth0 ---
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
PC1-eth1 <----- PC2-eth1 <--
At PC2, I used the following iptables rules that you suggested:
#iptables -t nat -A PREROUTING -p udp -d PC2-eth0-ip -j DNAT --to-destination PC1-eth1-ip
#iptables -A OUTPUT -p udp -o eth0 -j DROP
It still didnt work. Then, I looked at your tutorial and added the following rule (I specified no gateway):
#iptables -t nat -A POSTROUTING -p udp -d PC1-eth1-ip -j SNAT --to-source PC2-eth1-ip
I think the connection works now. With a packet capture program, I can now capture packets at PC1 however the packets destinations are still listed as PC2-eth0-ip, although they are captured at PC1.
What do you think? Is there any way to do a check at PC1-eth1 if it received any packet from PC2-eth1?
Thank you very much for your help.
|