0% found this document useful (0 votes)
174 views

Create An IPsec Tunnel Between 2 Mikrotik Routers and Dynamic Public IPs

This document describes how to create an IPsec tunnel between two Mikrotik routers that have dynamic public IPs. It involves creating an IPsec proposal, peer, policy, and NAT rules. A scheduler is also created to perform periodic DDNS updates to handle the dynamic public IPs.

Uploaded by

Ioannis Perperis
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views

Create An IPsec Tunnel Between 2 Mikrotik Routers and Dynamic Public IPs

This document describes how to create an IPsec tunnel between two Mikrotik routers that have dynamic public IPs. It involves creating an IPsec proposal, peer, policy, and NAT rules. A scheduler is also created to perform periodic DDNS updates to handle the dynamic public IPs.

Uploaded by

Ioannis Perperis
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

1 από 6 20/09/2020, 11:09 π.μ.


Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

/ip ipsec proposal add name=proposal1 auth­algorithms=md5 enc­algorithms=3des pfs­group=modp10


24 disabled=no

/ip ipsec peer add address=10.0.0.2 port=500 auth­method=pre­shared­key secret=test send­initi


al­contact=yes nat­traversal=no proposal­check=obey hash­algorithm=md5 enc­algorithm=3des dh­g
roup=modp1024 generate­policy=no comment="myIPsec"

/ip ipsec policy add action=encrypt disabled=no src­address=192.168.1.0/24 dst­address=192.16


8.2.0/24 level=require ipsec­protocols=esp protocol=all tunnel=yes sa­src­address=10.0.0.1 sa­
dst­address=10.0.0.2 proposal=proposal1 comment="myIPsec"

/ip firewall nat add chain=srcnat src­address=192.168.1.0/24 dst­address=192.168.2.0/24 place­


before=0 action=accept comment="IPsec traffic NAT bypass"

/ip firewall nat add chain=srcnat src­address=192.168.1.0/24 place­before=1 action=masquerade


comment="Masquerade internal network"

2 από 6 20/09/2020, 11:09 π.μ.


Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

3 από 6 20/09/2020, 11:09 π.μ.


Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

/log print

4 από 6 20/09/2020, 11:09 π.μ.


Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

/system scheduler add disabled=no interval=10m name=no­ip_ddns_scheduler on­event=”no­ip_ddns_


update” policy=read,write,test start­date=jan/01/1970 start­time=00:00:01

5 από 6 20/09/2020, 11:09 π.μ.


Create an IPsec tunnel between 2 Mikrotik routers and dynamic public IPs http://www.devcows.com/blog/create-an-ipsec-tunnel-between-2-mikrotik-routers-and-dynamic-publi...

/log print

6 από 6 20/09/2020, 11:09 π.μ.


This document was created with the Win2PDF “print to PDF” printer available at
http://www.win2pdf.com
This version of Win2PDF 10 is for evaluation and non-commercial use only.
This page will not be added after purchasing Win2PDF.
http://www.win2pdf.com/purchase/

You might also like