Skip to content

Instantly share code, notes, and snippets.

@ptts
ptts / updateDns.php
Created Dec 2, 2017 — forked from Doxylamin/updateDns.php
Cloudflare + FritzBox -> DynDNS
View updateDns.php
<?php
/*
FRITZ!Box DynDNS Howto:
Update-URL: http://your-domain.tld/filename.php?user=<username>&pass=<pass>&hostname=<domain>&myip=<ipaddr>
Domainname: dyndns.your-domain.tld
Username: your-cloudflare-email-address
Password: your-cloudflare-api-token
*/
// static config:
@ptts
ptts / cf-ddns.sh
Created Dec 2, 2017 — forked from ellerbrock/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
View cf-ddns.sh
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@ptts
ptts / cloudflare-update-record.sh
Created Dec 2, 2017 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
You can’t perform that action at this time.