Skip to content

Instantly share code, notes, and snippets.

@EggieCode
Created May 22, 2017 12:18
Show Gist options
  • Save EggieCode/29ec9019e0acbb948ddc8165e33b4cc0 to your computer and use it in GitHub Desktop.
Save EggieCode/29ec9019e0acbb948ddc8165e33b4cc0 to your computer and use it in GitHub Desktop.
streisand working nice with tun.%i
eggie@zesty:~$ wg-quick down wg-mgmt
[#] wg showconf wg-mgmt
[#] ip link delete dev wg-mgmt
[#] resolvconf -d tun.wg-mgmt
eggie@zesty:~$ wg-quick up wg-mgmt
[#] ip link add wg-mgmt type wireguard
[#] wg setconf wg-mgmt /dev/fd/63
[#] ip address add 192.168.10.4/24 dev wg-mgmt
[#] ip address add fd4a:a:a:1337:1::4/64 dev wg-mgmt
[#] ip link set mtu 1420 dev wg-mgmt
[#] ip link set wg-mgmt up
[#] ip route add 2001:41d0:2:5c39::/64 dev wg-mgmt
[#] ip route add 10.30.0.0/16 dev wg-mgmt
[#] ip route add 10.20.0.0/16 dev wg-mgmt
[#] echo nameserver 10.20.5.1 | resolvconf -a tun.wg-mgmt -m 0 -x
eggie@zesty:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 10.20.5.1
nameserver 10.21.1.1
search kvmbr0
eggie@zesty:~$ dig web.sprinkhaan.eggie.zone ANY +short
2a00:f10:700:5f:216:3eff:fe5c:97ce
10.20.3.14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment