diff --git a/README.md b/README.md index 0c992b6..4aca3c6 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method" -test peach-bind9 is running, +# test peach-bind9 is running, ``` # this returns version of bind running dig -t txt -c chaos VERSION.BIND @IP_ADDRESS_OF_SERVER @@ -56,4 +56,23 @@ nslookup blue.dyn.peachcloud.org YOUR_SERVER_IP_ADDRESS nslookup blue.dyn.peachcloud.org ns.peachcloud.org ``` +# test nsupdate is working + +``` +/usr/bin/nsupdate -k /var/lib/peachcloud/peach-dyndns/tsig.key -v < Result { .append(true) .open(bind_conf_path) .unwrap_or_else(|_| panic!("failed to open {}", bind_conf_path)); + // this commented out section, with update-policy stopped working + // so we are now using allow-update + // let zone_section_text = format!( + // "\ + // zone \"{full_domain}\" {{ + // type master; + // file \"/var/lib/bind/{full_domain}\"; + // update-policy {{ + // grant {full_domain} self {full_domain}; + // }}; + // }}; + // ", + // full_domain = full_domain + // ); let zone_section_text = format!( "\ zone \"{full_domain}\" {{ type master; file \"/var/lib/bind/{full_domain}\"; - update-policy {{ - grant {full_domain} self {full_domain}; - }}; + allow-update {{key \"{full_domain}\";}}; }}; ", full_domain = full_domain