Skip to content

Latest commit

 

History

History
47 lines (42 loc) · 1.37 KB

README.md

File metadata and controls

47 lines (42 loc) · 1.37 KB

WireGuard Setup

Server Setup

  1. Download script and make it executable.
    curl 'https://raw.githubusercontent.com/soohoowoohoo/wireguard-setup/master/server-setup.sh' --silent > server-setup.sh
    chmod +x server-setup.sh
  2. Run server setup script with sudo.
    sudo ./server-setup.sh
  3. Add clients to your WireGuard server.
    sudo wg set wg0 peer ${CLIENT_PUBLIC_KEY} allowed-ips ${WG_SERVER_PRIVATE_IPS}

Assumptions

  1. WireGuard server address space is 256 addresses. (i.e. 10.0.0.0/24)
  2. WireGuard server port is 51820.
  3. Only IPv4 addresses supported.
  4. Linux distro is Ubuntu 20.04LTS.

Test Client Setup

  1. Download script and make it executable.
    curl 'https://raw.githubusercontent.com/soohoowoohoo/wireguard-setup/master/test-peer-setup.sh' --silent > test-peer-setup.sh
    chmod +x test-peer-setup.sh
  2. Run test peer setup script with sudo.
    sudo ./test-peer-setup.sh
  3. Start the VPN tunnel.
    sudo wg-quick up wg0
  4. Verify the tunnel works.
    curl 'https://ifconfig.me'

Troubleshooting

  • Of the 256 usable addresses (0-255), address 255 does not work.

References