DNS Host Overrides changing via command line
-
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 ?
-
@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.
-
@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?
-
@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 ?
-
@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.