I have three routers, A B and C.
A=192.168.10.0/24
B=192.168.11.0/24
C=192.168.12.0/24
A is the Main Site that has IPsec with B and C, everything is working fine and I can ping from A to B and from A to C.
But I Can not ping between B and C.
there is a way to ping between B and C by adding policies from both sides, but I want to ping between B and C through A.
there are many topics regarding this issue by using L2tp and OSPF.
is there any way to accomplish it by IPsec itself without using L2tp throw a firewall or route?
That’s correct, there will be no direct Security Association (“tunnel”) between B and C. The B<->C policy between A and B will deliver packets for C from B to A, and the B<->C policy between A and C will deliver them from A further to C.
On A, add two policies: dst-address=192.168.11.0/24 peer=peer1 proposal=proposal1 src-address=192.168.12.0/24 tunnel=yes
dst-address=192.168.12.0/24 peer=peer2 proposal=proposal1 src-address=192.168.11.0/24 tunnel=yes
On B, add one policy: dst-address=192.168.12.0/24 peer=peer1 proposal=proposal1 src-address=192.168.11.0/24 tunnel=yes
On C, add one policy: dst-address=192.168.11.0/24 peer=peer1 proposal=proposal1 src-address=192.168.12.0/24 tunnel=yes