mirror of
https://github.com/fernwerker/ownDynDNS.git
synced 2025-07-10 14:15:14 +02:00
updated readme
This commit is contained in:
parent
9a71561ae6
commit
171aa7c2f0
1 changed files with 44 additions and 30 deletions
74
README.md
74
README.md
|
@ -9,37 +9,51 @@ Self-hosted dynamic DNS php-based Docker container to update netcup DNS API from
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
This docker image only provides a basic http server as default. You should never expose this to the internet!
|
||||||
|
Use a reverse proxy or run everything locally.
|
||||||
|
|
||||||
### docker-compose.yaml
|
### docker-compose.yaml
|
||||||
```
|
Take a look at docker-compose.yaml for inspiration.
|
||||||
|
|
||||||
```
|
#### The following environment variables are `required`:
|
||||||
|
env | description
|
||||||
## URL possible uses:
|
---: | :---
|
||||||
### Required parameters in URL:
|
DDNS_USER <br> DDNS_PASS | The username and password that the DynDNS client (e.g. your router) uses to authenticate to this container
|
||||||
|
NETCUP_APIKEY <br> NETCUP_APIPASS <br> NETCUP_CUSTOMERID | Your netcup credentials so this container can authorize against netcup
|
||||||
<b>user, password and domain</b> are <i> always needed</i>, as well as at least one of the following: <br>
|
|
||||||
<b>ipv4, ipv6, txt</b>
|
|
||||||
|
|
||||||
|
|
||||||
Parameter | Example | Explanation
|
#### The following environment variables are `optional`:
|
||||||
|
env | default | description
|
||||||
---: | :--- | :---
|
---: | :--- | :---
|
||||||
user | dnsupdater | username to authenticate against this script as defined in .env file. If anonymous login is allowed in .env: `anonymous`
|
DDNS_DEBUG | 0 | Includes debug information in the web response
|
||||||
password | secretpleasechange | password for that user as defined in .env file
|
DDNS_LOG | 1 | Creates a json log file
|
||||||
domain | home.example.com | `case A)` If `host` is not specified: the FQDN for your host
|
DDNS_LOGFILE | log.json | Log file location, relative to webroot
|
||||||
domain | example.com | `case B)` If you want to update the @ or * record
|
DDNS_RETURNIP | 1 | Returns the updated DNS record (IPv4, IPv6, TXT)
|
||||||
domain | example.com | `case C)` If `host`is specified: only the domain part as registered at netcup "nas.home.example.com"
|
DDNS_ALLOWCREATE | 0 | Allows for a new DNS entry to be created and set instead of only updating existing
|
||||||
host | nas.home | `case C)` If your domain contains more than 3 levels "nas.home.example.com"
|
DDNS_RESTRICTDOMAIN | 0 | Allows you to override the DNS entry to be updated
|
||||||
ipv4 | 1.2.3.4 | the ipv4 address to update an existing A record
|
DDNS_FORCEDDOMAIN | "" | When DDNS_RESTRICTDOMAIN is set, enter the registered domain name (e.g. example.com)
|
||||||
ipv6 | fe80::12:34:56 | the ipv6 address to update an existing AAAA record
|
DDNS_FORCEDHOST | "" | When DDNS_RESTRICTDOMAIN is set, enter the DNS entry host name (e.g. _acme-challenge.test.home)
|
||||||
txt | acme-challenge-text | the content to update an existing TXT record
|
|
||||||
force | true | ignore checking if the record needs to be updated, just do it anyways. Default: `false`
|
|
||||||
mode | * | `case B)` If domain is your registered domain "example.com". Possible values: `*` or `both`. Default: `@`
|
|
||||||
create | true | create all entries if none exist. e.g. will not create A if AAAA exists. Needs `allowCreate=true` in .env
|
|
||||||
customerId | 12345 | uses the URL provided credentials instead of the ones stored in .env. Needs `allowNetcupCreds=true` in .env
|
|
||||||
apiKey | 12345 | uses the URL provided credentials instead of the ones stored in .env. Needs `allowNetcupCreds=true` in .env
|
|
||||||
apiPassword | 12345 | uses the URL provided credentials instead of the ones stored in .env. Needs `allowNetcupCreds=true` in .env
|
|
||||||
|
|
||||||
|
|
||||||
|
### URL contents:
|
||||||
|
|
||||||
|
#### The following parameters are supported
|
||||||
|
|
||||||
|
`You must include: user, password, domain and one of ipv4, ipv6 and txt`
|
||||||
|
|
||||||
|
parameter | example | description
|
||||||
|
---: | :--- | :---
|
||||||
|
user | dnsupdater | The DDNS_USER
|
||||||
|
password | secretpleasechange | The DDNS_PASS
|
||||||
|
domain | `a)` home.example.com <br> `b)` example.com <br> `c)` | `a)` The FQDN to update <br> `b)` The registered domain only, for multi part host names <br> `c)` The domain if you want to update the @ or * record
|
||||||
|
host | nas.home | optional; `case b)` If your domain contains more than 3 levels, e.g. "nas.home.example.com"
|
||||||
|
ipv4 | 1.2.3.4 | the ipv4 address to update a A record
|
||||||
|
ipv6 | fe80::12:34:56 | the ipv6 address to update a AAAA record
|
||||||
|
txt | acme-challenge-text | the content to update a TXT record
|
||||||
|
force | true | optional; ignore checking if the record needs to be updated, just do it anyways. Default: `false`
|
||||||
|
mode | * | optional; `case c)` If domain is your registered domain "example.com". Possible values: `*` or `both`. Default: `@`
|
||||||
|
create | true | optional; create all entries if none exist. e.g. will not create A if AAAA exists. Needs `DDNS_ALLOWCREATE=1`
|
||||||
|
|
||||||
|
|
||||||
#### Example URL to update A record (IPv4) of home.example.com:
|
#### Example URL to update A record (IPv4) of home.example.com:
|
||||||
https://`dyndns.example.com`/update.php?user=`username`&password=`password`&domain=`home.example.com`&ipv4=`IPv4`
|
https://`dyndns.example.com`/update.php?user=`username`&password=`password`&domain=`home.example.com`&ipv4=`IPv4`
|
||||||
|
@ -73,8 +87,8 @@ https://`dyndns.example.com`/update.php?user=`username`&password=`password`&doma
|
||||||
* Domainname: `<host record that is supposed to be updated>`
|
* Domainname: `<host record that is supposed to be updated>`
|
||||||
* Multiple Domains:
|
* Multiple Domains:
|
||||||
* Domainname: `<first host record that is supposed to be updated>,<second host record that is supposed to be updated>,....`
|
* Domainname: `<first host record that is supposed to be updated>,<second host record that is supposed to be updated>,....`
|
||||||
* Username: `<username as defined in .env file>`
|
* Username: `<DDNS_USER>`
|
||||||
* Password: `<password as definied in .env file>`
|
* Password: `<DDNS_PASS>`
|
||||||
|
|
||||||
### Synology DSM Settings
|
### Synology DSM Settings
|
||||||
* Go to "Control Panel" -> "External Access" -> "DDNS"
|
* Go to "Control Panel" -> "External Access" -> "DDNS"
|
||||||
|
@ -87,8 +101,8 @@ https://`dyndns.example.com`/update.php?user=`username`&password=`password`&doma
|
||||||
* Click on "Add" to create a DDNS job
|
* Click on "Add" to create a DDNS job
|
||||||
* Select your custom provider. Notice that an asterisk [*] has appeared in front of the name to signify that this is a custom provider.
|
* Select your custom provider. Notice that an asterisk [*] has appeared in front of the name to signify that this is a custom provider.
|
||||||
* Hostname: `<host record that is supposed to be updated>`
|
* Hostname: `<host record that is supposed to be updated>`
|
||||||
* Username/Email: `<username as defined in .env file>`
|
* Username/Email: `<DDNS_USER>`
|
||||||
* Password/Key: `<password as defined in .env file>`
|
* Password/Key: `<DDNS_PASS>`
|
||||||
* External Address (IPv4): probably "Auto", uses Synology service to find own external IP
|
* External Address (IPv4): probably "Auto", uses Synology service to find own external IP
|
||||||
* External Address (IPv6): doesn't matter, currently not supported by Synology
|
* External Address (IPv6): doesn't matter, currently not supported by Synology
|
||||||
|
|
||||||
|
@ -98,7 +112,7 @@ https://`dyndns.example.com`/update.php?user=`username`&password=`password`&doma
|
||||||
* Service Type: "Custom"
|
* Service Type: "Custom"
|
||||||
* Interface to monitor: `<select you WAN interface>`
|
* Interface to monitor: `<select you WAN interface>`
|
||||||
* Interface to send update from: `<select your WAN interface>`
|
* Interface to send update from: `<select your WAN interface>`
|
||||||
* Update URL: `https://<url of your webspace>/update.php?user=<user from .env>&password=<password from .env>&ipv4=%IP%&domain=<host record to update>`
|
* Update URL: `https://<url of your webspace>/update.php?user=<DDNS_USER>&password=<DDNS_PASS>&ipv4=%IP%&domain=<host record to update>`
|
||||||
* Leave all other fields empty / default
|
* Leave all other fields empty / default
|
||||||
|
|
||||||
# run as cronjob on a **nix based device
|
# run as cronjob on a **nix based device
|
||||||
|
@ -110,4 +124,4 @@ https://`dyndns.example.com`/update.php?user=`username`&password=`password`&doma
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Published under GNU General Public License v3.0
|
Published under GNU General Public License v3.0
|
||||||
© Felix Kretschmer, 2021
|
Original: © Felix Kretschmer, 2021
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue