I have an internal DNS zone on Google Cloud Platform with an A record for dev.internal
which points to the IP of the VM say 10.0.0.17. When I am on the GCP VM node/server via ssh I can ping dev.internal
and it resolves to 10.0.0.17.
I now setup a wireguard peer with my laptop machine. My server side settings are:
[Interface]
Address = 192.168.69.1/24
ListenPort = 51820
PrivateKey = SERVER_KEY
PostUp = iptables -A FORWARD -i wg0 -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens4 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens4 -j MASQUERADE
[Peer]
PublicKey = CLIENT_KEY
AllowedIPs = 192.168.69.2
PersistentKeepalive = 25
and my client side (laptop -I am using Ubuntu 20.01) settings are
[Interface]
Address = 192.168.69.2/32
PrivateKey = CLIENT_PRIVATE_KEY
DNS = 192.168.69.1
[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = 35.XX.XX.XX:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 21
I confirm that the client and server peer is up, I go to ifconfig.co or whatsmyip from client and it shows me the 35.XX.XX.XX (server) ip.
On the client side I want to now access the 10.0.0.17 IP by resolving through the dev.internal
zone on the VM.
ping dev.internal
ping: dev.internal: Name or service not known
What do I need to set on either the client or the server so that the client will be able to resolve the IP pointed to by the internal zone?
On Google Cloud the internal resolver is at 169.254.169.254.
I have tried it with and without DNS = 192.168.69.1
in the client and get the same result.
question from:
https://stackoverflow.com/questions/65922282/how-do-i-get-wireguard-to-resolve-internal-dns-names-on-google-compute-engine 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…