<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

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
AI and Machine Learning

CarCast with Bruno Aziza: What Makes Us Better Than AI?!

Unlock the secrets of human cognitive superiority over AI in this compelling CarCast with Bruno Aziza and Kenneth Cukier.
By Bruno Aziza
AI and Machine Learning

CarCast with Bruno Aziza: The Metrics You CAN'T Afford To ...

Discover essential CEO metrics: Rule of 40, CAC Ratio, NRR/GRR, and more. Optimize your business for success now!
By Bruno Aziza