Skip to content

A simple tool to build and manage VPN servers (Wireguard).

License

Notifications You must be signed in to change notification settings

networmix/VPNTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VPNTools

🚧 Work in progress! 🚧

Introduction

It is a simple tool to build and manage VPN servers. For now supports only Wireguard.

How to use

  1. Clone this repo (or download as a ZIP archive)

  2. Go to the source code directory

    cd `path_to_the_source_code_dir` 
    
  3. Build development docker image by running:

    ./dev/buildenv.sh build
    
  4. Run a dev container (it will mount the source code directory):

    ./dev/buildenv.sh run
    
  5. Install mounted source code inside the container (in "edit" mode):

    pip install -e .
    
  6. Run the workflow. For example, deploy_wg:

    python3 vpntools/cli.py deploy_wg `path_to_the_vpn_yaml`
    

    In the process it will provision the VPN server and generate client configurations (including QR codes).

VPN Yaml Example

# server IP address or a hostname
1.1.1.1:
  description: some_server_description
  ssh_user: "ssh_user_name"
  # ssh-keygen -t ed25519 -C "some@tag"
  ssh_private_key: |2
    -----BEGIN OPENSSH PRIVATE KEY-----
    ssh_private_key_goes_here...
    -----END OPENSSH PRIVATE KEY-----

  app_config:
    wireguard:
      wg0:
        server_private_ip: 192.168.101.1/24
        server_port: 52101
        # wg genkey | tee privatekey | wg pubkey > publickey
        private_key: SERVER_PRIVATE_KEY_GOES_HERE=
        public_key: SERVER_PUBLIC_KEY_GOES_HERE=
        peers:
          - peer_1:
              # wg genkey | tee privatekey | wg pubkey > publickey
              private_key: PEER_PRIVATE_KEY_GOES_HERE=
              public_key: PEER_PUBLIC_KEY_GOES_HERE=
              peer_private_ip: 192.168.101.2/24
              dns_servers: 1.1.1.1, 1.0.0.1
          - peer_2:
              # wg genkey | tee privatekey | wg pubkey > publickey
              private_key: PEER_PRIVATE_KEY_GOES_HERE=
              public_key: PEER_PUBLIC_KEY_GOES_HERE=
              peer_private_ip: 192.168.101.3/24
              dns_servers: 1.1.1.1, 1.0.0.1

About

A simple tool to build and manage VPN servers (Wireguard).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published