Multi VLAN DNS Host Overrides for Same Domain
-
We are setting up a network for a group of kids to use in a school competition. We have a set of AP's, with multiple VLAN's all feeding directly into a box with PFSense 2.3.3. Behind the PFSense box (on the WAN side) we have our internet connection and a series of webservers running on VM's. Is there a way to associate DNS host overrides for the same domain name to different VM IP's based on each VLAN? As in:
-
VLAN 1 = sampledomain.com –> 192.168.1.40
-
VLAN 2 = sampledomain.com –> 192.168.1.42
-
VLAN 3 = sampledomain.com –> 192.168.1.43
-
VLAN 4 = sampledomain.com –> 192.168.1.44
-
VLAN 5 = sampledomain.com –> 192.168.1.45
Right now the VLAN's are each working fine, DHCP is setup per VLAN, so I assume there must be a way to do host overrides in DNS per VLAN but I can't seem to find a way.
I should mention, the WAN side is 192.168.1.1 and all of the webservers are in that subnet, while the LAN side is:
-
VLAN 1 = 192.168.101.0/24
-
VLAN 2 = 192.168.102.0/24
-
VLAN 3 = 192.168.103.0/24
-
VLAN 4 = 192.168.104.0/24
-
VLAN 5 = 192.168.105.0/24

-
-
So you want the fqdn samplesdomain.com to resolve to 192.168.1.40 when doing a query from the vlan 1 subnet. And you want that same sampledomain.com fqdn to resolve to 192.168.1.42 when query done from vlan 2??
So you want dns views then?
Why can you not use use
vlan1.sampledomain.com 192.168.1.40
vlsn2.sampledomain.com 192.168.1.42This is how it would normally be done.. With an actual FQDN.. or
www.vlan1.sampledomain.com
www.vlan2.sampledomain.comIf you want actual views you could install the bind package. Or they can be done with the unbound package and advanced options.
I went over it in this post
https://forum.pfsense.org/index.php?topic=126740.msg699877#msg699877 -
I was unaware that I could install BIND on PFSense but yes, now I see that option. I will take that approach.
Thank you,
-
If your familiar with bind then sure that is good option.. But the unbound method is pretty simple to do, especially if you only have a handful of fqdn to worry about.