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

    Emulate a hosts entry

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 807 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.
    • F Offline
      FuriousGeorge
      last edited by

      I want to have {hostname} resolve to {internal ip address), but whenever I try this pfsense pings {hostname}.{domain.tld}, which routes it out to my external DNS server and so forth.

      I have a feeling that just editing hosts would achieve what I want, but I'm sure there must be a better way I'm not finding.

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • H Offline
        heper
        last edited by

        use host-overrides in either dnsforwarder or dnsresolver (whatever you are currently using).

        be sure your clients use pfSense as their dns server

        1 Reply Last reply Reply Quote 0
        • C Offline
          cmb
          last edited by

          When you ping $hostname on any current OS, it actually does a DNS lookup for $hostname.$default-domain and uses that result. So you need a DNS override for $hostname.$default-domain, where $default-domain == domain name defined in System>General Setup.

          1 Reply Last reply Reply Quote 0
          • F Offline
            FuriousGeorge
            last edited by

            Thanks guys.  I thought I had tried that at the time I posted, and that it hadn't worked, but I probably misspelled the domain or something because of course it works fine.

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