networking:mikrotik:ipsec_tunnel_mikrotik_to_linksys_befvp41
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| networking:mikrotik:ipsec_tunnel_mikrotik_to_linksys_befvp41 [2016/03/02 11:03] – rplecko | networking:mikrotik:ipsec_tunnel_mikrotik_to_linksys_befvp41 [2016/03/08 12:11] (current) – rplecko | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| == Assumptions: | == Assumptions: | ||
| - | {{networking: | + | {{ networking: |
| ^ First location | ^ First location | ||
| Line 63: | Line 63: | ||
| </ | </ | ||
| + | === Second router configuration === | ||
| + | 1.IP address | ||
| + | < | ||
| + | /ip address | ||
| + | add address=10.10.2.254/ | ||
| + | add address=2.2.2.2/ | ||
| + | </ | ||
| + | 2.Default route | ||
| + | < | ||
| + | /ip route | ||
| + | add disabled=no distance=1 dst-address=0.0.0.0/ | ||
| + | | ||
| + | </ | ||
| + | 3.Note that NAT bypass for IPsec tunnels rule is on the top of the list !!! It is set for all 10.10.x.x networks but you can specify subnets individually. | ||
| + | < | ||
| + | /ip firewall nat | ||
| + | add action=accept chain=srcnat disabled=no dst-address=10.10.0.0/ | ||
| + | | ||
| + | add action=masquerade chain=srcnat disabled=no out-interface=ether4 | ||
| + | </ | ||
| + | 4.IPsec | ||
| + | < | ||
| + | /ip ipsec proposal | ||
| + | set default auth-algorithms=sha1 disabled=no enc-algorithms=3des lifetime=30m \ | ||
| + | | ||
| + | </ | ||
| + | 4.1.First tunnel - to Mikrotik router at 1.1.1.1 | ||
| + | < | ||
| + | /ip ipsec peer | ||
| + | add address=1.1.1.1/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | 4.2.Second tunnel - to Linksys router at 3.3.3.3 | ||
| + | < | ||
| + | /ip ipsec peer | ||
| + | add address=3.3.3.3/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | 4.3. IPsec policy | ||
| + | < | ||
| + | /ip ipsec policy | ||
| + | add action=encrypt disabled=no dst-address=10.10.1.0/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | add action=encrypt disabled=no dst-address=10.10.3.0/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | add action=masquerade chain=srcnat disabled=no out-interface=ether4 | ||
| + | </ | ||
| + | 5.Keep alive for Linksys router | ||
| + | < | ||
| + | /system scheduler | ||
| + | add disabled=no interval=30s name=" | ||
| + | " | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | When the tunnel is dropped on Mikrotik side, Linksys is unable to bring it up again even if the "keep alive" check box is properly checked. To circumvent this bug, the simplest way is to send a single ping from Mikrotik every 30 seconds. If the tunnel was droped in the meantime, this ping will bring it up again. | ||
| + | Be carefull what you are pinging and from which IP. Ping must be sourced from local private interface to remote private interface which can communicate only if the tunnel is established, | ||
| + | |||
| + | === Third router (BEFVP41) configuration === | ||
| + | {{ networking: | ||
| + | {{ networking: | ||
| + | {{ networking: | ||
| + | {{ networking: | ||
| + | This configuration was tested live on real equipment, and if it doesn' | ||
| + | If you think that there is the better way to do this, please feel free to comment. | ||
| + | Best of luck. | ||
networking/mikrotik/ipsec_tunnel_mikrotik_to_linksys_befvp41.1456916632.txt.gz · Last modified: 2016/03/02 11:03 (external edit)
