Lambda responsible for cloning a local DNS records (based on pinned/static DHCP-leases) to Cloudflare.
- Adjust
wrangler.toml
to your environment. - Set API Bearer token via
wrangler secret put API_BEARER
. - Set Cloudflare API token (with DNS-Edit permission) via
wrangler secret put CF_API_TOKEN
- Set target Zone ID via
wrangler secret put CF_ZONE_ID
- Set record zone (suffix, example: "internal.0x08.in" for devices on "xxxx.internal.0x08.in") via
wrangler secret put CF_RECORD_ZONE
- Install Wrangler
- Install dependencies with
npm ci
- Debug and develop locally with
wrangler dev
- Deploy with
wrangler deploy
- Download and import Cloudflare API root certificates.
- Adjust and copy the content of
mikrotik/dhcp-lease-script.ros
as DHCP Server's lease script.