Diagram VPN site to site:
And a GIF showing what is happening.
I create an IP route like this:
sudo ip route add 192.168.1.0/24 via 10.132.146.166 eth0 eth1
And I have this iptable rules
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o eth1 -m policy --pol ipsec --dir in -j ACCEPT
What am I doing wrong?