Giter Site home page Giter Site logo

websioux / cloudflaredyndns Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 9 KB

Runing Linux locally ? You have a dynamic IP but you would like to have an static address for the outisde world ? If you have a domain name, and you handle its DNS with CloudFlare, this cronjob will take care to update one of your subdomains with your local public IP when it detects this IP has changed

License: MIT License

PHP 100.00%

cloudflaredyndns's Introduction

Requirements.

  • Local Linux machine, with CURL & PHP5+
  • A domain name whose DNS are managed by Cloudflare.com

Instructions.

  1. Get your public IP click here for instance
  2. Setup a subdomain with Cloudflare DNS pointing to this IP (create a A record for this subdomain on your domain zone)
  3. Clone the repo into your local machine
  4. Open dummy-config.php, modify with your data, and save it into private-config.php
  5. Set up a crontab */5 * * * /PATH_TO/cronjob.php

How it works

Every 5 minutes the script queries ipinfo.io/ip (or an address of yours if you want copy the file ip.php to your site location) and compares it with the content of the file "myIp", if it changed, it updates the clouflare DNS for the subdomain and replace the value in "myIp". The file "myIp" is created at the first run.

cloudflaredyndns's People

Contributors

websioux avatar

Watchers

James Cloos avatar  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.