Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Multi VLAN DNS Host Overrides for Same Domain

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 789 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      secumind
      last edited by

      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

      Diagram1.png_thumb
      Diagram1.png

      1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator
        last edited by

        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.42

        This is how it would normally be done.. With an actual FQDN.. or

        www.vlan1.sampledomain.com
        www.vlan2.sampledomain.com

        If 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

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 0
        • S Offline
          secumind
          last edited by

          I was unaware that I could install BIND on PFSense but yes, now I see that option. I will take that approach.

          Thank you,

          1 Reply Last reply Reply Quote 0
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator
            last edited by

            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.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.