Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line 26 of update.php invalid #1

Open
m-hume opened this issue Oct 7, 2021 · 2 comments
Open

line 26 of update.php invalid #1

m-hume opened this issue Oct 7, 2021 · 2 comments

Comments

@m-hume
Copy link

m-hume commented Oct 7, 2021

line 26 is not valid php
$key = 'hmac-sha256:name KEY')

could we get a description on what this is supposed to be?
cheers

@bigon
Copy link

bigon commented Jan 28, 2023

key is supposed to be

$key = 'hmac-sha256:name KEY'; (there is a typo at the end) where name is the name of the key defined in bind configuration and KEY the key itself

@kbabioch
Copy link
Owner

Yes, there is indeed a typo (missing semi-colon). Thank you for noticing.

This is basically a variable that contains the secret that is used to have a secure communication between this script and the nameserver.

In reality it will look something like this:

$key = 'hmac-sha256:ddns-update XXXXXXXXXX';

You can generate such a key using the tsig-keygen command:

[root@ns1 ~]# tsig-keygen -a hmac-sha256 example.com
key "example.com" {
        algorithm hmac-sha256;
        secret "RozyZlWfIa3arEJDG5mhINyW1mPyCR59ydvAZbye3O4=";
};

I guess this needs better / further documentation. Will update it eventually, leaving this issue open in the mean time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants