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

    Add WAN IP to hosts file?

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 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.
    • G
      gem7
      last edited by

      I would like to have the current WAN IP included in the hosts file so that internal clients can determine it with a local DNS lookup (rather than depending on a DDNS provider).  I see that hosts I add in the HOST OVERRIDES section of the DNS FORWARDER configuration are added to the hosts file.  Is there some type of substitution macro/alias I could enter there for the WAN IP so that it always reflects the CURRENT WAN IP (regardless of source - STATIC,DHCP,PPPOE…)?  I would envision something like: 
      host: wan  domain: mydomain.com  ip: %WANIP%

      If not, does anybody know of a different approach?

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