Code Monkey home page Code Monkey logo

dyndns_serveriai_lt's Introduction

Dynamic DNS for serveriai.lt

A simple dynamic dns script to update DNS records through serveriai.lt api

PHP script

Edit the script before uploading it to the hosting provider:

  1. Generate AES key and IV: dd if=/dev/urandom bs=1 count=16 2> /dev/null | xxd -p
  2. Create an API user: https://www.iv.lt/pagalba/Klient%C5%B3_sistemos_API#Specialus_API_naudotojas
  3. Encrypt the API password using AES-CBC, ex:
echo -n "YourAPIpasswordGoesHere" | \
openssl enc -aes-128-cbc -K 304d08c04replace289c11d316f7ffc8 -iv d42replace7557723c30dcde3db0d3bd | xxd -p -c 64
  1. Get your domain id: https://klientams.iv.lt/domain.php?id=xxxxx
  2. Put the api user name, domain id and the encrypted password into update_domain.php file
  3. Edit the list of domains that script allowed to update, ex $allowed_domains = array("domain1", "domain2");
  4. Save
  5. Upload

OpenWRT cron

Add this line to cron:

*/15 * * * * /usr/bin/curl --silent "https://hostedserver/update_domain.php?k=304d08c04replace289c11d316f7ffc8&i=d42replace7557723c30dcde3db0d3bd&rec=domain1โ€

This command will keep domain1 up to date with the dynamic IP address

dyndns_serveriai_lt's People

Contributors

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