Nebula VPN and local dev

Bryan
1 min readMay 27, 2021

--

Huge thanks to Stephen Williams ( @scienteer ) for the inspiration for this feature!

Let’s use Slack’s Nebula VPN rig, nginx, k8s and some magic to enable local development from an EKS cluster!

Cut the cert:

nebula-cert sign -ca-crt /tmp/ca.crt -ca-key /tmp/ca.key -out-crt /tmp/bkroger.crt -out-key /tmp/bkroger.key -name bkroger-local -ip 192.168.100.19/24

Nebula config:

Let’s connect!

sudo nebula -config nebula.yaml

Assuming the VPN connected, now we need to setup a quick and dirty nginx rig:

docker run -p 80:80 nginx

Love how easy docker makes this!

Now let’s make the ingress and service objects in our namespace:

And now we can hit: https://www.fqdn.com/bkroger and land on my local machine.

So here’s the workflow:

  • www.fqdn.com ( route53 ) points to an NLB. This is, obviously a L4 LB.
  • That NLB forwards to the nginx pod with the various reverse proxy configs setup by using the Ingress objects on the cluster.
  • Nginx then reverse proxies to the service, in this case the service is just pointing back to the 192.168.100.19 IP.
  • The 192.168.100.19 IP is my nebula host; requests from k8s get handled on my local machine by nginx.

Now I can serve content via our global front end from my local workstation, which makes my development life easier.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Bryan
Bryan

No responses yet