Code Monkey home page Code Monkey logo

python-cloudflare-dns-ip-update's Introduction

Python-Cloudflare-DNS-IP-Update

อัพเดท Cloudflare DNS IP Address ด้วย Python

ขั้นตอนการใช้งาน

  1. ทำการชี้โดเมนเนมของเราไปใช้บริการ DNS Service ของ Cloudflare ให้เรียบร้อย
  2. ให้ทำการสร้าง DNS A record ขึ้นมา 1 ชื่อ เช่น home.mydomain.com
  3. หลังจากนั้นเราจะทำการเขียน Script Python (โค้ดอยู่ด้านล่าง) ให้ทำการอัพเดท IP Address ของเน็ตในบ้าน ให้กับ home.mydomain.com
  4. ตั้ง Cron job ให้ทำการการ Run script นี้เป็นระยะๆ
  5. ต่อไปก็สามารถเรียกใช้งานมายังอุปกรณ์หรือระบบในบ้านผ่าน home.mydomain.com ได้ตลอดไป

ในส่วนของการใช้งาน หลังจากกำหนดค่าตัวแปรต่างๆ เสร็จให้ทำการรันโค้ด 1 ครั้งก่อน เพื่อหาค่า RECORD_ID ของ dns record ที่เราจะทำการอัพเดท IP เมื่อได้ค่า id มาแล้ว ก็เอามาใส่ให้กับตัวแปร RECORD_ID ได้เลยครับ

โค้ดนี้ดัดแปลงมาจากลิ้งค์นี้นะครับ https://www.nathanvangheem.com/posts/2018/07/15/auto-update-cloudflare-dns.html

python-cloudflare-dns-ip-update's People

Contributors

jpnetwork avatar

Watchers

 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.