Skip to content

Instantly share code, notes, and snippets.

@vyach-vasiliev
Created December 22, 2024 14:00
Show Gist options
  • Save vyach-vasiliev/f61726b8749b7d354976735897da4055 to your computer and use it in GitHub Desktop.
Save vyach-vasiliev/f61726b8749b7d354976735897da4055 to your computer and use it in GitHub Desktop.
Wireguard Example Config with Excluded IPs for WinOS
[Interface]
PrivateKey = ...
Address = 10.8.1.3/32
DNS = 1.1.1.1
PostUp = powershell -command 'New-NetRoute -DestinationPrefix "<excluded ip>/32" -NextHop "192.168.0.1"'
PostDown = powershell -command 'Remove-NetRoute -DestinationPrefix "<excluded ip>/32"'
[Peer]
PublicKey = ...
PresharedKey = ...
AllowedIPs = 0.0.0.0/1, 128.0.0.0/1
Endpoint = ...:...
PersistentKeepalive = 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment