<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

Infrastructure

howto setup OpenVPN behind a load balancer on GCP ?

By G x | January 9, 2022

Hello.

I think the title captures my question.

 

This works "out of the box" on AWS.

But, when I setup an openvpn instance behind a UDP Network Load Balancer on GCP, I can't get my client to connect -

 

Thanks for any pointers.

 

Best answer by cba

Note that the question was incomplete: “OpenVPN server” can mean the proprietary Access Server software or the open source community version, and being specific does matter, because the answers differ.

That said, community version openvpn(8) should have no problem at all behind a GCP NLB.  It is a single-threaded application, VPN only, not doing all the extra stuff that Access Server does.

Access Server, on the other hand, can only work with a single-core VM node behind the NLB.  If using multiple CPU cores, Access Server distributes the client load using iptables DNAT rules.  Apparently GCP queries the OS to determine what ports are bound, and in the multi-CPU case, Access Server does not bind the ports.  But we do not know the details of how the GCP NLB decides what packets to forward.


Recent Articles

Data Analytics

Generative AI: Are You Behind?!

Review the latest insights from the AI Readiness Report.
By Bruno Aziza
Industry Solutions

Make "Gen AI Work": Landscape, SLMs vs. LLMs, Cost & More...

Discover the 5 metrics you need to know in order to be an exceptional CEO and Operator.
By Bruno Aziza
Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter