DynDNS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
On OpenWRT create the following script in /usr/lib/ddns/update_nsupdate.sh : | On OpenWRT create the following script in /usr/lib/ddns/update_nsupdate.sh : | ||
#!/bin/sh | #!/bin/sh | ||
echo "Update | echo "Update $domain to ip $__IP" | ||
cat <<EOF | /usr/bin/nsupdate -y | cat <<EOF | /usr/bin/nsupdate -y $username:$password | ||
server 172.16.3.15 | server 172.16.3.15 | ||
update del | update del $domain A | ||
update add | update add $domain 60 A $__IP | ||
send | send | ||
EOF | EOF | ||
In OpenWRT DDNS put custom script /usr/lib/ddns/update_nsupdate.sh, username dyndns, password ReplaceWithBase64Key==, domain dyn.conti.work | In OpenWRT DDNS put custom script /usr/lib/ddns/update_nsupdate.sh, username dyndns, password ReplaceWithBase64Key==, domain dyn.conti.work | ||
Revision as of 21:05, 25 February 2015
Add to pdns.conf:
experimental-dnsupdate=yes allow-dnsupdate-from=
Check the domain id in psql
sudo psql -U powerdns -W powerdns
select id from domains where name='conti.work';
insert into domainmetadata(domain_id, kind, content) values(DOMAINIDHERE, 'ALLOW-DNSUPDATE-FROM','172.16.0.0/16');
insert into tsigkeys (name, algorithm, secret) values ('dyndns', 'hmac-md5', 'ReplaceWithBase64Key==');
insert into domainmetadata (domain_id, kind, content) values (DOMAINIDHERE, 'TSIG-ALLOW-DNSUPDATE', 'dyndns');
For reference see here [1]
On OpenWRT create the following script in /usr/lib/ddns/update_nsupdate.sh :
#!/bin/sh echo "Update $domain to ip $__IP" cat <<EOF | /usr/bin/nsupdate -y $username:$password server 172.16.3.15 update del $domain A update add $domain 60 A $__IP send EOF
In OpenWRT DDNS put custom script /usr/lib/ddns/update_nsupdate.sh, username dyndns, password ReplaceWithBase64Key==, domain dyn.conti.work