Git Product home page Git Product logo

codespaces-openvpn's Introduction

Using the OpenVPN client from GitHub Codespaces

GitHub Codespaces provides a useful environment for development that is separated from your local machine. This provides some nice security benifits due to the fact that the codespace has no direct route to your machine or the network it is sitting in. However, you may have a resource you need to access that is in a private network. This sample illustrates how to set up the OpenVPN (v2) client in a codespace to connect into a OpenVPN capable VPN gateway.

Using the sample

  1. Your VPN admistrator should be able to provide you with an OpenVPN configuraion file. This particular sample is assuming you are using certificate based authentication to access the VPN. We'll call this file vpnconfig.ovpn.

  2. Work with your administrator to place any needed certificates or keys in the vpnconfig.ovpn file. You can tell if the certificates and keys are in the file by looking for the following:

    <ca>
    -----BEGIN CERTIFICATE-----
    uQltvbIPFv69jSPNotypuUQqRAyLC+gBTVDxN3zC3WPeKMR6vJTh0lxC6GPhkHC
    ...
    -----END CERTIFICATE-----
    </ca>
    
    <cert>
    -----BEGIN CERTIFICATE-----
    uQltvbIPFv69jSPNotypuUQqRAyLC+gBTVDxN3zC3WPeKMR6vJTh0lxC6GPhkHC
    ...
    -----END CERTIFICATE-----
    </cert>
    
    <key>
    -----BEGIN CERTIFICATE-----
    uQltvbIPFv69jSPNotypuUQqRAyLC+gBTVDxN3zC3WPeKMR6vJTh0lxC6GPhkHC
    ...
    -----END CERTIFICATE-----
    </key>
    
    

    For example, see here for information on setting up config file for a connection to an Azure VPN Gateway. You can skip the steps that install the client and use the GUI.

  3. Create a Codespaces user secret called OPENVPN_CONFIG and place the contents of the file in it.

  4. Assign this secret to either this repository or your own fork of it.

  5. Create a codespace - after its started, you should be connected to your VPN. If you aren't you can manually run .devcontainer/start-openvpn.sh to try again and logs can be found in .devcontainer/openvpn-tmp/openvpn.log.

codespaces-openvpn's People

Contributors

chuxel avatar 1881r avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.