linux – Iptables Forward All traffic to different interface except local inter-lan

I have Two LAN

Local LAN: with gw

Remote LAN : with gw

both lan can communicate and ping each other devices.

i have introduce new machine and set all devices gateway to this ip.

I need to to forward all traffic to’s eth0 >>> tun0 interface except there local inter-lan communication.

So what i have done till now is

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
ip route add -net gw dev eth0 metric 101

So after this i am able to ping from network to and vice versa

but when the tun0 interface create after connecting to the vpn only one way ping happen to NOT vice versa.

What else can i do so that it can ping each other network even after connecting to vpn(tun0 interface)?