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

    Add the search domain in resolv.conf

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 620 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.
    • P
      pvasirani
      last edited by

      Hi,

      Is it possible to add a second search domain in resolv.conf?

      The hand-edited file works but, of course, is rewritten by the PFSense configurations.

      Thanks in advance

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

        @pvasirani do you have a use case example for this? I just having a hard time understanding to be honest why any search domain is even needed on pfsense.

        When are you on pfsense looking up stuff and not using the fqdn in your query? Are you doing this so often that it makes sense have multiple search domains?

        But if something you would like to see, you can always put in a feature request

        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.8, 24.11

        P 1 Reply Last reply Reply Quote 0
        • P
          pvasirani @johnpoz
          last edited by

          @johnpoz
          My "problem" is that 2 domains (Active Directory) access pfsense. Name resolution must check these two (internal) domains to "find" the correct resolution.

          However, I fully agree that the FQDN must always be indicated, but it is not always available in the infrastructure.

          Example of resolve.conf
          nameserver 10.10.0.1
          nameserver 10.20.0.2
          search domain1.local
          search domain2.local

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

            @pvasirani still not getting what your looking to do..

            The only time resolv.conf comes into play is if you were on the console of pfsense and looking for something via just host name..

            How often are you on the console and trying to resolve just a hostname?

            This does not come into play if some client is asking pfsense for dns..

            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.8, 24.11

            P 1 Reply Last reply Reply Quote 0
            • P
              pvasirani @johnpoz
              last edited by

              @johnpoz Thanks for the explanation, if it works this way I think I won't need it.
              Thank you

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

                @pvasirani your clients asking pfsense for dns should have whatever search suffixes they want to use on themselves.

                If you want unbound to ask specific NS your running locally on your network when a client asks for something, this would be setup in a domain override on unbound.

                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.8, 24.11

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