IPsec site 2 site VPN. Ping fails in one direction.

Hi,

I’ve configured an IPsec Site 2 site VPN connection between a public Cloud and my on premise environment. Weird thing: PING only works in one direction. I’m able to ping from my on premise environment to virtual machines in the Cloud.

But when I try to ping from the Cloud to my machines on premise it fails.

I don’t think it is a firewall problem because a ping from the Cloud side to the Mikrotik router on premise is succesfull:

Maybe the reply of the device behind the Mikrotik router somehow gets lost and is not delivered at the device that initiated the ping on the public cloud side. A routing problem? Shouldn’t this be covered by the config of the VPN at the Mikrotik side (IPsec policy)?

Probably something tiny I missed somehow. But what did I miss or do wrong? Hope someone is able to help.

Thanks in advance.

Peter

Without seeing more details, it looks like you need to ensure that you have a route back across the tunnel for the return traffic.

Check this @ 3/4 of text or search “Site to Site IpSec Tunnel”: http://wiki.mikrotik.com/wiki/Manual:IP/IPsec

Hi,
What kind of route should that be? I could not find a requirement for adding a specific route for return traffic in the guidelines. I’ve used this part of the Mikrotik manual as reference: http://wiki.mikrotik.com/wiki/Manual:IP/IPsec#Site_to_Site_IpSec_Tunnel

I had the same problem, switched to EOIP tunnels and made both sites the same IP range, working fine now.

Hi,

Thanks for your help! The other side of my Site 2 site connection is Microsoft Public Cloud Azure. I don’t think they are supporting EOIP tunnels. Is there an alternative to solving this issue, I can do on the MikroTik side without the need to change technologies or protocols at the Microsoft side?

Peter

Bedankt!

I have never tried a tunnel from a Mikrotik to any other router.

Greg Sowell has examples of IPsec and IPIP tunnels from Mikrotik to Cisco on his site.

http://gregsowell.com/?p=1290

Hi,

Yes I know the site of Greg. Followed some of his video’s. The weird thing is it’s almost working perfect. I can even ping my router from the public cloud (azure) side. I recently changed all IP spaces on public cloud side so they are now more similar to the on premise side. But all though everything was changed and re-configured with the new IP space the result is still exactly the same:

  1. Ping from Azure VM to Mikrotik router is succesfull
  2. Ping from device behind Mikrotik router to Azure VM is succesfull
  3. RDP session from device behind Mikrotik router to Azure VM is succesfull
  4. Ping to on premise device (behind the Mikrotik router) from Azure VM fails

Hi,

Did you find the solution?

I have the same problem. I’ve configured an IPsec Site 2 site VPN connection between HQ and remote office. I’m using RB2011iL-IN in both offices. PING only works in one direction. I’m able to ping from my on HQ to remote office. Not just that I’m able to connect to any pc from the HQ to remote office. From remote office I can not ping or connect to for example MainServer.

Thanks in advance.

Hi Ekobravo,

No solution yet. As you have the same issue maybe it’s not supported on the MikroTik side or some kind of bug in the MikroTik router product?

This is the configuration on MikroTik side I'm using:

feb/16/2016 14:01:57 by RouterOS 6.33.5

/ip ipsec policy group
set
/ip ipsec proposal
set [ find default=yes ] disabled=yes enc-algorithms=aes-128-ctr lifetime=10m
pfs-group=none
add enc-algorithms=3des lifetime=1h name="Azure Site 2 Site VPN" pfs-group=
none
/ip ipsec peer
add address=.../32 enc-algorithm=3des nat-traversal=no secret=
******* send-initial-contact=no
/ip ipsec policy
set 0 disabled=yes dst-address=0.0.0.0/32 src-address=0.0.0.0/32
add dst-address=192.168.4.0/22 proposal="Azure Site 2 Site VPN"
sa-dst-address=... sa-src-address=... src-address=
192.168.0.0/22 tunnel=yes

I’m using similar configuration. Try so far probably 4-5 times with even different routers. This is my first IPces configuration. I managed to setup PPTP, EOIP, EOIP over PPTP etc. (for different customer) and it’s working fine.

This is what I don’t get. Why MikroTik help doesn’t want to help? It is beyond believe. If is something (like for example) hardware doesn’t support this they should come and say it. Or if there is solution… they should know…tell us. It is unbelievable.

Thanks for your reply look like we are on our own on this.

P.S. If you find solution please post it. THANKS

These are sites I looked at when I was trying to get IPsec tunnel working. I noticed most seemed to be version 5 software, maybe that’s the key.

http://wiki.mikrotik.com/wiki/Securing_L2TP_Server_for_IPSec

https://www.youtube.com/watch?v=oR4G6SZ3LcM

https://www.youtube.com/watch?v=y68Dx8iPikA

https://www.youtube.com/watch?v=UZ2pIC0EuHs

Hi,

I’m a bit further than that: I can ping in both directions but not yet really use it:

This is the config:

Home Range: 192.168.1.0/24
Azure Network Range: 10.200.0.0/16
My Pubic IP: 81.3.30.135
Azure gateway IP: 140.13.104.73



These are my settings:

/ip ipsec peer
add address=140.13.104.73/32 dpd-interval=disable-dpd enc-algorithm=aes-256
lifetime=1h secret=VeryDeepSeCret!

/ip ipsec policy
add dst-address=10.200.0.0/16 sa-dst-address=140.113.104.73 sa-src-address=
81.3.30.135 src-address=192.168.1.0/24 tunnel=yes

/ip firewall filter
add chain=input comment=“Allow from Azure” log=yes protocol=ipsec-esp
src-address=140.13.104.73
add chain=forward in-interface=Internet-Outside src-address=10.200.0.0/16
add chain=input comment=“default configuration” protocol=icmp
add chain=input comment=“default configuration” connection-state=
established,related
add action=drop chain=input comment=“default configuration” in-interface=
Internet-Outside log=yes
add action=fasttrack-connection chain=forward comment=“default configuration”
connection-state=established,related
add chain=forward comment=“default configuration” connection-state=
established,related
add action=drop chain=forward comment=“default configuration”
connection-state=invalid log=yes
add action=drop chain=forward comment=“default configuration”
connection-nat-state=!dstnat connection-state=new in-interface=
Internet-Outside log=yes

/ip firewall nat
add chain=srcnat comment=“Azure VPN Tunnel” dst-address=10.200.0.0/16 log=yes
src-address=192.168.1.0/24
add chain=dstnat comment=“Azure VPN Tunnel” dst-address=
192.168.1.0/24 src-address=10.200.0.0/16
add action=masquerade chain=srcnat comment=“default configuration”
out-interface=Internet-Outside

Still struggling on using basic things like RDP over this connection.

I’m using version 6.34.1
I can ping from HQ router everything but from remote office I can ping only HQ router.
I did try to add ipip with ipsec but it is doing the same thing. I think we are missing some routing here but I’m not sure what. I can also ping in both directions but only routers IP nothing else.

I’m at the point that I will probably get cisco routers and finish the job. I can not understand why Mikrotik is not helping. Forum should be the place that we are helping one to another. But if there is no right answer or solution Mikrotik should jump in. They should help. We are buying their product. We are using their product.

Where is the logic (read future) here???

Well, I think you need to add the source NAT rules (like in my sample above) to make it work.

I have this

/ip firewall nat
add chain=srcnat comment=“VPN Tunnel” dst-address=192.168.17.0/24 log=no
src-address=172.16.20.0/24
add action=masquerade chain=srcnat comment=“default configuration”
out-interface=WAN

I just had a word with Mirotik Support and they were really helpfull:

What I needed to do is:

/ip ipsec peer
add address=140.13.104.73/32 dpd-interval=disable-dpd enc-algorithm=aes-256
lifetime=1h secret=VeryDeepSeCret!

/ip ipsec policy
add dst-address=10.200.0.0/16 sa-dst-address=140.113.104.73 sa-src-address=
81.3.30.135 src-address=192.168.1.0/24 tunnel=yes


/ip firewall filter
add chain=forward comment=“Allow from Azure” dst-address=10.200.0.0/16
src-address=192.168.1.0/24 place-before=0
/add chain=forward dst-address=192.168.1.0/24 src-address=10.200.0.0/16
place-before=0
/add chain=input comment=“Allow from Azure” log=yes protocol=ipsec-esp
src-address=140.113.104.73
/ip firewall nat
add chain=srcnat comment=“Azure VPN Tunnel” dst-address=10.200.0.0/16 log=yes
src-address=192.168.1.0/24 place-before=0


Now everything works fine :wink:

Thanks for reply I’ll try this and let you know, :smiley: