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

    DNS Host Overrides changing via command line

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 3 Posters 287 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.
    • E
      EngineerSB
      last edited by

      We have remote host that we have no control over that periodically changes its IP.

      at the moment, it sends an email to someone when its IP changes and that person then logs into pfsense and changes host override manually.

      This means sometimes there is a delay between the change and the update.

      We were wondering if anyone had a method of changing a host override via the command line ?

      johnpozJ S E 3 Replies Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @EngineerSB
        last edited by johnpoz

        @EngineerSB why would a pfsense that changes what I assume its wan IP require a change in some host override? Why would a pfsense box be changing its lan network?

        So I am confused to the use case here?

        You understand you could just setup a ddns so pfsense could report what its wan IP is when it changes so you could always just access it via some fqdn.. Also if you can access this pfsense via command line (ssh) why would you not be able to access its gui to change some host override.

        Confused on what/why you would need to do what your asking to be honest - not making any sense to me.

        Host overrides would be in the xml - you can always edit that directly.. Not something would recommend doing to be honest, but can be done - then just restart unbound or dnsmasq - depending on which your using, I would assume unbound.

        Also have not had chance to play with the Multi-instance Management stuff - but maybe this is something that might be able to manage - if not in its current state, more than likely some time down the road as they add functionality to this feature. This is currently available in + as early look sort of thing.

        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

        E 1 Reply Last reply Reply Quote 1
        • S
          SteveITS Galactic Empire @EngineerSB
          last edited by

          @EngineerSB The remote is not pfSense correct?

          If a public IP then dynamic DNS and a CNAME.

          If this is a private IP then it’s a little harder. Can’t do a DHCP reservation? Perhaps a “domain” override for that hostname pointing to the remote DNS server?

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          1 Reply Last reply Reply Quote 0
          • E
            EngineerSB @EngineerSB
            last edited by

            @EngineerSB The use case is that we have a need to access a device that periodically changes its IP, which we have no control over.

            I never said it was on the public network, which incidentally it isn't, so DDNS or other such similar public recourse solutions are not an option.

            Also, it doesn't get its IP from our DHCP server so we have no way of setting a reservation. we have no control over that host at all or the networking it is connected to.

            I didn't see it relevant, but we have a direct link to that network via a separate interface on our pfsense instance, our local machines use our pfsense as a DNS server and as such we use a common host name with redirection.

            hence the original question.

            if it can be done via command line, then we can setup a process that receives the email notification of the IP change, parse that for the new IP and make the change.

            thus the question is ;

            We were wondering if anyone had a method of changing a host override via the command line ?

            1 Reply Last reply Reply Quote 0
            • E
              EngineerSB @johnpoz
              last edited by

              @johnpoz "If this is a private IP then it’s a little harder. Can’t do a DHCP reservation? Perhaps a “domain” override for that hostname pointing to the remote DNS server?"

              sadly not, there isn't a local DNS server on the other network. the network is in effect a black network with very limited and extremely controlled connectivity to other resources.

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