forked from fzg/uddns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
85 lines (73 loc) · 2.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
===============================================================================
__ __
__ _____/ /__/ /__ ___
/ // / _ / _ / _ \(_-<
\_,_/\_,_/\_,_/_//_/___/
===============================================================================
- 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