NOTE:
- This example will use 192.168.1.99 for truenas static ip and example.com for parent domain as placeholders
- This example will use openspeedtest as an example app
Add static mapping in dhcp server for trueNAS-SCALE system pfsense example
speedtest.example.com
/
prefix
NOTE:
You should probably only do this if you have already set up letsencrypt!
speedtest.example.com
example_com_cert ˅
echo "192.168.1.99 speedtest.example.com" | sudo tee -a /etc/hosts
cmd
then press CTL+SHIFT+ENTER
notepad c:\Windows\System32\Drivers\etc\hosts
192.168.1.99 speedtest.example.com
See Host Overrides And Pfsense API
Add host override
curl -u "admin:${PASSWORD}" -X POST http://pfsense.home.arpa/api/v1/services/unbound/host_override \
-H 'Content-Type: application/json' \
-d '{"domain":"example.com","host":"speedtest", "ip":"192.168.1.99"}'
Reload DNS resolver to apply changes
curl -u "admin:${PASSWORD}" -X POST http://pfsense.home.arpa/api/v1/services/unbound/apply \
-H 'Content-Type: application/json' \
-d '{"async":"false"}'