Giter Club home page Giter Club logo

apiscp-dns-powerdns-parking's Introduction

PowerDNS Parking

A sample module that sets the origin to a parking IP address upon deletion.

Usage

  1. Clone this repo.
cd /usr/local/apnscp
git clone https://github.com/apisnetworks/apiscp-dns-powerdns-parking config/custom/powerdns-parking
sudo -u apnscp ./composer dumpautoload
  1. Register the DNS provider, called "powerdns-parking" in config/custom/boot.php.
\Opcenter\Dns::registerProvider('powerdns-parking', \apisnetworks\custom\powerdns\Module::class);
  1. Set the parking IP in config.ini.
# Set parking IP
cpcmd scope:set cp.config dns parking_ip 1.2.3.4
# Fast-forward pending restart
systemctl restart apiscp
  1. Replace "powerdns" with "powerdns-parking" for all applicable accounts. Iterate over a collection to do this quickly.
cpcmd -o json admin:collect '[]' '[dns.provider:powerdns]' | jq -r 'keys[]' | \
    while read -r SITE ; do 
	    EditDomain -c dns,provider=powerdns-parking $SITE
    done

Notes

  • Requires ApisCP v3.2.34 or later.
  • Nameservers configured for PowerDNS must be valid. These are queried directly to determine parking IP presence.
  • Parking IP is a single address.
  • All records are emptied on deletion replacing the zone with a single IP address for the origin.
  • Written as a work order. IP verification still uses newacct subdomain; this logic is adapted elsewhere.

apiscp-dns-powerdns-parking's People

Contributors

msaladna avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

fairhopeweb

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.