https://github.com/computestacks/powerdns-ruby
PowerDNS Rubygem
https://github.com/computestacks/powerdns-ruby
Last synced: 8 months ago
JSON representation
PowerDNS Rubygem
- Host: GitHub
- URL: https://github.com/computestacks/powerdns-ruby
- Owner: ComputeStacks
- Created: 2020-04-14T21:00:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T22:34:15.000Z (over 3 years ago)
- Last Synced: 2025-01-10T15:23:10.987Z (over 1 year ago)
- Language: Ruby
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PowerDNS Module for ComputeStacks
#### PowerDNS Configuration
Configure PowerDNS to allow external API access. Be sure to restrict access to a particular IP or range only.
```
api=yes
api-key=GENERATE_API_KEY
webserver=yes
webserver-address=0.0.0.0
webserver-port=8081
webserver-allow-from=0.0.0.0/0,104.42.109.231/32
webserver-password=GENERATE_PASSWORD
```
#### Example:
Example connecting to Master-Slave PowerDNS Setup. Standalone PowerDNS server will use 'Native' zone type.
```
Pdns.config[:zone_type] = 'Master'
Pdns.config[:masters] = ['ns1.computestacks.net.']
Pdns.config[:nameservers] = ['ns1.computestacks.net.', 'ns2.computestacks.net.']
auth = Pdns::Auth.new(0, 'admin', 'CHANGEMENOW', 'CHANGEME')
client = Pdns::Client.new('http://ns1.computestacks.net:8081/api/v1/servers', auth)
zone = Pdns::Dns::Zone.new(client, nil)
zone.name = 'mydomain.net'
zone.save
```