Git Product home page Git Product logo

nsupdate-web's Introduction

nsupdate-web

(c) Pat O'Brien [email protected] - http://github.com/drsprite Licensed under the GNU GPL 2.0 or later.

This PHP script will allow you to update your dynamic BIND zones directly from a URL POST/GET. This script grabs variables placed into the URL, and then passes them onto nsupdate which will then update your dynamic zone.

This PHP script also uses a cache file for each hostname to detect IP changes before calling nsupdate. This helps to reduce unnecessary IP changes to DNS.

I've forked this project and set it up for my own personal use, however I have generalized it for public use. Just need to change the yourdomain.com values to your domain. I'm also not a master at PHP & MySQL, so if you see any errors, please let me know!

INSTALLATION

There are two types of ways to install this script.

  1. Using a flatfile to keep track of IP history
  2. Using MySQL to keep track of IP history, as well as a way to get domain status.

To be clear, in either scenario (flatfile or MySQL), the data stored is informational only and is only used to help reduce the load on BIND by doing IP checks to prevent unnecessary nsupdate calls. By using MySQL, it allows you to get a quick status on your domain to see what is currently defined.

Option 1:

  1. Copy index_flatfile.php to the web accessible directory of your choosing that is on the same server that your dynamic DNS zones are on. Rename it to whatever you want.
  2. Create a subdirectory called cache, and give the directory write permissions.

Option 2:

  1. Copy index_mysql.php to the web accessible directory of your choosing that is on the same server that your dynamic DNS zones are on. Rename it to whatever you want.
  2. Copy config.php and styles.css to the same directory.
  3. Edit the values within config.php to match your MySQL server, username, password and database.
  4. Run the dyndns.sql script to create the table that will be used.

Once you have either option installed, simply point your browser to the directory you dropped it into with a few extra parameters.

Here's an example that will update the test subdomain to 127.0.0.1:

http://yourdomain.com/dyndns/index.php?hostname=test&ip=127.0.0.1

MySQL Version: to get a status on the dynamic domains that are currently configured for your domain:

http://yourdomain.com/dyndns/index.php?status

Note: the status just polls the MySQL database. If you have dynamic zones that have been set prior to using this script, they will not show.

DEBUG INFO

If for some reason this isn't working, you can check the variables being passed to the PHP array by adding this to your URL

http://yourdomain.com/dyndns/index.php?debug

AVAILABILITY

The fork can be found at https://github.com/drsprite/nsupdate-web

CREDITS

Original project by (c) Karl-Martin Skontorp [email protected] https://github.com/kms/nsupdate-web

nsupdate-web's People

Contributors

kms avatar poblabs 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.