Thomas Waldmann
6b9c7e9511
add reverse dns lookup results for viewer's current IPs to session, show on hosts overview view (see panel at lower right)
...
not showing it in home view's jumbotron due to potential cosmetic issues
2013-11-27 08:16:49 +01:00
Thomas Waldmann
0e8f318628
add reverse dns lookup code
2013-11-27 07:14:39 +01:00
Thomas Waldmann
dd09b6b5af
nameserver update key / secret terminology cleanup
...
key = secret + algorithm
2013-11-24 05:04:07 +01:00
Thomas Waldmann
f6fb8b67bd
try to not write into session unless there is really a change or a refresh needed, reduce code duplication
...
move code from HomeView to context processor
2013-11-14 02:11:44 +01:00
Thomas Waldmann
24b687960e
deal with "nameserver not available" and "peer bad signature" in same way as with dns update errors,
2013-11-10 07:04:46 +01:00
Thomas Waldmann
bd3e7c80f7
if a dns update give a rcode != NOERROR, we log it and raise a DnsUpdateError, dyndns2 result code: "dnserr REASON" (also shown on web ui)
2013-11-10 06:29:33 +01:00
Thomas Waldmann
57641f3b9a
allow single-host update secrets, make dnstools tests work for everybody
...
the nsupdate.info zone is configured to allow updating test.nsupdate.info with a non-secret key used for the tests.
we also have a test that tries to update another host with that key and checks that this fails.
change the tests so they only use test.nsupdate.info (if possible).
single-host update secrets need a Domain record for the fqdn of this single host, the fqdn is tried first, before it tries the origin zone.
2013-11-10 05:52:41 +01:00
Thomas Waldmann
32d9f38837
when adding host, deal with Timeout and NameServerNotAvailable exceptions
...
don't add the host, in case of dns exceptions
2013-11-01 22:26:06 +01:00
Thomas Waldmann
275f0821ca
catch PeerBadSignature exception, log error, set ns to unavailable
2013-11-01 07:40:42 +01:00
Thomas Waldmann
252a7e5d0b
fix some stuff the pycharm code checker found
...
it also thought the db param of init_db is not needed, but it is, added a comment there
2013-10-27 13:34:56 +01:00
Thomas Waldmann
f30d283792
use empty search list, make sure query fqdn is really a absolute fqdn
2013-10-27 08:40:54 +01:00
Thomas Waldmann
724f35225e
move test settings to test_settings.py, add FIXME for resolver search list
...
make SECRET_KEY obviously non-secret and non-random + document it should be secret/random
2013-10-27 07:20:43 +01:00
Thomas Waldmann
6bf1f57fc1
deal with not responding nameservers (offline or unreachable)
...
if a nameserver does not respond, we flag it in the database
(available = False) and stop talking to it for 5 minutes.
after 5 minutes, we flag it available = True again and retry talking to it
(and if not successful, flag it as unavailable again).
this avoids a unresponsive UI as we do a lot of ns queries from the templates
to get v4 and v6 addresses of our hosts from master nameservers.
we log a warning when setting unavailable and a info when setting available.
2013-10-27 05:14:47 +01:00
Thomas Waldmann
49693121ea
use zones/nameserver IPs/update keys from DB, logging (thanks to asmaps)
...
remove unneeded stuff from settings
(we still need some in conftest.py for the tests, though)
init DB for tests via conftest.py
more update algorithm choices
give origin zone (if we already know it) to dnstools functions
new views: DomainOverview, DeleteDomain
unify deletion templates using delete_object.html
add django-extensions
2013-10-18 15:30:17 -07:00
Thomas Waldmann
7176599245
dnstools: add/delete/update pass-through origin now
2013-10-08 15:39:45 +02:00
Thomas Waldmann
ee4ca24f95
dnstools: fixed docstring
2013-10-08 15:20:08 +02:00
Thomas Waldmann
2dfc9707ca
dnstools: update docstrings about ValueError exceptions
2013-10-03 20:47:25 +02:00
Thomas Waldmann
2982bd6e30
new check_ip() validates if a str is a ip addr and also determines address family, deduplicate code
2013-10-03 20:39:55 +02:00
Thomas Waldmann
1924888b37
reorder imports: stdlib, other libs, django, nsupdate stuff (views, etc.)
2013-10-03 19:26:39 +02:00
Thomas Waldmann
a2afc6a253
add missing param to docstring
2013-10-03 17:59:55 +02:00
Thomas Waldmann
71e937c0da
use search list with basedomain from settings
2013-09-30 01:58:38 +02:00
Thomas Waldmann
02099fe810
prepare using multipe nameservers / basedomains
...
currently lookup is from a dict with just the values from settings.
2013-09-30 00:52:23 +02:00
Thomas Waldmann
074233430c
dnstools: implement additional functions: add and delete, with tests.
2013-09-29 17:21:22 +02:00
Thomas Waldmann
726a5696bd
added docstring
2013-09-29 02:00:15 +02:00
Thomas Waldmann
ac4860f54a
pep8 fixes
2013-09-29 01:23:27 +02:00
Thomas Waldmann
d558e2ece2
store update_secret as salted sha1 (use crypto code from django), fix bug: we also need to catch NoAnswer, not just NXDOMAIN.
...
NoAnswer == there is a record, but not of the type (A or AAAA) we requested.
NXDOMAIN == there is no record at all.
2013-09-29 00:34:47 +02:00
Thomas Waldmann
a769b4d8ed
cleanup settings access
2013-09-28 22:04:52 +02:00
Thomas Waldmann
add5e6a379
implemented update api (still without checking the DB), misc. cleanups
2013-09-28 20:39:33 +02:00
Thomas Waldmann
d71b3b8346
fix typo
2013-09-28 17:17:12 +02:00
Thomas Waldmann
be3a124fbc
implement intelligent updater (only sends ns update if IP really changed)
2013-09-28 17:05:27 +02:00
Fabian Faessler
dcd0be9e46
Merge branch 'master' of github.com:asmaps/nsupdate.info
2013-09-28 15:44:21 +02:00
Fabian Faessler
8f2209286d
moved the dns settings info the settings.py
2013-09-28 15:44:09 +02:00
Thomas Waldmann
3af80a631d
docstrings: some cleanup
2013-09-28 15:36:27 +02:00
Thomas Waldmann
f4172a306a
dns: implement updating the master server
2013-09-28 15:29:16 +02:00
Thomas Waldmann
d71122aa1c
dns: implement querying directly the master server
2013-09-28 13:47:49 +02:00