Community discussions

MikroTik App
 
yaikun94
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue Nov 24, 2015 10:05 am

problem with vpn ipsec site to site

Thu Jun 02, 2016 9:00 am

i have 2 RB951 both config ipsec site to site. But both routers can't ping ip local of each other. Did i do something wrong??
Any ideas is helpful. Thanks in advance.
Router1:
-wan ip: 10.0.0.2/24
-local: 172.16.10.0/24
/ip firewall nat
 0    chain=srcnat action=accept src-address=172.16.10.0/24 
      dst-address=172.16.20.0/24 log=no log-prefix="" 

 1    chain=srcnat action=masquerade out-interface=ether1 log=no log-prefix=""
Router2:
-wan ip: 20.0.0.2/24
-local: 172.16.20.0/24
/ip firewall nat
 0    chain=srcnat action=accept src-address=172.16.20.0/24 
      dst-address=172.16.10.0/24 log=no log-prefix="" 

 1    chain=srcnat action=masquerade out-interface=ether1 log=no log-prefix=""
***ip sec config:
Router1
/ip ipsec peer
address=20.0.0.2/32 local-address=0.0.0.0 passive=no port=500 
      auth-method=pre-shared-key secret="test" generate-policy=no 
      policy-template-group=default exchange-mode=main send-initial-contact=yes 
      nat-traversal=yes proposal-check=obey hash-algorithm=md5 
      enc-algorithm=3des dh-group=modp1024 lifetime=1d lifebytes=0 
      dpd-interval=2m dpd-maximum-failures=5
 /ip ipsec proposal
 name="default" auth-algorithms=md5 enc-algorithms=3des lifetime=30m 
      pfs-group=modp1024 
 /ip ipsec policy
      src-address=172.16.10.0/24 src-port=any dst-address=172.16.20.0/24 
       dst-port=any protocol=all action=encrypt level=require 
       ipsec-protocols=esp tunnel=yes sa-src-address=10.0.0.2 
       sa-dst-address=20.0.0.2 proposal=default priority=0
Router2:
/ip ipsec peer
address=10.0.0.2/32 local-address=:: passive=no port=500 
      auth-method=pre-shared-key secret="test" generate-policy=no 
      policy-template-group=default exchange-mode=main send-initial-contact=yes 
      nat-traversal=yes proposal-check=obey hash-algorithm=md5 
      enc-algorithm=3des dh-group=modp1024 lifetime=1d lifebytes=0 
      dpd-interval=2m dpd-maximum-failures=5
/ip ipsec proposal
name="default" auth-algorithms=md5 enc-algorithms=3des lifetime=30m 
      pfs-group=modp1024
 /ip ipsec policy
  1     src-address=172.16.20.0/24 src-port=any dst-address=172.16.10.0/24 
       dst-port=any protocol=all action=encrypt level=require 
       ipsec-protocols=esp tunnel=yes sa-src-address=20.0.0.2 
       sa-dst-address=10.0.0.2 proposal=default priority=0
 
User avatar
emils
Forum Veteran
Forum Veteran
Posts: 906
Joined: Thu Dec 11, 2014 8:53 am

Re: problem with vpn ipsec site to site

Thu Jun 02, 2016 9:33 am

You need to specify src-address when pinging from the router.

From Router1:
/ping 172.16.20.X src-address=172.16.10.Y
You can also check IpSec "Remote peers" section for phase1 status and "Installed SA" for phase2 status.
 
yaikun94
Member Candidate
Member Candidate
Topic Author
Posts: 110
Joined: Tue Nov 24, 2015 10:05 am

Re: problem with vpn ipsec site to site

Thu Jun 02, 2016 9:51 am

You need to specify src-address when pinging from the router.

From Router1:
/ping 172.16.20.X src-address=172.16.10.Y
You can also check IpSec "Remote peers" section for phase1 status and "Installed SA" for phase2 status.
it's worked. Thanks alot
Silly me =.=!!!!!

Who is online

Users browsing this forum: sinateifouri and 182 guests