Skip to content

Bash scripts to take Ubuntu Server LTS 24.04 from clean install to fully-configured WireGuard server peer

Notifications You must be signed in to change notification settings

jawj/wireguard-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

wireguard-setup

Bash scripts to take Ubuntu Server LTS 24.04 from clean install to fully-configured WireGuard server peer, forwarding DNS queries to Cloudflare over TLS.

  • setup.sh sets up the server (run once)
  • addclient.sh creates a peer, printing the config as text and a QR code (run for each new client)

The server is configured for unattended security upgrades and firewalled with iptables to allow only SSH, WireGuard and some ICMP types.

Clients are visible to each other, and can be found via DNS as my-client-name.wg.internal.

Usage

One-time only (as root):

wget https://raw.githubusercontent.com/jawj/wireguard-setup/refs/heads/main/setup.sh
chmod u+x setup.sh
./setup.sh

To add a client (as root):

wget https://raw.githubusercontent.com/jawj/wireguard-setup/refs/heads/main/addclient.sh
chmod u+x addclient.sh
./addclient.sh

To show status (as root):

wg show

See also

https://github.com/jawj/IKEv2-setup

License

MIT

About

Bash scripts to take Ubuntu Server LTS 24.04 from clean install to fully-configured WireGuard server peer

Topics

Resources

Stars

Watchers

Forks

Languages