Connect to an instance via VPN

0 votes
How to use a VPN to connect to a VM instance on GCP?
Nov 8, 2019 in GCP by anonymous
• 6,260 points
1,706 views

1 answer to this question.

0 votes

To use a Virtual Private Network (VPN) to connect to an instance without an external IP address, you must have a computer that's already connected to the same VPN as the instance you want to reach. For example, you might have a VPN that your local on-premises network shares with your GCP VPC. 

Connect to an instance without an external IP address by using the gcloud compute ssh command with the --internal-ip flag.

gcloud compute ssh [INTERNAL_INSTANCE_NAME] --internal-ip

Where [INTERNAL_INSTANCE_NAME] is the name of the instance that you want to connect to.

After connecting, run commands on your instance using this terminal. When you have finished using the instance, disconnect from it by using the exit command.

answered Nov 8, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
2,896 views
0 votes
1 answer
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,245 views
0 votes
1 answer

Connect to an instance as a root user in GCP

If you configured an instance to allow ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,230 points
5,443 views
0 votes
1 answer

Cannot connect to my VM instance on GCP via SSH.

This might be because UFW is installed. ...READ MORE

answered Sep 27, 2019 in GCP by Sirajul
• 59,230 points
4,647 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP