Njalla dynamic DNS updated from pfSense
Njalla dynamic DNS updated from pfSense
Go to Njalla and create your dynamic DNS record. Once you do that It should show you something like this:
https://njal.la/update/?h=<yourSubdomain>&k=<yourKey>&auto
On your records page it will fill in your subdomain and key automatically. on their documentation page it does not do this. You don't need the one from the documentation page. the one next to your dynamic DNS entry is what we want anyways.
Now on the pfSense box:
Make a new Dynamic DNS client. Service Type: Custom Interface to monitor: WAN (but might be something else depending on what you are doing) Interface to send update from: WAN (but might be something else depending on what you are doing)
In the update URL box paste in the URL Njalla gave you.
In the result Match paste in this:
{"status": 200, "message": "record updated", "value": {"A": "%IP%"}}
Now your pfsense box should know if it did a successful update or not. In your pfsense Status > System logs you should see this:
/services_dyndns_edit.php: phpDynDNS (): (Success) IP Address Updated Successfully!
Then I ran into an issue where it seemed like njalla wanted an update sooner than every 25 days and pfsense would say oh it hasn't been 25 days so I'm not telling njalla my IP is the same. well ok then. I pulled some inspiration from this thread:
https://www.reddit.com/r/PFSENSE/comments/hhvxdl/force_dynamic_dns_update_every_7_days/
So thanks u/WetwareLabs
I installed the cron package on the pfsense box and then I edited the /usr/bin/nice -n20 /etc/rc.dyndns.update command to run on the 1 minute of every hour (I think you see where this is going).
I then created a new cron to run every hour on the 0 minute that just runs this command: rm /cf/conf/dyndns_wancustom\'\'0.cache
So now every hour the firewall doesn't have the current WAN IP cached and he goes "Holy barnacles, I gotta tell Njalla my new IP!"
Now Njalla knows every 1 hour that something is still saying "hey I'm alive and here is my IP"
I know this solution is kind of ugly, but it works. I am sure almost nobody will read this or do anything with it but if you are living the real privacy lifestyle running local nextcloud and want to get at that sucker from the internet AND you don't want to pay for a static IP or use another dynamic DNS provider then maybe this is for you.