Skip to content

Instantly share code, notes, and snippets.

@pashinin
Last active April 10, 2026 18:41
Show Gist options
  • Select an option

  • Save pashinin/716bd86bf2be5f320b085c9666a78a6c to your computer and use it in GitHub Desktop.

Select an option

Save pashinin/716bd86bf2be5f320b085c9666a78a6c to your computer and use it in GitHub Desktop.
[Match]
Name=wg_name
[Network]
Address=10.10.0.2/24
DNS=1.1.1.1
# Gateway= can't be here. Error.
# ???
# DNSDefaultRoute=true
# ???
# Domains=~.
# Default route
[Route]
Gateway=10.12.0.1
GatewayOnLink=true
Destination=0.0.0.0/0
# Lower metric = Higher priority
Metric=10
#[Route]
#Gateway=10.10.0.1
#GatewayOnLink=true
#Destination=0.0.0.0/0
#[Route]
#Gateway=10.10.0.1
#GatewayOnLink=true
#Destination=10.10.0.0/24
#[Route]
#Gateway=10.10.0.1
#GatewayOnLink=true
#Destination=103.21.244.0/22
# .....
# -*- mode: conf -*-
[NetDev]
Name=wg_name
Kind=wireguard
Description=WireGuard vpn
# Interface config
[WireGuard]
# put some random port
ListenPort=53423
PrivateKey=
# Peer config
# Для клиента пиром является сервер (что логично и взаимно)
[WireGuardPeer]
PublicKey=XXXXX SERVER PUBLIC KEY XXXXXXX
AllowedIPs=0.0.0.0/0
Endpoint=xxx.xxx.xxx.xxx:51820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment