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

    How should /etc/resolv.conf look like

    DHCP and DNS
    2
    4
    3.1k
    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.
    • N
      nima.m
      last edited by

      Shoudn't the routers IP number be the first line insde the file /etc/resolv.conf :
      nameserver 192.168.10.1  <– router IP number
      nameserver 195.54.122.198  <-- DNS server from ISP

      As we know, pfsense has a option inside DNS forwarder called "Register DHCP leases in DNS forwarder"

      however, If you activated this, other computer can resolve the IP number for DHCP hosts, but the router itself can not do that.
      But if we put the routers IP number inside /etc/resolv.conf, then the router can track the hosts.

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        Our resolv.conf works as it should.  If you are having trouble with something its most likely not related to this…

        1 Reply Last reply Reply Quote 0
        • N
          nima.m
          last edited by

          Scott,

          If I don't have the routers IP as nameserver inside resolv.conf, can pfsense itself resolve all host names known to the router from dhcp (dynamic and static) ?

          1 Reply Last reply Reply Quote 0
          • S
            sullrich
            last edited by

            No.  It needs upstream routers to resolve from which is obtained either via DHCP or by setting the primary and secondary name servers in system -> general settings.

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