https://serverfault.com/questions/1058255/configure-dns-routing-in-wireguard
https://forums.linuxmint.com/viewtopic.php?t=321682
Last active
March 1, 2025 17:42
-
-
Save tomfun/37a61edd33071363cf6f3a47ebc635f4 to your computer and use it in GitHub Desktop.
use custom DNS (pc + resolveconf) and optional Route all via wireguard
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
[Interface] | |
PrivateKey = ... | |
Address = 10.50.10.6/32 | |
ListenPort = 1196 | |
DNS = 10.50.10.1 | |
PostUp = resolvectl dns %i 10.50.10.1 | |
#DNS = 1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001 | |
#PostUp = resolvectl dns %i 10.50.10.1 && resolvectl dns 10.50.10.1 | |
#PostDown = resolvectl revert | |
[Peer] | |
PublicKey = u3U | |
AllowedIPs = 10.50.10.0/23 | |
Endpoint = server.example.com:1196 |
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
FightFireFry1!Azbest | |
[Interface] | |
Address = 10.50.10.1/23 | |
ListenPort = 1196 | |
PrivateKey = ... | |
#PostUp = ufw route allow in on wg0 out on eth0 | |
#PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
#PreDown = ufw route delete allow in on wg0 out on eth0 | |
#PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE | |
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE | |
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o tun1 -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment