Skip to content

Instantly share code, notes, and snippets.

@poqdavid
Created February 22, 2024 15:02
Show Gist options
  • Save poqdavid/4aa9b901b030c36e23d4132bca845274 to your computer and use it in GitHub Desktop.
Save poqdavid/4aa9b901b030c36e23d4132bca845274 to your computer and use it in GitHub Desktop.
WireGuard
[Interface]
PrivateKey = <Key>
Address = <IPv4>/32, <IPv6>/128
DNS = 127.0.0.100, 127.0.0.200, fd00:0:0:100::1, fd00:0:0:200::1
MTU = 1280
PostUp = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route add 0.0.0.0 mask 0.0.0.0 0.0.0.0 if $wgInterface.ifIndex metric 9999; Set-NetIPInterface -InterfaceIndex $wgInterface.ifIndex -InterfaceMetric 9999;"
PreDown = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route delete 0.0.0.0 mask 0.0.0.0 0.0.0.0 if $wgInterface.ifIndex metric 9999; Set-NetIPInterface -InterfaceIndex $wgInterface.ifIndex -InterfaceMetric 9999;"
Table = off
[Peer]
PublicKey = <Key>
AllowedIPs = 0.0.0.0/0, 2000::/3
Endpoint = 185.195.233.76:51820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment