Community discussions

MikroTik App
 
sylaan
just joined
Topic Author
Posts: 13
Joined: Fri Jun 15, 2012 10:17 pm

IPSec VPN when remote network is 0.0.0.0

Mon Aug 27, 2012 9:58 am

Hi All,

I am evaluating a RB411-3G as a possible replacement for a combination of Cisco router + external 3G modem for some remote locations. The router has to build an IPSec VPN connection to a central Cisco ASA and tunnel everything through, that is corporate traffic and internet access. In Cisco world, this is a normal Remote Access VPN connection where the local network is something like 10.106.200.0/24 and the remote network (i.e. on the ASA side) is "any", i.e. 0.0.0.0.

The problem I am having is that whenever the IPSec connection is online, I lose all access to the Mikrotik router itself over IP. Traffic *through* the router works fine, I can reach IPs across the VPN tunnel,no problem there. But the only way to access the Mikrotik is via the console cable. It's not even possible over the MAC address.

After some digging around I identified the problem as being the ipsec policy. Whenever I disable the policy, the IP connectivity to the router comes up and I can access it fine via SSH/Winbox. The policy looks like this:
[admin@murs411U-3G] /ip ipsec policy> print detail  value-list
      src-address: 10.106.200.0/24
         src-port: any
      dst-address: 0.0.0.0/0
         dst-port: any
         protocol: all
           action: encrypt
            level: unique
  ipsec-protocols: esp
           tunnel: yes
   sa-src-address: 0.0.0.0
   sa-dst-address: <Cisco ASA Public IP>
         proposal: default
         priority: 0
If I change dst-address from 0.0.0.0 to some other network (i.e. the corporate B-Class) then it works, VPN stays up and works fine, I can still access the router itself from the local network. Internet access through the tunnel does not work anymore, obviously, which means this is not an acceptable solution.

Why am I losing connection to the router when the dst-address is 0.0.0.0/0 ? And how can I prevent that while still tunneling everything through the VPN ?

Best regards,
Sylaan
 
becs
MikroTik Support
MikroTik Support
Posts: 499
Joined: Thu Jul 07, 2011 8:26 am

Re: IPSec VPN when remote network is 0.0.0.0

Mon Aug 27, 2012 11:39 am

You need another policy which does not encrypt traffic destined back to 10.106.200.0/24 therefore allowing access to router.

Configuration with these two policies should work:
[admin@MikroTik] > ip ipsec policy print
Flags: X - disabled, D - dynamic, I - inactive 
 0   src-address=10.106.200.0/24 src-port=any dst-address=0.0.0.0/0 dst-port=any 
     protocol=all action=encrypt level=require ipsec-protocols=esp tunnel=yes 
     sa-src-address=0.0.0.0 sa-dst-address=<Cisco ASA Public IP> proposal=default 
     manual-sa=none priority=0 

 1   src-address=10.106.200.1/32 src-port=any dst-address=10.106.200.0/24 
     dst-port=any protocol=all action=none level=require ipsec-protocols=esp 
     tunnel=no sa-src-address=0.0.0.0 sa-dst-address=0.0.0.0 proposal=default 
     manual-sa=none priority=1 
Note: Remember to set higher priority for the second policy. Higher number - higher priority.
 
sylaan
just joined
Topic Author
Posts: 13
Joined: Fri Jun 15, 2012 10:17 pm

Re: IPSec VPN when remote network is 0.0.0.0

Mon Aug 27, 2012 2:55 pm

Thanks! I thought the solution should be something along those lines but I was not really sure how it could be implemented. I will give it a try and let you know.
 
sylaan
just joined
Topic Author
Posts: 13
Joined: Fri Jun 15, 2012 10:17 pm

[SOLVED] Re: IPSec VPN when remote network is 0.0.0.0

Tue Aug 28, 2012 4:51 pm

Works fine, thanks again becs.

Who is online

Users browsing this forum: Bing [Bot], CGGXANNX, sotahe9145, tdw and 234 guests