I run some web services running in Google Compute Engine. I want to secure them and make available only to my coallegues. I don't want to rely on web server security, so my idea was to configure a VPN with Google Cloud Platform.
My question may be silly, because I don't really know how VPN works. Is it possible to create a VPN in Google Cloud and connect to it directly from my laptop? I've tried to use "Hybrid Connectivity VPN" - but it allows only to connect to another VPN. When I make a tunnel, it asks me "Remote peer IP address". I don't have any on-premise VPN in my organization, also I am behind a NAT of my provider.
I know that that it could be possible in principle - once I've connected to VPN of my previous job. I've just used build-in Windows function "Add a VPN connection", inputed IP of the server and the secret. After that I could connect to the servers that were inside the corporate network.
Can I configure Google Cloud VPN to work in similar way?
Client-to-gateway(road warrior) setup is not supported by CloudVPN. For client-to-gateway scenarios, you can install and configure an IPSec VPN software, like Strongswan on a GCE VM and configure it for remote access. Users can than connect to this VPN server through VPN client and, after a secure tunnel established they can connect to all other VMs which are deployed inside the same network. With this setup, you can also configure NAT gateway and remove the public IP from other VMs. Configuring a NAT gateway is described in this article.
https://serverfault.com/questions/818101/does-gcp-support-p2s
Related
How do I confirm that my VM connects to my GCP VPN Gateway? The two are already on the same network. I have tried pinging to the VPN Gateway IP from the vm but I cannot.
You would have to review and make sure that:
The VPN is active under Cloud VPN
Ensure that your GCP and on-prem firewall are allowing ingress/egress traffic between them
Depending on the type of VPN you choose, make sure that the IP address of the VM is shared to your on-prem via BPG, Route or Policy
If you see an issue with the VPN, you can review the VPN logs logs via logging (log viewer) and choose GCE Router. https://cloud.google.com/logging/docs/view/overview
If the issue is with the BGP/Route/Policy based, you would need to ensure your VPN IP is part of the shared range on both side (GCP and on-prem). https://cloud.google.com/network-connectivity/docs/vpn/concepts/overview#classic-vpn
If the issue is with Firewall, make sure that nothing is blocking your VM from communicating with your VPN IP range on GCP side and on your on-prem side. https://cloud.google.com/network-connectivity/docs/vpn/how-to/configuring-firewall-rules
Here is more troubleshooting you can review/try: https://cloud.google.com/network-connectivity/docs/vpn/support/troubleshooting
I have some question about setup VPN tunnel between Cloud VPN and on-premises internal network.
In GCP side, I have a flex app engine application running on my custom VPC and would like to connect to the device that sitting on-premises internal network.
To my understanding, the Cloud VPN with VPN tunnel should work. but I have no idea what kind of hardware I need to build the on-premises VPN gateway, so it can communicate with the app engine through the Cloud VPN.
The on-premises internal network is access public internet through its own router provided from the ISP.
Any hardware recommendations or ways to make sure it works with Cloud VPN? or any experiences with a similar case.
Thanks in advance!
You can accomplish an App Engine app reaching into an on-premise network by establishing a VPN.
The simplest solution is to create a VPN network between the on-premise network and the projects' VPC network where the app engine flex is located.
Now, answering your question about the HW, that you can use for VPN establishment, let me share public Google documentation about some vendors, that you can use for VPN to GCP:
With Classic VPN, your on-premises hosts communicate through one or more IPsec VPN tunnels to Compute Engine Virtual Machine (VM) instances in your project's VPC networks.
Interop-guides[https://cloud.google.com/vpn/docs/how-to/interop-guides]
classic-topologies for[https://cloud.google.com/vpn/docs/concepts/classic-topologies]
Best Regards.
I would like to run my Node application from EC2. But my application's database is in Client's location and I usually connect through Cisco AnyConnect VPN application.
I tried installing openconnect in the EC2, the moment I connect to the VPN, the instance goes out of my control. I understood this, because I no longer have control on the EC2 instance, since it's in the Client's VPN network. So I rebooted the EC2 to get back the access.
So how can I connect my Client's VPN from EC2 ?
Note: I cannot install or ask my client to configure anything on their end for this, they just provided their VPN connection details.
Create a Gateway in AWS. You can build an IPsec tunnel from AWS to a client's firewall using a site-to-site VPN.
I want to connect my default network to the internet using a VPN and I don't want to use OpenVPN for that. I ask if it is possible to connect using a VPN Gateway (GCP), but, I'm found that VPN is used to connect to other VPN networks.
Could Google VPN be used as a real VPN?
Could Google VPN be used as a real VPN?
Assuming that you mean you would like to connect to Google Cloud VPN using client software running on your desktop, the answer is No.
Google Cloud VPN is used for site-to-site VPNs, and not for client-to-site.
You will need to use a third party product such as OpenVPN to provide client-to-site VPN connectivity.
FYI: OpenVPN is a very good product.
I am trying to connect GCP VPN from my local work station (windows 8.1).
On GCP, I have created Route Based VPN and VPN tunnel as google cloud's documentation. I have used IKEv2 on routing.
On my local computer I have created a VPN over IPSec using shared secret generated from GCP. Here is the screen shot of my local VPN settings:
While connecting the vpn from my windows 8.1 pc, it shows the following error:
and in the GCP side, VPN tunnel status shows:
IKE version mismatch
in the Cloud VPN Gateway log it shows:
establishing IKE_SA failed, peer not responding
It seems IKE version is not matching in both side. Am I missing anything that failed to match IKE version? or any way to enable 'IKEv2' on my windows pc? Any kind of suggestions are welcome.
Thanks in advance!
Cloud VPN is rather end-point to end-point; which may provide tunnels in between networks, with overlapping sub-nets. in order to connect with your client, you'd to setup an OpenVPN Access Server or alike, to provide the gateway which to connect.
As per GCP Cloud VPN features
GCP Cloud VPN uses ESP in Tunnel mode with authentication. Cloud VPN
does not support AH or
ESP in
Transport mode. Note that Cloud VPN does not perform policy-related
filtering on incoming authentication packets. Outgoing packets are
filtered based on the IP range configured on the Cloud VPN gateway.
From your description, I am guessing you are trying to configure remote access VPN which is different from site-to-site VPN and not possible using Cloud VPN in one side and windows machine in another end.
However, as workaround, I would recommend using Strongswan VPN software to set up a VPN gateway on one of your instances. Which is also documented in GCP under "Set up an instance as a VPN gateway" in cases where Cloud VPN doesn't provide the required functionality.