All Projects → jenkstom → python-ddns

jenkstom / python-ddns

Licence: other
A self-hosted dynamic DNS service using BIND9 and python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-ddns

Trust Dns
A Rust based DNS client, server, and resolver
Stars: ✭ 2,155 (+8188.46%)
Mutual labels:  dynamic-dns
DynamicDNS
基于DNSPod构建的DDNS软件
Stars: ✭ 21 (-19.23%)
Mutual labels:  dynamic-dns
multi-tenancy-devise
mtdevise adds basecamp style user logins to your ruby on rails application.
Stars: ✭ 27 (+3.85%)
Mutual labels:  subdomain
digitalocean-dyndns
Dynamic DNS using DigitalOcean's DNS Services
Stars: ✭ 64 (+146.15%)
Mutual labels:  dynamic-dns
dnstake
DNSTake — A fast tool to check missing hosted DNS zones that can lead to subdomain takeover
Stars: ✭ 723 (+2680.77%)
Mutual labels:  subdomain
tinydnsdyn
[mirror] Dynamic DNS for djbdns or tinydns
Stars: ✭ 18 (-30.77%)
Mutual labels:  dynamic-dns
route53-dynamic-dns
Update AWS Route53 hosted zone with current public IP address. Alternative to Dynamic DNS services such as Dyn, No-IP, etc
Stars: ✭ 29 (+11.54%)
Mutual labels:  dynamic-dns
Laravel-Tongue
🎉 Finally a subdomain localization that works how you want it to work. 🌐
Stars: ✭ 28 (+7.69%)
Mutual labels:  subdomain
magicRecon
MagicRecon is a powerful shell script to maximize the recon and data collection process of an objective and finding common vulnerabilities, all this saving the results obtained in an organized way in directories and with various formats.
Stars: ✭ 478 (+1738.46%)
Mutual labels:  subdomain
Vultr-Dynamic-DNS
Dynamically update IP addresses in Vultr DNS without services like No-IP
Stars: ✭ 18 (-30.77%)
Mutual labels:  dynamic-dns
koa-subdomain
Simple and lightweight Koa middleware to handle multilevel and wildcard subdomains
Stars: ✭ 23 (-11.54%)
Mutual labels:  subdomain
ras-fuzzer
RAS(RAndom Subdomain) Fuzzer
Stars: ✭ 42 (+61.54%)
Mutual labels:  subdomain
Sub-Drill
A very (very) FAST and simple subdomain finder based on online & free services. Without any configuration requirements.
Stars: ✭ 70 (+169.23%)
Mutual labels:  subdomain
groot
Static verification tool for DNS zone files
Stars: ✭ 60 (+130.77%)
Mutual labels:  zone-files
Dumb
Dumain Bruteforcer - a fast and flexible domain bruteforcer
Stars: ✭ 54 (+107.69%)
Mutual labels:  subdomain
docker-ddns-cloudflare
Cloudflare DDNS Script
Stars: ✭ 21 (-19.23%)
Mutual labels:  dynamic-dns
dynamic-cloud-dns
Dynamic DNS with Google Cloud Functions
Stars: ✭ 30 (+15.38%)
Mutual labels:  dynamic-dns
ksubdomain
Subdomain enumeration tool, asynchronous dns packets, use pcap to scan 1600,000 subdomains in 1 second
Stars: ✭ 320 (+1130.77%)
Mutual labels:  subdomain
DnsTube
Access your computer from anywhere. DnsTube is a Windows .NET dynamic DNS client for Cloudflare.
Stars: ✭ 137 (+426.92%)
Mutual labels:  dynamic-dns
dynamic-dns-netcup-api
A simple dynamic DNS client written in PHP for use with the netcup DNS API.
Stars: ✭ 127 (+388.46%)
Mutual labels:  dynamic-dns

python-ddns

##A simple dynamic DNS howto using BIND9's DNSSEC update system and python.

  1. Needed: linux machine with bind9, python and a web server with a cgi-bin folder setup. This how-to assumes you are using a Debian-based distro such as Debian or Ubuntu.

  2. Generate keys needed for nsupdate. Change dynamic.mydomain.com to whatever you want. Making the domain name and the key name be the same is less confusing.

     $ dnssec-keygen -a HMAC-MD5 -b 512 -n USER dynamic.mydomain.com.
    

This will create two files something like: Kdynamic.mydomain.com.+157+12505.[key|private]

  1. Move the files to /etc/dyndns, or anywhere. Set the permissions or ownership so that the web server process can read them. You could do this:

     sudo mkdir /etc/dyndns
     sudo chown root.www-data /etc/dyndns
     sudo chmod 660 /etc/dyndns
    
  2. In your bind config file (/etc/bind/named.conf.local or wherever you define your mydomain.com zone) add this into the zone definition:

     allow-update {
         key dynamic.mydomain.com.;
     };
    

So for example, the whole zone entry might look like this:

    zone "mydomain.com." {
        type master;
        allow-transfer { 1.2.3.4;};
        file "/etc/bind/pri.mydomain.com";
        allow-update {
            key dynamic.mydomain.com.;
        };
    }
  1. Create a file in /etc/bind/ called mydomain.com.keys.conf. The secret is from the "private" file created in step 2.

     key dynamic.mydomain.com. {
         algorithm HMAC-MD5;
         secret "kQQvmdkTk8l6uMYfdnIBn5Ys7uhJFvlqSD73WNzEMX42kYZ4H0cuyykTjHY7mB8N9nnZL0gpA9LJmepPYKaU0g==";
     };
    
  2. Somewhere in named.conf.local, also add a line like this:

     include "/etc/bind/mydomain.com.keys.conf";
    
  3. Bind needs to be able to write to the zone files. You may need to update permissions if you are storing your zone files in /etc/bind.

     sudo chown root.bind /etc/bind
     sudo chown 775 /etc/bind
    
  4. Create the cgi script in /usr/lib/cgi-bin/dyndns, or wherever your apache configuration puts the cgi-bin folder at. The package "sh" might not be installed. Go to http://www.pip-installer.org to install pip, and install sh with "sudo pip install sh". You can rewrite it to use os.system if you prefer.

Change the 1234 in the "adler32" function to some random number that only you know. It needs to match the number in the next step. This is just a secret used to verify the hash key and allow updates.

Set it to be executable by the web server:

    sudo chown root.www-data /usr/lib/cgi-bin/dyndns
    sudo chmod 550 /usr/lib/cgi-bin/dyndns
  1. You'll need python, and you may need to install some modules with pip

     sudo apt-get install python
    

You can try:

    sudo apt-get install python-sh

If that doesn't work you'll have to try:

    sudo apt-get install python-pip python-sh

If there isn't a python-sh package, install with pip:

    sudo pip install sh
  1. Create getddkey in /usr/local/bin. Change the 1234 to some random number that only you know. This needs to match the number you changed in the previous step. Set this as executable

    sudo cp getddkey /usr/local/bin
    sudo chown root.root /usr/local/bin
    sudo chmod +x /usr/local/bin/getddkey
    
  2. You can enable updates for any subdomain, such as x.mydomain.com or home.mydomain.com, by getting the hash key for it. To get the key, run getddkey and pass the subdomain name.

    $ getddkey x
    http://mydomain.com/cgi-bin/dyndns?name=x&key=38472837
    

(Note that your keys should be different if you changed the 1234 to some other number.)

  1. Leave the ip parameter off to use the IP you are calling from:

    http://mydomain.com/cgi-bin/dyndns?name=x&key=38472837&ip=10.0.0.1
    

If you have https setup pointing to the same cgi-bin folder you can use that to be more secure.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].