cloudflare-dynamic-ip-fixer-upper

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 9 Imported by: 0

README

cloudflare-dynamic-ip-fixer-upper

simple program to update ips on your CF zones

should be run periodically (e.g. crontab)

Build

go build shall output ./cloudflare-dynamic-ip-fixer-upper

Usage

this program will go through every zone allocated to whatever api token you give it, so generally you should use a scoped token instead of a global one.

Create an API Token

Edit zone DNS template works fine.

Add whatever zones you want this to affect to zone resources

You could do client IP address filtering too, but something tells me if you're using this script you probably don't have the liberty of a static IP :p

Set the TTL for however long you wish.

Create your token and you're good to go :)

copy .env.example and change values cp .env.example .env

CLOUDFLARE_API_TOKEN is the token you generated earlier

DOMAINS is a comma deliminated list of DNS records you want to update

add this to your crontab

this will run every 30 minutes

crontab -e

add this line (replace the directory tho)

30 * * * * cd /home/phillip/cloudflare-dynamic-ip-fixer-upper && ./cloudflare-dynamic-ip-fixer-upper

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL