Created
February 19, 2019 18:31
-
-
Save TobleMiner/3ee2d4f5faba4e8eaa5064967fca8bbd to your computer and use it in GitHub Desktop.
Wireguard ifupdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto wg-ffki | |
iface wg-ffki inet manual | |
pre-up ip link add $IFACE type wireguard || true | |
pre-up wg set $IFACE listen-port 4242 private-key /root/wgsec | |
pre-up ip addr add 10.10.10.1/24 dev $IFACE || true | |
up ip link set $IFACE up | |
down ip link set $IFACE down | |
post-down ip addr del 10.10.10.1/24 dev $IFACE || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto wg-ffki | |
iface wg-ffki inet manual | |
pre-up wg set $IFACE peer CEtui81bm959xJ8ay8rRQwj/wFGWPj3bO9HAsG9m3Dw= allowed-ips 10.10.10.2/32 endpoint dn42.t-sys.eu:4242 persistent-keepalive 10 | |
post-down wg set $IFACE peer CEtui81bm959xJ8ay8rRQwj/wFGWPj3bO9HAsG9m3Dw= remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment