I am more and less successfully coping with site-to-site ipsec tunnel where both routers have non-routable address on the WAN side, but have a public IP NATed to them.
I have started with basic setup from Greg's website http://gregsowell.com/, which (as expected) did not work rigth of. Then I started experimenting with different settings (based on what I have seen in the logs). I can't really say I knew exactly what I was doing, but I sort of had an idea why
Now I am in a situation, where I have tunnel established... better to say, I have 2 tunnels established. But it does not work, as I suppose that traffic (ping) is going one way through tunnel 1 and wants to return via tunnel 2, where it gets discarded. I really would prefer to have just one tunnel (if possible) and I am suspecting that some IP mangling needs to be done on the traffic (not ipsec interesting traffic, but the one leaving the router) to the other router.
Well, here is the setup:
Code: Select all
LAN1 <--------> LAN [Mikrotik 1] WAN -->>> Internet <<<-- WAN [Mikrotik 2] LAN <--------> LAN2
10.201.1.0/24 10.201.1.1 192.168.4.96 10.56.166.24 10.201.2.1 10.201.2.0/24
Mapped public IPs 1.1.1.1 2.2.2.2
Setup Mikrotik 1
Policy:
Src Address: 10.201.1.0/24
Dst Address: 10.201.2.0/24
SA Src Address: 192.168.4.96
SA Dst Address: 2.2.2.2
Peer:
Address: 2.2.2.2
Generate policy: no
Here I tried both of other settings: Port override, and Port strict. None of that helped.
Nat traversal: no
Setup Mikrotik 2
Policy:
Src Address: 10.201.2.0/24
Dst Address: 10.201.1.0/24
SA Src Address: 10.56.166.24
SA Dst Address: 1.1.1.1
Peer:
Address: 1.1.1.1
Generate policy: no
Here I tried both of other settings: Port override, and Port strict. None of that helped.
Nat traversal: no
All other settings are identical on both routers.
Perhaps I should mention that Firewall on both includes in srcnat Chain the definition:
Src address 10.201.1.0/24 (or 10.201.2.0/24)
Dst address 10.201.0.0/16
Action accept
Final note - yes, when pinging mikrotics I use source ip to be from LAN range. I also tried a client from LAN2 to ping mikrotik 1, but also no luck.
So this is where I stand and can't move on. I was thinking of mangling outgoing traffic to replace non-routable WAN ip with the public ip (I suppose only limiting to traffic destinned to 1.1.1.1, resp. 2.2.2.2). But I am not sure if it is the right way, neither how to do it.
Any your help is appreciated.
Cheers,
Brandon.