Hi,
i would like to built a ipsec vpn connection between two mikrotik routers with PSK.
LAN1 (192.168.1.0/24) <—> MikroTik1 <—> Internet <—> MikroTik2 <—> LAN2 (192.168.2.0/24)
The private IP on MikroTik1 is 192.168.1.1 (ether1).
The public IP on MikroTik1 is 172.16.0.1/24 (ether2).
The private IP on MikroTik2 is 192.168.2.1 (ether1).
The public IP on MikroTik2 is 172.16.0.2/24 (ether2).
So, I tried the following configuration after a system reset-configuration:
MikroTik1:
ip ipsec proposal print
→
0 name=“default” auth-algorithms=md5,sha1 enc-algorithms=3des lifetime=30m
pfs-group=modp1024
ip ipsec peer print
→
0 address=172.16.0.2/32:500 auth-method=pre-shared-key
secret=“asdfasdfasdf” generate-policy=no exchange-mode=main
send-initial-contact=yes nat-traversal=no proposal-check=obey
hash-algorithm=md5 enc-algorithm=3des dh-group=modp1024 lifetime=1d
lifebytes=0 dpd-interval=20s dpd-maximum-failures=1
ip ipsec policy print
→
0 src-address=192.168.1.0/24:any dst-address=192.168.2.0/24:any
protocol=all action=encrypt level=require ipsec-protocols=esp tunnel=yes
sa-src-address=172.16.0.1 sa-dst-address=172.16.0.2
proposal=default manual-sa=none priority=0
MikroTik2:
ip ipsec proposal print
→
0 name=“default” auth-algorithms=md5,sha1 enc-algorithms=3des lifetime=30m
pfs-group=modp1024
ip ipsec peer print
→
0 address=172.16.0.1/32:500 auth-method=pre-shared-key
secret=“asdfasdfasdf” generate-policy=no exchange-mode=main
send-initial-contact=yes nat-traversal=no proposal-check=obey
hash-algorithm=md5 enc-algorithm=3des dh-group=modp1024 lifetime=1d
lifebytes=0 dpd-interval=20s dpd-maximum-failures=1
ip ipsec policy print
→
0 src-address=192.168.2.0/24:any dst-address=192.168.1.0/24:any
protocol=all action=encrypt level=require ipsec-protocols=esp tunnel=yes
sa-src-address=172.16.0.2 sa-dst-address=172.16.0.1
proposal=default manual-sa=none priority=0
That’s my configuration. If I try a ping from 192.168.1.1 to 192.168.2.1 I get “no route to host”. If I add a default gateway to an adress, that doesn’t exist, the vpn-tunnel get startet and is established. Now I can ping from 192.168.1.1 to 192.168.2.1, but I CAN’T ping from 192.168.2.1 to 192.168.1.1 (TimeOut).
What should I do to ping in both directions? Is there any possibility to start up or abort the tunnel like “ipsec auto --verbose --down connectionname”? Please help me. I try this example since 4 weeks…
Eric