ddnsupdate 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/HISTORY +3 -0
  2. data/README.md +160 -1
  3. metadata +38 -41
data/HISTORY CHANGED
@@ -1,6 +1,9 @@
1
1
  DDNS Update History
2
2
  ===================
3
3
 
4
+ Version 0.1.6 (2011-09-09)
5
+ * README update
6
+ * gem dependencies updated
4
7
  Version 0.1.5 (2011-09-08)
5
8
  * Some DNS don't answer to SOA requests for hosts/subdomains (AEX I'm looking at you!) so we try domains recursively
6
9
  Version 0.1.1 (2011-09-08)
data/README.md CHANGED
@@ -1 +1,160 @@
1
- Comming soon
1
+ DDNSUpdate
2
+ ==========
3
+
4
+ DDNSUpdate is a simple wrapper around nsupdate and dig to make updating
5
+ a dynamic dns host easier. Right now, options are quite limited (single
6
+ host with optionnal wildcard) but it may change over time.
7
+
8
+ **Author**: [Hugues Lismonde](mailto:ryan@wonko.com)
9
+
10
+ **Version**: 0.1.6 (2011-09-09)
11
+
12
+ **Copyright**: Copyright (c) 2011 Hugues Lismonde. All rights reserved.
13
+
14
+ **License**: WTFPL 2.0 (http://sam.zoy.org/wtfpl/)
15
+
16
+ **Website**: http://github.com/epicagency/ddnsupdate/
17
+
18
+
19
+ Installation
20
+ ------------
21
+
22
+ gem install ddnsupdate
23
+
24
+ Usage
25
+ -----
26
+
27
+ ddnsupdate <command> [options]
28
+
29
+ **Commands:**
30
+
31
+ up: Updates host
32
+ gen: Generate secret key from password
33
+ ip: Display current local or remote ip
34
+
35
+ **Update options:**
36
+
37
+ --key, -k <s>: DNS Key
38
+ --host, -h <s>: Hostname to update
39
+ --remote, -r: Use remote IP (default: local ip)
40
+ --wild, -w: Add a wildcard on the same IP (i.e. *.host IN A ip)
41
+
42
+ **Generate options:**
43
+
44
+ --pass, -p <s>: Password to hash
45
+ --bind, -b <s>: Output as a bind key definition
46
+
47
+ **IP options:**
48
+
49
+ --remote, -r: Display remote ip instead of local
50
+
51
+ Usage example
52
+ -------------
53
+
54
+ First you have to setup your dns server (see below for an example). Once
55
+ done, generate a key for your host by running:
56
+
57
+ ddnsupdate gen -p <password>
58
+
59
+ Append `-b <hostname>` to output to a bind key format if that's what you
60
+ use.
61
+
62
+ After your setup is complete, periodicaly run:
63
+
64
+ ddnsupdate up -h <hostname> -k <password>
65
+
66
+ This will update <hostname> with your local ip (usefull for testing on a
67
+ local network). If you want it to be your remote IP simply add `-r`.
68
+
69
+ You can also use the `-w` flag to add a wildcard to your host, pointing
70
+ on the same IP (so host.name and \*.host.name both point on the same
71
+ address).
72
+
73
+ Bind configuration example
74
+ --------------------------
75
+
76
+ For DDNSUpdate to be of any use you need to have a DNS server that
77
+ accepts dynamic update through `nsupdate`. Here you'll find a quick
78
+ example how to setup a zone to do just that.
79
+
80
+ First you'll have to chose a subdomain to use. While it's possible to
81
+ set it up on the root domain, I strongly recommand you do not so if you
82
+ have static hosts defined. nsupdate will mess with your zone file,
83
+ rendering it unreadable.
84
+
85
+ So, let's say we have `example.com` as our root domain and we want to
86
+ use `dyn.example.com` for our dynamic needs. First thing to do is
87
+ delegate the subdomain to another server (it doesn't need to be a
88
+ physically different host).
89
+
90
+ In the `example.com` zone file add:
91
+
92
+ $ORIGIN dyn.example.com.
93
+ @ IN NS dns.example.com.
94
+
95
+ Where `dns.example.com` is the server that will host the sub zone.
96
+
97
+ Then, create a new zone file for the sub zone and add the SOA:
98
+
99
+ $ORIGIN .
100
+ $TTL 300 ; 5 minutes
101
+ @ IN SOA dns.example.com. info.example.com. (
102
+ 2011090933 ; serial
103
+ 1800 ; refresh (30 minutes)
104
+ 900 ; retry (15 minutes)
105
+ 604800 ; expire (1 week)
106
+ 1800 ; minimum (30 minutes)
107
+ )
108
+ NS dns.example.com.
109
+
110
+ A TTL of 5 minutes is good but change according to your needs.
111
+
112
+ Finally you need to update your `named.conf` to allow ddnsupdate to
113
+ update the zone.
114
+
115
+ zone "dyn.example.com" {
116
+ type master;
117
+ file "/var/named/dyn.example.com.conf";
118
+ update-policy {
119
+ grant *.dyn.example.com. self dyn.example.com. A;
120
+ };
121
+ };
122
+
123
+ Add your key files (use `ddnsupdate gen -p <pass> -b <host>` to get one
124
+ suitable for ddnsupdate):
125
+
126
+ key "host1.dyn.example.com." {
127
+ algorithm hmac-md5;
128
+ secret "YWNiZDE4ZGI0Y2MyZjg1Y2VkZWY2NTRmY2NjNGE0ZDg=";
129
+ };
130
+
131
+ Reload named and you should be good to go.
132
+
133
+ If you want to allow wildcard updates, you will need to add one grant
134
+ line per host allowed using the following model:
135
+
136
+ grant host1.dyn.example.com. subdomain host1.dyn.example.com. A;
137
+
138
+ Know issues
139
+ -----------
140
+
141
+ * If ddnsupdate can't find the SOA for the given host it will probably
142
+ loop infinitely. That will be corrected in the near future.
143
+
144
+ License
145
+ -------
146
+ <pre>
147
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
148
+ Version 2, December 2004
149
+
150
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
151
+
152
+ Everyone is permitted to copy and distribute verbatim or modified
153
+ copies of this license document, and changing it is allowed as long
154
+ as the name is changed.
155
+
156
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
157
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
158
+
159
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
160
+ </pre>
metadata CHANGED
@@ -1,68 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ddnsupdate
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 5
9
- version: 0.1.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Hugues Lismonde
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
12
+ date: 2011-09-09 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: trollop
16
+ requirement: &70214331638360 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.13'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70214331638360
25
+ description: ! 'DDNSUpdate is a wrapper around nsupdate to facilitate dynamic dns
26
+ updates
16
27
 
17
- date: 2011-09-08 00:00:00 +02:00
18
- default_executable:
19
- dependencies: []
20
-
21
- description:
28
+ '
22
29
  email: hugues@epic.net
23
- executables:
30
+ executables:
24
31
  - ddnsupdate
25
32
  extensions: []
26
-
27
33
  extra_rdoc_files: []
28
-
29
- files:
34
+ files:
30
35
  - HISTORY
31
36
  - LICENSE
32
37
  - README.md
33
38
  - bin/ddnsupdate
34
39
  - lib/ddnsupdate.rb
35
- has_rdoc: true
36
40
  homepage: https://github.com/epicagency/ddnsupdate/
37
41
  licenses: []
38
-
39
42
  post_install_message:
40
43
  rdoc_options: []
41
-
42
- require_paths:
44
+ require_paths:
43
45
  - lib
44
- required_ruby_version: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- segments:
49
- - 1
50
- - 8
51
- - 6
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
52
51
  version: 1.8.6
53
- required_rubygems_version: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- segments:
58
- - 0
59
- version: "0"
60
- requirements: []
61
-
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements:
59
+ - nsupdate, dig
62
60
  rubyforge_project:
63
- rubygems_version: 1.3.6
61
+ rubygems_version: 1.8.10
64
62
  signing_key:
65
63
  specification_version: 3
66
64
  summary: Performs dynamic dns updates
67
65
  test_files: []
68
-