I’m trying to establish a vpn to GCP network but I have a doubt still can’t resolve. I can establish the ipsec tunnel, but I don’t have any interface o idea to where to configure the ip to create the bgp sessión. Is the same if I configure the VPN on GCP for static routing, the ipsec works, but I don’t where to configure the static routing on my mikrotik to route to the ips on google cloud.
hello! If you have already an IPSec Site-to-Site between Google and your Mikrotik then I think that you’ll need to create some special routes using policies and rules to reach the remote server, theoretically I think that it is possible, however can you please post the configs at both sites?
Actually it seems that I have a one way issue, because my compute engine instance is able to ping my local segment 10.0.5.0/29, but from my Mikrotik I can’t ping the cloud instance. I’ve checked firewall and everything related to it.
Here is the evidence from the cloud instance to my LAN segment. I think is the same issue, my Mikrotik doesn’t know how to route to that destination, even so the policy is indicating that any traffic to 10.168.0.0/20 should go through the ipsec tunnel.
Well, some sleep hours helped, I could figured it out after search a little, I had to add the NAT exception from the src/dst networks. Now I’m able to ping both ways. So the IPSEC tunnel is working.
But at this time is configured with static segments (only 10.0.5.0/29 to 10.168.0.02/0) I have to make it work through BGP to avoid manual configurations. I’m going to test to add a bridge interface with the bgp ip to see if I’m able to establish the session.
To be able to route to the VPN I created a bridge to use it as the interface that has the ip for the BGP session and it turned in to my gateway to the cloud. If you’re going to use static routes or policy based VPN is enough with the IPSEC Policies.
Are you using dedicated instance from GCP side to connect with mikrotik or do you use dedicated VPN service from Google?
Two could you share the config ?
Sorry for the late response, I didn’t received a notification email. I’m using the VPN service from GCP. What config do you need? router side or GCP platform?
If you don’t mind, would be great if you can post here the config from both sides in case someone would like to use a similar scenario.
I am also trying to create a similar Site-To-Site VPN between a mikrotik and a GCP project (using the VPN service), but without any luck, I didn’t manage yet to make the two sides communicate
We’re having similar issues with MikroTik and GCP VPN with BGP. Although our configuration appears to be correct, we’re suffering from packet loss through the tunnel, it’s not stable.
If you coudl publish your configuration from both ends we’d like to compare.
We used some of your setting for ‘dpd’ and timeouts and it appears to have solved the problem.
How did you arrive at those settings?
Maybe when we see the full config for both sides all will become clear…
Thank you for your effort and we all look forward to seeing the script when you have time to post.
In GCP you have to configure a VPN on the Hybrid connectivity section, refer to attached images.
VPN Tunnel
VPN Gateway
Cloud router and BGP sessión
The information is as follows:
169.254.0.0/30 ips to create the bgp sessión .1 is my router .2 is GCP
10.XX.XX.0/29 is the ip segment I have for my servers in GCP named cloud-servers
XX.XXX.XX.221 GCP public ip address
XXX.XXX.XX.64 is my public ip segment my public ip address is XXX.XXX.XX.118
I have an IPSEC policy to reach 10.XX.XX.0/29 from every segment of my network 0.0.0.0/0
The IPSEC lifetimes are the ones specified in GCP documentation
I’m redistributing the OSPF, static and connected routes to GCP via the BGP
64512 is my ASN and 64513 is GCP ASN
Any doubts just let me know, hope it helps on your configuration.
Do you have any connectivity problems? I wrote to MikroTik support because my tunnel sometimes disconnects and when reconnecting which seems all fine some part of networks defined in policy don’t work (Ping doesn’t goes through). After disable/enable that policy it starts working again
@gargola
i tried your configuration. Our vpn tunnel is up but Bgp session status not. Do you have another config in firewall filter, mange of nat as well?
also how we test vpn connection? i tried pinging 169.254.0.1 from mikrotik (169.254.0.2) no luck. I also tried creating gce instance using same network not working as well.
@eset yes, sometimes and randomly the ipsec tunnel is connected but no traffic passing through, so the bgp goes down. I have to reset everything manually and it comes back, I got almost fixed it setting the timers a google request them on their manual, but still having some random issues. The easiest way I’ve found that fix the tunnel is killing the active peer.
Hello, Can any one send me the script that how to configure Mikrotik router board 750gr3 with google cdn, also told me the google cdn configuration please I am new in this field
Unfortunately that’s what I do also but that’s not a solution for unstable IPsec tunnel. So again I believe MikroTik has serious issue with IPsec. That’s not a trick to have stable IPsec connection between two mikrotik devices or virtual instances like CHR rather than having stable connection between mikrotik and other provider e.g GCP or AWS (in the second scenario I don’t know if there are the same issues).
MikroTik support have ticket opened for this from 2019 and still no solution. The gave me a incomprehensible suggestion to to disable PFS (when Google Requires that) or maybe I don’t understand what they had in mind
Emīls Z.04/12/19 09:40:03
Hello,
Please try the previously suggested workarounds - disabling phase 2 lifetime on MikroTik side and disabling pfs group on MikroTik side. IKEv2 protocol has independent rekeying times so they does not have to match on both sides. Also PFS group can be set to none, there is a reference in the GCP documentation regarding it if you insist on following it despite my recommendations.
“If your VPN gateway requires DH settings for Phase 2, use the same settings you used for Phase 1.”
But settings PFS to none will obviously end up with this
So I don’t know what they suggest and why like so.