Thursday, 12 November 2015

IPsec VPN Mikrotik to Cisco


Not long ago I wrote an article on how to configure an IPsec VPN using Mikrotik and Linux devices. For today, I will replace the Linux device with a Cisco. I did test the entire construct in GNS3 integrated with Mikrotik.
The topology looks like this:
IPsec VPN Mikrotik Cisco
The red line represent the IPsec VPN tunnel.
Please note the used IP addresses. In this way the below configuration will be easier to understand.

Mikrotik Configuration

1. Firewal rules
By default, the Mikrotik comes with the INPUT channel that drop the connection incoming on ether1-gateway (which is the WAN interface). You need to be sure that at least the IPsec packets are able to be accepted inbound on the WAN interface, so the below rules needs to be placed before the rule dropping packets (the Firewal rules are checked top-down)
On INPUT channel allow the following on the interface facing Internet
– Port 500/UDP
– Port 4500/UDP
– Proto 50
– Proto 51
It may be that you don’t need all these ports, but you can close them later. You can check logs if you want to troubleshoot.
On NAT channel, SRCNAT you need have the rule involving interesting traffic (local LAN subnets for example) before NAT masquerade.
You need to add a rule with ACCEPT source LOCAL_LAN (192.168.88.0/24 in this example) destination REMOTE_LAN (192.168.0.0/24 in this example).
On Console the configuration looks like this:
CLI
2. The IPsec Proposal
GUI
IP > IPsec > Proposals
CLI
3. The IPsec Policy
GUI
IP > IPsec > Policies
CLI
4. The IPsec Peer
GUI
IP > IPsec > Peers
CLI

Cisco configuration

1. Crypto ISAKMP Policy
You can specify also the hash as sha1, but this is the default method on Cisco, so no extra line will appear.
2. Crypto ISAKMP neighbor
3. Crypto IPsec transformation set
4. Crypto map
5. Access-list for interesting traffic
6. Interface config
The settings (like encryption algorithm) can be tuned to fit your requirements.

No comments:

Post a Comment