Skip to content

fzg/uddns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===============================================================================
          __   __       
 __ _____/ /__/ /__  ___
/ // / _  / _  / _ \(_-<
\_,_/\_,_/\_,_/_//_/___/
                        
===============================================================================
- fzn - 2015 -
Started based work by
https://fotisl.com/blog/2011/12/creating-a-dynamic-dns-service-using-djbdns/
See:
http://cr.yp.to/djbdns/run-server.html

              ___
             |___|
           __  _  __
          / / | | \ \
         / /  |_|  \ \          very immature release
        /_/   (_)   \_\		 read: known broken.
         ___  ___  ___
        |___| ___| ___|



WHAT?
	python dynamic dns update server for djbdns
HOW?
	https + bcrypt + sqlite
WHY?
	I don't like PHP; didn't find one.

HOWTO?
	Adding users?
		uddns.py username password role
					   [1-4; admin == 4] <- NOT IMPLEMENTED YET

	GET /FUNC?u=USERNAME&p=PASSWORD[&arg=val...]

	ROLES:
		1: can edit its entries
		2: can add/edit its own/delete its own entries
		3: ???
		4: superuser

	FUNCS:	[name]		[arg]
		create4:	n
			creates ipv4 mapping with client addr
		update4:	n
			updates ipv4 mapping to client addr
		delete4:	n
			deletes ipv4 mapping
		dump:
			dumps mappings
		chown:
			changes mapping owner
		ausr:
			adds an user
		zud:
			updates zone
	Testing:
		 openssl req -new -x509 -keyout server.pem \
		  -out server.pem -days 365 -nodes			#Create cert
		 ./uddns.py user pass 4					#Add admin
		 ./uddns.py &						#Run dameon
		# Get the cert to your clients
		 socat openssl:localhost:4443,cafile=server.pem -	#Chat
		 GET /create4?u=user&p=pass&n=myownname			#create record
		 GET /dump?u=user&p=pass				#f.e. dump records
		 ./uddns.py x						#update djbdns data file
			(see recreate.sh for sample usage)

[I know using GETs to modify data is semantically wrong]

TODO:
	*Testing
	*Cleaning/Refactoring
	*IPv6 (needs some place to test)
	*integrate iodine functionality into djbdns? how to merge em?

Notes:
	built-in bcrypt from debian python3.4 doesn't go along well with this code, you might want to:
	apt-get install python3-dev libffi-dev
	wget https://bootstrap.pypa.io/get-pip.py
	python3 ./get-pip.py
	pip install bcrypt

About

python https dynamic dns update server (for djbdns/dbndns)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published