Split DNS with Resolver
-
I have multiple subnets like 192.168.1.0, 192.168.2.0, etc
For NTP server I have a hostname assigned in DNS which points to 192.168.1.1
What I want to do is to respond with the different IP depending on who is asking, i.e. for request from 192.168.2.X DNS should respond with 192.168.2.1 instead of 192.168.1.1
Is that possible? -
What advantage is this? Just create your firewall rules to allow your other vlans to get to ntp on 192.168.1.1
But what your asking you can do with views on unbound… I had given example a while back... Have to dig it up... Give me a bit...
edit: Here you go..
https://forum.pfsense.org/index.php?topic=126740.0Or you could do it by setting up host overrides with subdomains... so you have say
ntp.domain.tld
ntp.vlan.domain.tld
ntp.othervlan.domain.tld
And point those to whatever IP you want for NTP, and have your clients use the fqdn that for the vlan they are in, etc. But the easy solution is just simple firewall rule for ntp to get to 192.168.1.1 on your different vlans..
-
Many thanks for that, johnpoz!
Actually the rule was configured initially but with mistake. Once I figured that out this split dns idea came to my mind. In a mean time I just manually configured NTP server IP (from the same subnet) instead of the hostname for a few devices. Will do something nicer later on.
Thanks again!