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

    DNS for several VLANs

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 1.4k 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.
    • J
      jim82
      last edited by

      Dear community,

      Thanks for an awesome product. I'm loving pfSense!  ;D

      Can anyone point me in the direction of which dns server ip address I should use for my VLANs?

      Example:
      Parent LAN(em0) has the address 10.11.1.1
      VLAN12 has the address 10.11.12.1, which means my DHCP clients also gets DNS ip as 10.11.12.1, so far so good.
      I can do NSLOOKUP from a Windows PC on that VLAN, no problem. But it annoys me that the NSLOOKUP, says "UnKnown":

      nslookup fw01
      Server: UnKnown
      Address: 10.11.12.1

      Name: fw01.mylan
      Address: 10.11.1.1

      As you can see, it resolves the IP just fine of "fw01" which is the parent LAN interface on the Pfsense box. But it's still "UnKnown".

      Hooking up directly to the LAN interface with a DHCP client, and all is fine and dandy:

      nslookup fw01
      Server: fw01.mylan
      Address: 10.11.1.1

      Name: fw01.mylan
      Address: 10.11.1.1

      So this led me to think; which local DNS ip should I use for my VLANs? The VLAN gateway or the parent LAN gateway?

      Using the VLAN gateway leads to "errors" during NSLOOKUP, but seems to work.
      Defining VLAN12 DHCP service to use the parent LAN gateway IP(10.11.1.1) as DNS server works fine without errors, when I add a firewall rule for UDP port 53 from "VLAN12" to "LAN net"

      So any tips on best practice, for assigning local DNS server ip addresses for VLANs?

      Thanks for your time
      Best regards
      Jim

      Best regards
      Jim

      Still learning, correct me if I'm wrong please.

      1 Reply Last reply Reply Quote 0
      • J
        jim82
        last edited by

        Anyone? Do you need more info? Drawings? Etc?

        Thanks
        Jim

        Best regards
        Jim

        Still learning, correct me if I'm wrong please.

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

          If you have your dns forwarder listening on all your vlan segments - Which is seems like you do since 12.1 resolved

          Name: fw01.mylan
          Address: 10.11.1.1

          If you want 10.11.12.1 to resolve to something then just put that entry in your host over rides.  Then both its reverse and forwards will responds..

          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 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • J
            jim82
            last edited by

            @johnpoz:

            If you have your dns forwarder listening on all your vlan segments - Which is seems like you do since 12.1 resolved

            Name: fw01.mylan
            Address: 10.11.1.1

            If you want 10.11.12.1 to resolve to something then just put that entry in your host over rides.  Then both its reverse and forwards will responds..

            Hi John,

            Thanks for your swift reply. Here is my comments, please advise:

            If you have your dns forwarder listening on all your vlan segments - Which is seems like you do since 12.1 resolved
            I have no idea if I have? It's just setup default.

            Name: fw01.mylan
            Address: 10.11.1.1

            If you want 10.11.12.1 to resolve to something then just put that entry in your host over rides.  Then both its reverse and forwards will responds..
            Do you mean the local hosts file on Windows?

            Thanks for your help so far.
            Jim

            Best regards
            Jim

            Still learning, correct me if I'm wrong please.

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

              No in your host over rides in in the dns forwarder on pfsense.

              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 24.11 | Lab VMs 2.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • J
                jim82
                last edited by

                @johnpoz:

                No in your host over rides in in the dns forwarder on pfsense.

                Much obliged, I'll try and report back.

                /Jim

                Best regards
                Jim

                Still learning, correct me if I'm wrong please.

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