GithubHelp home page GithubHelp logo

isaacfl / cloudflareddns-powershell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fire1ce/ddns-cloudflare-powershell

1.0 1.0 0.0 23 KB

Cloudflare DDNS PowerShell Script for Windows OS. Choose any source IP address to update external or internal (WAN/LAN). Cloudflare's options proxy and TTL configurable via the parameters.

PowerShell 100.00%
ipv6 powershell-script cloudflare cloudflare-ddns cloudflare-ddns-script windows-10 ddns ddns-script

cloudflareddns-powershell's Introduction

Cloudflare DDNS - Simple PowerShell Script

contributions welcome MIT license

Cloudflare DDNS PowerShell for Windows.
Choose any source IP address to update external or internal (WAN/LAN).
Cloudflare's options proxy and TTL configurable via the parameters.
Bash Script for Linux and MacOS can be found here

Requirements

  • api-token with ZONE-DNS-EDIT Permissions
  • DNS Record must be pre created (api-token should only edit dns records)
  • Enabled running unsigned PowerShell

Start Windows PowerShell with the "Run as Administrator" option and execute this command

set-executionpolicy remotesigned

Choose A for all

Installation

Download the cloudflareDDNS-PowerShell zip file & Unzip it

Extract to Personal Folder (C:\Users\USER)

Parameters

Update the config parameters at updateDNS6.ps1 by editing the file

Option Example Description
what_ip internal Which IP should be used for the record: internal/external
what_interface Ethernet0 For internal IP, provide interface name
dns_record ddns.example.com DNS A record which will be updated
zoneid ChangeMe Cloudflare's Zone ID
proxied false Use Cloudflare proxy on dns record true/false
ttl 1 120-7200 in seconds or 1 for Auto
cloudflare_api_token ChangeMe Cloudflare API Token KEEP IT PRIVATE!!!!

Running The Script

Right click on updateDNS.ps1 click Run with PowerShell

Automation With Windows Task Scheduler

Run At boot Example with the updateDNS.ps1 C:\Users\USER\cloudflareDDNS-PowerShell-main\updateDNS6.ps1:

  • Open Task Scheduler
  • Action -> Create Task
  • General Menu
    • Name: updateDNS
    • Run whether user is logged on or not
  • Trigger
    • New...
    • Begin the task: At startup
    • Delay Task for: 1 minute
    • Enabled
  • Actions
    • New...
    • Action: Start a Program
    • Program/script: Powershell
    • Add arguments (optional): -File C:\Users\USER\cloudflareDDNS-PowerShell-main\updateDNS6.ps1
    • ok
    • Enter your user's password when prompted

Logs

This Script will create a log file with only the last run information
Log file will be located as a hidden file at the same path as updateDNS.ps1

Log file name:

.updateDNS.log

License

MIT License

Copyright© 3os.org @2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cloudflareddns-powershell's People

Contributors

fire1ce avatar isaacfl avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.