Skip to content

Instantly share code, notes, and snippets.

@aphex3k
Last active September 25, 2019 23:29
Show Gist options
  • Save aphex3k/f3d27d98792dc559317c20e7d5b73a15 to your computer and use it in GitHub Desktop.
Save aphex3k/f3d27d98792dc559317c20e7d5b73a15 to your computer and use it in GitHub Desktop.
Start WireGuard when connection to the listen port is made
[Unit]
Description=WireGuard wg0 socket
Before=wg-quick@wg0.service
Conflicts=wg-quick@wg0.service
[Socket]
ListenDatagram=51228
Accept=false
[Install]
WantedBy=sockets.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment