4 ms·
An alternative solution is to use Linux namespaces to move the Wireguard into a dedicated namespace[1] and use /etc/netns/$NAMESPACE_NAME/resolv.conf for DNS co
by VTimofeenko 5y ago
An alternative solution is to use Linux namespaces to move the Wireguard into a dedicated namespace[1] and use /etc/netns/$NAMESPACE_NAME/resolv.conf for DNS configuration dedicated to that namespace[2]. AFAIK that also plays well with systemd-resolved.
[1]: https://www.wireguard.com/netns/ https://www.wireguard.com/netns/
[2]: https://man7.org/linux/man-pages/man8/ip-netns.8.html https://man7.org/linux/man-pages/man8/ip-netns.8.html
- VTimofeenko 5y agoCorrection: in case of specific nsswitch configuration it may not play well with resolved. But nsswitch.conf also gets bind-mounted per network namespace: https://www.philipdeljanov.com/posts/2019/05/31/dns-leaks-with-network-namespaces/ https://www.philipdeljanov.com/posts/2019/05/31/dns-leaks-wi...