Hi,
I’m trying to connect 2 distant LAN’s using one MK in each point. The 2 MK’s reach the Internet through ADSL modems but one of them (let’s call it Remote Router) has dynamic IP using PPPoe and the other has fixed IP (Local Router). I’m trying to set up the Local Router to generate automatically the ipsec policy because there is no known address in the remote side. I followed the Ref manual v2.9 example IPsec Between two Masquerading MikroTik Routers. Here is the scenario and configuration:
Local Router:
Public IP: 189.xxx.xxx.19
Local Net: 192.168.0.0/24
ip firewall nat add chain=srcnat src-address=192.168.0.0/24
... dst-address=192.168.10.0/24
/ip ipsec proposal
set default auth-algorithms=sha1 disabled=no enc-algorithms=3des lifetime=30m
name=default pfs-group=modp1024
/ip ipsec peer
add address=0.0.0.0/0:500 auth-method=pre-shared-key dh-group=modp1024
disabled=no dpd-interval=disable-dpd dpd-maximum-failures=1
enc-algorithm=3des exchange-mode=main generate-policy=yes hash-algorithm=
sha1 lifebytes=0 lifetime=1d nat-traversal=no proposal-check=obey secret=
“12345” send-initial-contact=no
Remote Router:
Public IP: dynamic using PPPoe client
Local Net: 192.168.10.0/24
ip firewall nat add chain=srcnat src-address=192.168.10.0/24
... dst-address=192.168.0.0/24
/ip ipsec proposal
set default auth-algorithms=sha1 disabled=no enc-algorithms=3des lifetime=30m
name=default pfs-group=modp1024
/ip ipsec peer
add address=189.xxx.xxx.19/32:500 auth-method=pre-shared-key dh-group=modp1024
disabled=no dpd-interval=disable-dpd dpd-maximum-failures=1
enc-algorithm=3des exchange-mode=main generate-policy=no hash-algorithm=
sha1 lifebytes=0 lifetime=1d nat-traversal=no proposal-check=obey secret=
“12345” send-initial-contact=yes
/ip ipsec policy
add action=encrypt disabled=no dst-address=192.168.0.0/24:any
ipsec-protocols=esp level=require priority=0 proposal=default protocol=
all sa-dst-address=189.xxx.xxx.19 sa-src-address=0.0.0.0 src-address=
192.168.10.0/24:any tunnel=yes
Please could one to help me why this is not working? I could only to make the tunnel if specifying in the policy either the src-address, sa-src-address with the real dynamic public IP and the dst-address/sa-dst-address with the public IP from Local Router. But this not desired obviously because I need the tunnel with the LAN addresses so I’ve configured them in the sa policy adresses
Any ideas?