Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Turtleinahafshel

How to Setup A OpenVPN Server On Google Cloud

Recommended Posts

Well you have plenty of options : 

  • You could either choose to run a Virtual Machine Instance on the Google Cloud Platform (GCP) :
    • From there you could choose to go with the public image with your distro of choice (https://cloud.google.com/compute/docs/images#os-compute-support) and install the appropriate open-vpn package (You'll find great tutorials if you google the name of your distro + open vpn)
    • You could also choose to, for example go with a custom Image and run pfSense on your VM. pfSense is a distribution that can be used as a firewall, that is based on FreeBSD (for a solid foundation), and comes bundled with several options for running VPN servers, and a nice Web GUI, but is, IMHO a little overkill for your project.
  • Or you could try and find an appropriate container image, containing an installation of open-vpn server, and running it as a container on GCP. 

Whatever you decide, please first read on and make some research about these two options (a google search with "running a vm on gcp", "install open-vpn server on debian" will go a long way), and ask us question! We'll be happy to help!

 

PS: You could also choose to use a VPN service, which will require almost no setup, or another Cloud Provider. In any case, best of luck in your project! 

Link to post
Share on other sites
Posted · Original PosterOP
23 minutes ago, Camille Terol said:

Well you have plenty of options : 

  • You could either choose to run a Virtual Machine Instance on the Google Cloud Platform (GCP) :
    • From there you could choose to go with the public image with your distro of choice (https://cloud.google.com/compute/docs/images#os-compute-support) and install the appropriate open-vpn package (You'll find great tutorials if you google the name of your distro + open vpn)
    • You could also choose to, for example go with a custom Image and run pfSense on your VM. pfSense is a distribution that can be used as a firewall, that is based on FreeBSD (for a solid foundation), and comes bundled with several options for running VPN servers, and a nice Web GUI, but is, IMHO a little overkill for your project.
  • Or you could try and find an appropriate container image, containing an installation of open-vpn server, and running it as a container on GCP. 

Whatever you decide, please first read on and make some research about these two options (a google search with "running a vm on gcp", "install open-vpn server on debian" will go a long way), and ask us question! We'll be happy to help!

 

PS: You could also choose to use a VPN service, which will require almost no setup, or another Cloud Provider. In any case, best of luck in your project! 

i just cant figure it out woth the ports and the udp tcp and the nat the vm are behind how could i configure it.

Link to post
Share on other sites
10 hours ago, Turtleinahafshel said:

i just cant figure it out woth the ports and the udp tcp and the nat the vm are behind how could i configure it.

Usually, on a VM like the one provided by Google, you get an external IP address, which means that you won't need to configure port forwarding and NAT in order to access to your OpenVPN server.

 

The script that razibhasan mentioned looks good. Maybe you can install a VM with CentOS or Debian, and use this script to setup your VPN server on it.

Link to post
Share on other sites
Posted · Original PosterOP
8 hours ago, Camille Terol said:

Usually, on a VM like the one provided by Google, you get an external IP address, which means that you won't need to configure port forwarding and NAT in order to access to your OpenVPN server.

 

The script that razibhasan mentioned looks good. Maybe you can install a VM with CentOS or Debian, and use this script to setup your VPN server on it.

but the vms have a internal and a external and i cant figure out how to configure the connection settings.

Link to post
Share on other sites
Posted · Original PosterOP
4 hours ago, Camille Terol said:

Can you post a screenshot of what you're seeing? Maybe I could help.

i get a error could not connect but if says the connection is reachable and i cant ping the external ip. i just dont know what to do with the internal

Link to post
Share on other sites

Well, you don't really need the internal. What you're trying to achieve is having an OpenVPN server that listens on the external interface, and that gives you access to Internet thourg the same interface. The internal interface is probably in case you want to interconnect several VMs on Google Cloud.

Link to post
Share on other sites
Posted · Original PosterOP
On 8/7/2017 at 6:53 AM, Camille Terol said:

Well, you don't really need the internal. What you're trying to achieve is having an OpenVPN server that listens on the external interface, and that gives you access to Internet thourg the same interface. The internal interface is probably in case you want to interconnect several VMs on Google Cloud.

how could i disable it

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×