Giter Site home page Giter Site logo

dldns's Introduction

DLDNS - Dinamic Linode DNS

About

I created this simple tool to automatically update DNS entries for domains hosted at Linode. Uses Linode API v4 to update domain records to a specified target. It's used in combination with cron to update IPs after they change.

How to install it

Download or clone this project. Rename .env.example file to .env. Make sure you set the LINODE_PAT to your Linode personal access token. Don't forget to run composer install.

How to obtain a Personal Access Token

Sign into the new Linode Manager. Go to My Profile and API Tokens.

alt text

Create a new Personal Access Token. Make sure to provide proper access level for Domains.

alt text

Get the token and put it in .env file.

alt text

Usage instructions

helper-domains.php

This script shows a table with all your Linode domains:

php helper-domains.php

E.g.:

alt text

helper-records.php

Lists all the records from a domain. Requires the domain ID provided as argument: domain_id=123456.

php helper-records.php domain_id=123456

E.g.:

alt text

update-record.php

Updates the target for a specified record. Requires domain ID (domain_id=123456) and record ID (record_id=9876543) provided as arguments. Also a target IP (target_ip=1.1.1.1) argument is optional. If provided sets the record target to the argument value. Otherwise obtains the system's public IP address and uses it as target:

php update-record.php domain_id=123456 record_id=9876543
php update-record.php domain_id=123456 record_id=9876543 target_ip=123.234.211.211

E.g.

alt text

dldns's People

Contributors

alexandrumos 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.