• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 331 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 Feb 16, 2025, 5:52 PM

    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 ?

    J S E 3 Replies Last reply Feb 16, 2025, 6:18 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @EngineerSB
      last edited by johnpoz Feb 16, 2025, 6:24 PM Feb 16, 2025, 6:18 PM

      @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 Feb 18, 2025, 11:02 AM Reply Quote 1
      • S
        SteveITS Galactic Empire @EngineerSB
        last edited by Feb 16, 2025, 7:40 PM

        @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 Feb 18, 2025, 11:00 AM

          @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 Feb 18, 2025, 11:02 AM

            @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
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received