summaryrefslogtreecommitdiff
path: root/he-dns/README.md
blob: 7598c3abde3a40622794f3839fb682333f731f9e (plain)
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
# he-dyndns
A Python-based script to update dynamic DNS records when using the
Hurricant Electric DNS service at ``dns.he.net``. This code is
designed to ba maximally portable by relying on standard
Python 3 libraries. It is not compatible with Python 2.

# Installation
There is really nothing to install unless you need to add
Python3 stock libraries to your system. Copy he-dyndns somewhere useful
such as `/usr/local/bin`.

For Debian/Ubuntu systems: ``apt install python3-dns python3-dnspython python3-urllib3``

For Fedora systems: ``dnf install python3-dns python3-urllib3``

# Configuration
Unless using the ``--key`` argument, keys for the dyanmic record
are read from ``/etc/he-dyndns.conf`` or from an alternative
location specified by ``--keyfile``. The configuration file
format is one section [keys] with record = key pairs. For example:

```
[keys]
dynamic.example.com = 123412341234
```

Other configuration sections will be ignored.

# Usage
```
usage: he-dyndns [-h] [--v4] [--v6] [--addr4 ADDR4] [--addr6 ADDR6] [--key KEY] [--debug] record

Update Hurricane Electric DNS dynamic record

positional arguments:
  record             DNS record to update

optional arguments:
  -h, --help         show this help message and exit
  --v4               Update IPv4 A record (default)
  --v6               Update IPv6 AAAA record
  --addr4 ADDR4      Update A record with provided IP rather than detected IP
  --addr6 ADDR6      Update AAAA record with provided IP rather than detected IP
  --keyfile KEYFILE  Alternate location for key config file (default /etc/he-dns-secret.conf)
  --key KEY          HE DDNS key for record (by default read from /etc/he-dns-secret.conf or --keyfile)
  --debug            Enable debug logging

```

# Return Values
Returns 0 on success (successful change or no change) or 1 on failure. 
Failures also include a single line error message.