Skip to content

A simple shell script to generate Wireguard configs only

License

Notifications You must be signed in to change notification settings

nebulakl/wireguard-config-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wireguard-config-generator

A simple shell script to generate Wireguard configs only

What it does

Generate working server and client configuration files. The server config only works on Linux but client configs should work on any OS.

The script requires prior knowledge of the server's network interface and IP address and/or domain name to work.

Note: each time the script is run, all previously generated configs under wgconfigs will be removed.

What it does not

Set up a Wireguard server from scratch. For that purpose please check out other people's excellent work. Some examples are:

Features

  • Randomly generated IPv4 and IPv6 addresses
  • Randomly generated port number
  • Randomly generated pre-shared key, unique to each client

Prerequisites

  • Relatively new bash
  • shuf
  • wireguard-tools

Getting started

  1. modify the variables at the beginning of the script accordingly
  2. run the script
  3. Copy the generated server config (wgconfigs/${WG_INTERFACE}.conf) to the server and bring it up with wg-quick
  4. Copy the generated client configs (wgconfigs/clientconfigs/*.conf) to the clients

About

A simple shell script to generate Wireguard configs only

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages