hetzneronline / community-content

Hetzner Online Community Project
https://community.hetzner.com
MIT License
287 stars 353 forks source link

DNS setup "Setting up a VPC with site-to-site VPN in Hetzner Cloud" #639

Open thetredev opened 1 year ago

thetredev commented 1 year ago

Problem

In that article - https://community.hetzner.com/tutorials/vpc-with-wireguard-pfsense - under Next Steps, the following is listed:

Set up the Bind package with slave zones for all your local DNS zones and use VPC pfSense as nameserver for your VPC machines

Question

How can we do that? Could you please provide a tutorial on how to make pfSense or any router OS the default nameserver for our VPC machines inside Hetzner cloud? I'm struggling to get it working myself.

Example setup on my end

Private network: 10.0.0.0/24 pfSense: 10.0.0.2 with LAN getting 10.0.0.2 and gateway 10.0.0.1 via DHCP Client (Debian): 10.0.0.3 can ping 10.0.0.2 but nslookup google.com 10.0.0.2 results in:

$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=3.44 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=2.87 ms

$ nslookup google.com 10.0.0.2
Server:     10.0.0.2
Address:    10.0.0.2#53

** server can't find google.com: REFUSED
zoro16 commented 2 months ago

I am having the same issue

thetredev commented 2 months ago

@zoro16 thanks for jumping in. I thought I was the only one lol

zoro16 commented 2 months ago

@thetredev It turns out the Firewall Rule for LAN was blocking UDP connections, make sure the rule looks some thing like the following and try again. Screenshot_2024-07-08_12-50-04

Edit: note that my setup is a bit different than whats in the blog

thetredev commented 2 months ago

@zoro16 awesome thank you!! That makes sense.

I'm currently running a dedicated server so I don't need this specific setup anymore, but it's good to know. Leaving this issue open just in case someone stumbles upon it and struggles to find a solution.