Git Product home page Git Product logo

ddns's People

Contributors

chenming219 avatar coldfix avatar pboehm avatar ssiuhk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ddns's Issues

TypeError: a bytes-like object is required, not 'str'

Hello, I keep getting this error when I run the build step. I think it's coming from the PowerDNS part. I'm not sure how to resolve it. If there is more detail that would help you please let me know.

Host: Ubuntu 20.04 VPS on Digital Ocean

Build fails - powerdns no longer has packages for Debian jessie

The following errors appear, it appears there are no longer Debian jessie packages for powerdns:

The following extra packages will be installed:
  init-system-helpers libboost-program-options1.55.0 libluajit-5.1-2
  libluajit-5.1-common libsodium13
Suggested packages:
  pdns-backend
The following NEW packages will be installed:
  init-system-helpers libboost-program-options1.55.0 libluajit-5.1-2
  libluajit-5.1-common libsodium13 pdns-backend-remote pdns-server
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 2454 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian/ jessie/main libboost-program-options1.55.0 amd64 1.55.0+dfsg-3 [143 kB]
Get:2 http://deb.debian.org/debian/ jessie/main libluajit-5.1-common all 2.0.3+dfsg-3 [36.6 kB]
Get:3 http://deb.debian.org/debian/ jessie/main libluajit-5.1-2 amd64 2.0.3+dfsg-3 [204 kB]
Err http://repo.powerdns.com/debian/ jessie-auth-41/main pdns-server amd64 4.1.13-1pdns.jessie
  404  Not Found
Err http://repo.powerdns.com/debian/ jessie-auth-41/main pdns-backend-remote amd64 4.1.13-1pdns.jessie
  404  Not Found
Get:4 http://deb.debian.org/debian/ jessie/main libsodium13 amd64 1.0.0-1 [138 kB]
Get:5 http://deb.debian.org/debian/ jessie/main init-system-helpers all 1.22 [14.0 kB]
Fetched 536 kB in 0s (16.7 MB/s)
E: Failed to fetch http://repo.powerdns.com/debian/pool/main/p/pdns/pdns-server_4.1.13-1pdns.jessie_amd64.deb  404  Not Found

E: Failed to fetch http://repo.powerdns.com/debian/pool/main/p/pdns/pdns-backend-remote_4.1.13-1pdns.jessie_amd64.deb  404  Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'powerdns' failed to build: The command '/bin/sh -c echo "deb http://repo.powerdns.com/debian jessie-auth-41 main" > /etc/apt/sources.list.d/pdns.list 	&& echo "Package: pdns-*\nPin: origin repo.powerdns.com\nPin-Priority: 600\n" >> /etc/apt/preferences.d/pdns 	&& curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - 	&& apt-get -y update 	&& apt-get install -y pdns-server pdns-backend-remote 	&& rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Error with PowerDNS ports in docker-compose.override.yml

I am having an error come up when I try to run docker-compose I copied my config file from the sample as stated in your guide and changed all the locations of the files and domains, am I missing something here.

ERROR: The Compose file './docker-compose.override.yml' is invalid because:
services.powerdns.ports is invalid: Invalid port "53/udp:53/udp", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]

Docker-compose failed

OS: Ubuntu 19.04

How to reproduce:

  • Checkout Repository
  • rename and modify override yml file
  • call docker-compose --project-name ddns up -d --build
➜  docker git:(master) docker-compose --project-name ddns up -d --build
Building ddns
Step 1/8 : FROM golang:1.9-alpine3.7
 ---> 8d301df1eb85
Step 2/8 : RUN apk add --no-cache git
 ---> Using cache
 ---> 0e59388d886a
Step 3/8 : WORKDIR /go/src/github.com/pboehm/ddns
 ---> Using cache
 ---> 7bac33614b9f
Step 4/8 : COPY . .
 ---> ebb520dbfa8b
Step 5/8 : RUN go-wrapper download   # "go get -d -v ./..."
 ---> Running in 7ed3346f744f
+ exec go get -v -d
github.com/garyburd/redigo (download)
Fetching https://gopkg.in/gin-gonic/gin.v1?go-get=1
Parsing meta tags from https://gopkg.in/gin-gonic/gin.v1?go-get=1 (status code 200)
get "gopkg.in/gin-gonic/gin.v1": found meta tag get.metaImport{Prefix:"gopkg.in/gin-gonic/gin.v1", VCS:"git", RepoRoot:"https://gopkg.in/gin-gonic/gin.v1"} at https://gopkg.in/gin-gonic/gin.v1?go-get=1
gopkg.in/gin-gonic/gin.v1 (download)
package gopkg.in/gin-gonic/gin.v1: code in directory /go/src/gopkg.in/gin-gonic/gin.v1 expects import "github.com/gin-gonic/gin"
Fetching https://golang.org/x/sync/errgroup?go-get=1
Parsing meta tags from https://golang.org/x/sync/errgroup?go-get=1 (status code 200)
get "golang.org/x/sync/errgroup": found meta tag get.metaImport{Prefix:"golang.org/x/sync", VCS:"git", RepoRoot:"https://go.googlesource.com/sync"} at https://golang.org/x/sync/errgroup?go-get=1
get "golang.org/x/sync/errgroup": verifying non-authoritative meta tag
Fetching https://golang.org/x/sync?go-get=1
Parsing meta tags from https://golang.org/x/sync?go-get=1 (status code 200)
golang.org/x/sync (download)
ERROR: Service 'ddns' failed to build: The command '/bin/sh -c go-wrapper download   # "go get -d -v ./..."' returned a non-zero code: 1

caddy restart loop

Hello,

such a nice project!
But in my case caddy is restating the hole time.
(cent os 7)

Did you know these problem?

best regards

Error when build: ERROR: for caddy Cannot start service caddy: b'OCI runtime create failed

Hi,
Thanks first for this amazing project.

I got and error when building projet with Caddy, can you help me?

sudo docker-compose --project-name ddns up -d --build
WARNING: The PWD variable is not set. Defaulting to a blank string.
Building ddns
Step 1/9 : FROM golang:alpine
---> 7762f5dece68
Step 2/9 : RUN apk add --no-cache git
---> Using cache
---> e50b29237515
Step 3/9 : WORKDIR /go/src/github.com/pboehm/ddns
---> Using cache
---> c9e3433e2c90
Step 4/9 : COPY . .
---> Using cache
---> 62976390e419
Step 5/9 : RUN GO111MODULE=on go get -d -v ./...
---> Using cache
---> 119699da2046
Step 6/9 : RUN GO111MODULE=on go install -v ./...
---> Using cache
---> 8bdb4c649a96
Step 7/9 : ENV GIN_MODE release
---> Using cache
---> 326edc1c5985
Step 8/9 : ENV DDNS_EXPIRATION_DAYS 10
---> Using cache
---> 491af188b846
Step 9/9 : CMD /go/bin/ddns --domain=${DDNS_DOMAIN} --soa_fqdn=${DDNS_SOA_DOMAIN} --redis=${DDNS_REDIS_HOST} --expiration-days=${DDNS_EXPIRATION_DAYS}
---> Using cache
---> 1624933e2c7a
Successfully built 1624933e2c7a
Successfully tagged ddns_ddns:latest
Building powerdns

Step 1/8 : FROM buildpack-deps:stretch-scm
---> 14048e14a2a1
Step 2/8 : RUN echo "deb [arch=amd64] http://repo.powerdns.com/debian stretch-auth-43 main" > /etc/apt/sources.list.d/pdns.list && echo "Package: pdns-\nPin: origin repo.powerdns.com\nPin-Priority: 600\n" >> /etc/apt/preferences.d/pdns && curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - && apt-get -y update && apt-get install -y pdns-server pdns-backend-remote && rm -rf /var/lib/apt/lists/
---> Using cache
---> 75c466c160a6
Step 3/8 : COPY pdns.conf /etc/powerdns/pdns.conf
---> Using cache
---> 0e5b3ad297e5
Step 4/8 : COPY entrypoint.sh /
---> Using cache
---> 899778d4c1b6
Step 5/8 : RUN chmod +x /entrypoint.sh
---> Using cache
---> ab6e37e44d6f
Step 6/8 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> 703888ded0b0
Step 7/8 : EXPOSE 53
---> Using cache
---> ea3f75b06497
Step 8/8 : CMD ["pdns_server", "--daemon=no"]
---> Using cache
---> 590b0a350969
Successfully built 590b0a350969
Successfully tagged ddns_powerdns:latest
ddns_redis_1_4f2e37c016c1 is up-to-date
ddns_ddns_1_47f5da5e47f0 is up-to-date
ddns_powerdns_1_b6fad591ebb9 is up-to-date
Starting ddns_caddy_1_c1f9cdfe8aec ... error

ERROR: for ddns_caddy_1_c1f9cdfe8aec Cannot start service caddy: b'OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/caddy/Caddyfile" to rootfs at "/etc/Caddyfile" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'

ERROR: for caddy Cannot start service caddy: b'OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/caddy/Caddyfile" to rootfs at "/etc/Caddyfile" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'
ERROR: Encountered errors while bringing up the project.

Hosted DDNS Service down or broken?

Hi,
I noticed earlier today that I could no longer resolve my Dyn DNS hosted on d.pboehm.de

DNS is giving server failures

{
  "Status": 2,
  "TC": false,
  "RD": true,
  "RA": true,
  "AD": false,
  "CD": false,
  "Question": [
    {
      "name": "casafreitag.d.pboehm.de.",
      "type": 1
    }
  ],
  "Comment": "Name servers refused query (lame delegation?) [104.45.7.23]."
}

(https://dns.google/resolve?name=casafreitag.d.pboehm.de&type=A)

And https://ddns.pboehm.de is giving 502 Bad Gateway.

Is the service down/terminated on purpose or will it be coming back online?

Best regards from Hamburg, Germany

Cannot build docker cointainer - go-wrapper error

Hi!

When I try to build ddns container with docker-compose, I get the following error:

$ docker-compose --project-name ddns up -d --build      
Building ddns
Step 1/8 : FROM golang:1.9-alpine3.7
 ---> 8d301df1eb85
Step 2/8 : RUN apk add --no-cache git
 ---> Using cache
 ---> 243fe6c0447b
Step 3/8 : WORKDIR /go/src/github.com/pboehm/ddns
 ---> Using cache
 ---> 4b3b8ddfc445
Step 4/8 : COPY . .
 ---> Using cache
 ---> d810ee2082c8
Step 5/8 : RUN go-wrapper download   # "go get -d -v ./..."
 ---> Running in 7d601e1a8632
+ exec go get -v -d
github.com/garyburd/redigo (download)
Fetching https://gopkg.in/gin-gonic/gin.v1?go-get=1
Parsing meta tags from https://gopkg.in/gin-gonic/gin.v1?go-get=1 (status code 200)
get "gopkg.in/gin-gonic/gin.v1": found meta tag get.metaImport{Prefix:"gopkg.in/gin-gonic/gin.v1", VCS:"git", RepoRoot:"https://gopkg.in/gin-gonic/gin.v1"} at https://gopkg.in/gin-gonic/gin.v1?go-get=1
gopkg.in/gin-gonic/gin.v1 (download)
package gopkg.in/gin-gonic/gin.v1: code in directory /go/src/gopkg.in/gin-gonic/gin.v1 expects import "github.com/gin-gonic/gin"
Fetching https://golang.org/x/sync/errgroup?go-get=1
Parsing meta tags from https://golang.org/x/sync/errgroup?go-get=1 (status code 200)
get "golang.org/x/sync/errgroup": found meta tag get.metaImport{Prefix:"golang.org/x/sync", VCS:"git", RepoRoot:"https://go.googlesource.com/sync"} at https://golang.org/x/sync/errgroup?go-get=1
get "golang.org/x/sync/errgroup": verifying non-authoritative meta tag
Fetching https://golang.org/x/sync?go-get=1
Parsing meta tags from https://golang.org/x/sync?go-get=1 (status code 200)
golang.org/x/sync (download)
Fetching https://golang.org/x/net/context?go-get=1
Parsing meta tags from https://golang.org/x/net/context?go-get=1 (status code 200)
get "golang.org/x/net/context": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/context?go-get=1
get "golang.org/x/net/context": verifying non-authoritative meta tag
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
golang.org/x/net (download)
ERROR: Service 'ddns' failed to build: The command '/bin/sh -c go-wrapper download   # "go get -d -v ./..."' returned a non-zero code: 1

I'm not sure which line here actually describes the error, but it seems to be the gin-tonic import near the top. I found a possibly related issue here: gin-gonic/gin#1139.

Is there some fix or workaround for this? I'm not very familiar with Go environment unfortunately.

Is port 443 required to be open?

Hello, I've been getting an error telling me that port 443 is in use by another process (my website which uses Apache2). Is there any way I can have it use a different port, or is 443 required?

Update from a ddclient

Is it possible to update analog to a Fritzbox also via a ddclient?

For example the Fritzbox configuration:

  1. DynDNS-Provider: custom
  2. Update-URL: https://domain/update/name/2aeoaqe39c73aebd4afc7b0d41420d83a12e2341
  3. Domainname, username and password can be filled in freely.

Unfortunately I have not found any information about this. Unfortunately, I have not yet managed to try it out.
The syntax from my ddclient will be:

  1. protocol=
  2. ssl=yes/no
  3. server=
  4. login=
  5. password=
  6. URL

certificate has expired after Aug 10 06:13:43 2021 GMT

$curl https://ddns.pboehm.de/
curl: (60) SSL certificate problem: certificate has expired

$echo | openssl s_client -showcerts -servername ddns.pboehm.de -connect ddns.pboehm.de:443 2>/dev/null | openssl x509 -inform pem -noout -text

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            03:ff:ef:3d:78:9a:8a:2c:aa:36:11:8b:26:49:c4:64:0f:25
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=US, O=Let's Encrypt, CN=R3
        Validity
            Not Before: May 12 06:13:43 2021 GMT
            Not After : Aug 10 06:13:43 2021 GMT
        Subject: CN=ddns.pboehm.de
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:cd:da:89:12:c2:f4:3b:f9:13:a0:aa:dc:57:b4:
                    8f:65:c0:b6:9b:f7:0a:c9:00:b0:e1:ad:64:22:33:
                    0b:01:fb:53:34:4b:ef:a5:fb:79:dc:7a:c9:32:8e:
                    51:6a:d9:cd:35:c2:8e:5f:c2:7e:6f:1f:43:6b:41:
......
......

Explicitly set ip for d.pboehm.de domain

Hey,
I think my ISP is doing something that makes your /update thingy see a falsified IP (http://myip.is and similar see a different one too)

How do you feel about adding an /update/{domain}/{token}/{ip} route to explicitly set IPs?

Caddy cannot start because of lets encrypt

When i start the server and look into the log

caddy_1     | Your sites will be served over HTTPS automatically using Let's Encrypt.
caddy_1     | By continuing, you agree to the Let's Encrypt Subscriber Agreement at:
caddy_1     |   https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
caddy_1     | 2018/05/12 15:24:11 user must agree to CA terms (use -agree flag)
caddy_1     | exit status 1
caddy_1     | Do you agree to the terms? (y/n): y
docker_caddy_1 exited with code 1

How can i fix this?

What is wrong?

ddns@jocc:~$ go get github.com/pboehm/ddns
# github.com/gin-gonic/gin
src/github.com/gin-gonic/gin/gin.go:44: undefined: sync.Pool
ddns@jocc:~$ go version
go version go1.2.1 linux/amd64

ddns@jocc:~$ echo $GOPATH
/home/ddns/

Switch ACME server for certs

I want to swap out the ACME server that caddy uses.

What would I need to add/configure to allow caddy to use a different ACME server instead of LetsEncrypt?

ACME server: https://acme.htools.work/directory

More info: https://acme.htools.work/

Please note, I need to also call an argument into caddy to reuse the key. (See more if link)

The use case would be deploying this on a handshake domain. (handhsake.org)

possibility to disable autocertbot?

is there any way to disable certbot at startup? for situations where you already have the certificate, you don't need the creation and it's stopping the server to boot up.

How to configure DNS records?

Hello.

Is the domain supposed to use the server as its NS, or just point d.domain.com to the IP? I'm a bit confused because it seems as if I should point NS to the server IP, but the install guide doesn't mention configuring a zone file.

Enable DNSSEC & Secure The Zone

I' having trouble figuring out the layout of the automated deployment.

Where would I need to update the code to use pdns to secure the zone(s) on the DNS server. Can the remote-backend API be used to both secure the zone and add the TLSA record?

Config File Setup

Ok, so here's what I have setup with my DNS Provider:
A: ns.domain.com -> IP of server
A: ddns.domain.com ->IP of server (Frontend)
NS: dyn.domain.com -> ns.domain.com

I assume that is correct from other tutorials.

Now in the configuration file, what would these values be?

pdns failing to launch, permission denied

pdns_server[21066]: Creating backend connection for TCP
pdns_server[21066]: [PIPEBackend] Unable to launch, fatal argument error: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
pdns_server[21066]: Caught an exception instantiating a backend: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
pdns_server[21066]: Cleaning up
pdns_server[21066]: TCP server is unable to launch backends - will try again when questions come in: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
systemd[1]: Started PowerDNS Authoritative Server.
-- Subject: Unit pdns.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit pdns.service has finished starting up.
--
-- The start-up result is done.
pdns_server[21066]: About to create 3 backend threads for UDP
pdns_server[21066]: [PIPEBackend] Unable to launch, fatal argument error: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
pdns_server[21066]: Caught an exception instantiating a backend: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
pdns_server[21066]: Cleaning up
pdns_server[21066]: Distributor caught fatal exception: Command '/home/moist/gocode/bin/ddns' cannot be executed: Permission denied
systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: pdns.service: Unit entered failed state.
systemd[1]: pdns.service: Failed with result 'exit-code'.

Running Ubuntu 16.04 LTS
I have given /bin/ddns executable permissions, but every time I restart pdns it fails. I think I might have the wrong version of pdns.

What version of pdns did you use for this project?

I thought my domain records were configured incorrectly, which is why I asked you how you set them up. This is actually the problem I was having the whole time.

Issue with Caddy and PowerDns when running Docker-Compose

Hi
Thank you for your work

I was just trying out ddns, but could not get past docker-compose

I get
`ERROR: for 6df584236687_ddns_powerdns_1 a bytes-like object is required, not 'str'

ERROR: for b7189245e311_ddns_caddy_1 a bytes-like object is required, not 'str'

ERROR: for powerdns a bytes-like object is required, not 'str'

ERROR: for caddy a bytes-like object is required, not 'str'
`

(full output bellow)

Is the code that is broken? I questioned if my editing of docker-compose.override.yml was the culprit, but same happens with the vanilla .sample

Any ideas on how to fix?

< FULL OUTPUT>
`WARNING: The PWD variable is not set. Defaulting to a blank string.
Removing ddns_caddy_1
Removing ddns_powerdns_1
Building ddns
Step 1/9 : FROM golang:alpine
---> 1de1afaeaa9a
Step 2/9 : RUN apk add --no-cache git
---> Using cache
---> ee130932654c
Step 3/9 : WORKDIR /go/src/github.com/pboehm/ddns
---> Using cache
---> 2527039b10f2
Step 4/9 : COPY . .
---> f0cdfbf17ba3
Step 5/9 : RUN GO111MODULE=on go get -d -v ./...
---> Running in dbe13c2f9730
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: downloading github.com/gin-gonic/gin v1.4.0
go: downloading github.com/garyburd/redigo v1.6.0
go: downloading github.com/mattn/go-isatty v0.0.7
go: downloading github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3
go: downloading gopkg.in/go-playground/validator.v8 v8.18.2
go: downloading golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223
go: downloading github.com/json-iterator/go v1.1.6
go: downloading github.com/golang/protobuf v1.3.1
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/ugorji/go v1.1.4
Removing intermediate container dbe13c2f9730
---> 32f31c41fe63
Step 6/9 : RUN GO111MODULE=on go install -v ./...
---> Running in a834cbc8f5ef
github.com/gin-contrib/sse
github.com/gin-gonic/gin/internal/json
github.com/golang/protobuf/proto
github.com/ugorji/go/codec
gopkg.in/go-playground/validator.v8
gopkg.in/yaml.v2
github.com/gin-gonic/gin/binding
github.com/gin-gonic/gin/render
golang.org/x/sys/unix
github.com/mattn/go-isatty
github.com/gin-gonic/gin
github.com/garyburd/redigo/internal
github.com/garyburd/redigo/redis
github.com/pboehm/ddns/shared
github.com/pboehm/ddns/backend
github.com/pboehm/ddns/frontend
golang.org/x/sync/errgroup
github.com/pboehm/ddns
Removing intermediate container a834cbc8f5ef
---> 3e5eb8e448db
Step 7/9 : ENV GIN_MODE release
---> Running in 15761ea01138
Removing intermediate container 15761ea01138
---> 101f92ff114d
Step 8/9 : ENV DDNS_EXPIRATION_DAYS 10
---> Running in 66ce126f9fb0
Removing intermediate container 66ce126f9fb0
---> e60d4ea7f29b
Step 9/9 : CMD /go/bin/ddns --domain=${DDNS_DOMAIN} --soa_fqdn=${DDNS_SOA_DOMAIN} --redis=${DDNS_REDIS_HOST} --expiration-days=${DDNS_EXPIRATION_DAYS}
---> Running in 62ad670b8cb5
Removing intermediate container 62ad670b8cb5
---> dee77b355fa3
Successfully built dee77b355fa3
Successfully tagged ddns_ddns:latest
Building powerdns
Step 1/8 : FROM buildpack-deps:stretch-scm
---> d39265cbd815
Step 2/8 : RUN echo "deb [arch=amd64] http://repo.powerdns.com/debian stretch-auth-43 main" > /etc/apt/sources.list.d/pdns.list && echo "Package: pdns-\nPin: origin repo.powerdns.com\nPin-Priority: 600\n" >> /etc/apt/preferences.d/pdns && curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - && apt-get -y update && apt-get install -y pdns-server pdns-backend-remote && rm -rf /var/lib/apt/lists/
---> Using cache
---> 1b9d14544e67
Step 3/8 : COPY pdns.conf /etc/powerdns/pdns.conf
---> Using cache
---> b6cfe680aedd
Step 4/8 : COPY entrypoint.sh /
---> Using cache
---> 5d69065a96d4
Step 5/8 : RUN chmod +x /entrypoint.sh
---> Using cache
---> 4247a67f8332
Step 6/8 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> 416245aec688
Step 7/8 : EXPOSE 53
---> Using cache
---> 4287ac8a8364
Step 8/8 : CMD ["pdns_server", "--daemon=no"]
---> Using cache
---> af755bf7a40b
Successfully built af755bf7a40b
Successfully tagged ddns_powerdns:latest
ddns_redis_1 is up-to-date
Recreating ddns_ddns_1 ... done
Recreating b7189245e311_ddns_caddy_1 ...
Recreating 6df584236687_ddns_powerdns_1 ...

ERROR: for 6df584236687_ddns_powerdns_1 a bytes-like object is required, not 'str'

ERROR: for b7189245e311_ddns_caddy_1 a bytes-like object is required, not 'str'

ERROR: for powerdns a bytes-like object is required, not 'str'

ERROR: for caddy a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.22/containers/3cd5f7d42d38b24456bbf0decf993c463a2f2416ec5ff3225c9a2ee03a3f0a3f/start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/compose/service.py", line 625, in start_container
container.start()
File "/usr/lib/python3/dist-packages/compose/container.py", line 241, in start
return self.client.start(self.id, **options)
File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/lib/python3/dist-packages/docker/api/container.py", line 1095, in start
self._raise_for_status(res)
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python3/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'driver failed programming external connectivity on endpoint ddns_caddy_1 (1d971102280720e1340b24efd9d1687400f3d2272a9fc8c9e91e62355abbf830): Bind for 0.0.0.0:443 failed: port is already allocated'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/docker-compose", line 11, in
load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
command()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
handler(command, command_options)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1107, in up
to_attach = up(False)
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1088, in up
return self.project.up(
File "/usr/lib/python3/dist-packages/compose/project.py", line 565, in up
results, errors = parallel.parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/project.py", line 548, in do
return service.execute_convergence_plan(
File "/usr/lib/python3/dist-packages/compose/service.py", line 561, in execute_convergence_plan
return self._execute_convergence_recreate(
File "/usr/lib/python3/dist-packages/compose/service.py", line 486, in _execute_convergence_recreate
containers, errors = parallel_execute(
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 112, in parallel_execute
raise error_to_reraise
File "/usr/lib/python3/dist-packages/compose/parallel.py", line 210, in producer
result = func(obj)
File "/usr/lib/python3/dist-packages/compose/service.py", line 481, in recreate
return self.recreate_container(
File "/usr/lib/python3/dist-packages/compose/service.py", line 602, in recreate_container
self.start_container(new_container)
File "/usr/lib/python3/dist-packages/compose/service.py", line 627, in start_container
if "driver failed programming external connectivity" in ex.explanation:
TypeError: a bytes-like object is required, not 'str`

Illegal character

Hi and thanks for this nice project!

Launching this docker-compose on ubuntu gave me an error:

ERROR: .UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 467: invalid start byte

I identified that illegal quote was used here in docker-compose.yml:

 PDNS_REMOTE_HTTP_HOST: "ddns:8053"

I corrected it and it worked nicely.

pdns fails to start in debian stretch

Hi,

I tried to deploy your scripts, but pdns fails to run once pipe.conf was created.

service pdns restart

Job for pdns.service failed because the control process exited with error code.
See "systemctl status pdns.service" and "journalctl -xe" for details.
root@ddns:~/gocode# systemctl status pdns.service
● pdns.service - PowerDNS Authoritative Server
Loaded: loaded (/lib/systemd/system/pdns.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2017-07-16 08:34:46 UTC; 502ms ago
Docs: man:pdns_server(1)
man:pdns_control(1)
https://doc.powerdns.com
Process: 18028 ExecStart=/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --write-pid=no (code=exited, status=1/FAILURE)
Main PID: 18028 (code=exited, status=1/FAILURE)

go is at v1.7 and gopath is well-defined at /path/to/gocode, fyi.

Thanks!

Cheers,
/z

How to set .htaccess / Where are the files located?

Hi
First of all, thanks for this solution here - It's amazing!

What I need to do, is set a .htaccess and .htpasswd on the webdirectory (we want user to login first, creating a host). I know I have to go into the docker to see the directory, but if I try to connect to the docker container with:

docker exec ddns_ddns_1 /bin/bash

I receive an error:

OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown

Can someone help me out here? And it would also be great to know where the created hosts are located (think will be in the powedns container), and the webdirectory.

Thanks in advance,
Patric

ddns container and port 8080

Awesome project. I am running it since months without any problem!

Now I would like to add some other proxy hosts to caddy (ddns/docker/caddy/Caddyfile). But when I am adding an other section to the Caddyfile and rebuild the docker containers the ddns frontend is not working anymore.

First assumption was that the Caddyfile was wrong (syntax) but I do not see a problem.
Than I checked the container list

CONTAINER ID   IMAGE                   COMMAND                  CREATED         STATUS         PORTS                                                                                NAMES
eba8b0eb300b   abiosoft/caddy:latest   "/bin/parent caddy -…"   5 seconds ago   Up 4 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 2015/tcp   ddns_caddy_1
c0e7d4e0a838   ddns_ddns               "/bin/sh -c '/go/bin…"   6 seconds ago   Up 5 seconds                                                                                        ddns_ddns_1
5995a2955345   ddns_powerdns           "/entrypoint.sh pdns…"   21 hours ago    Up 3 minutes   53/tcp, 0.0.0.0:53->53/udp, :::53->53/udp                                            ddns_powerdns_1
5478ec2ac127   redis:4-alpine          "docker-entrypoint.s…"   14 months ago   Up 3 minutes   6379/tcp                                                                             ddns_redis_1

and I am wondering about the missing port information for ddns container. When I remove the changes in Caddyfile and rebuild the containers everything is working - but the port information is still missing.
Caddy use ddns:8080 as target host. But How does it work when the container has no open port 8080?

Use docker hub

Hi!
I wonder if you can build this container into hub.docker.com
Thanks!

Dear, I try to install on ubuntu20.04. but got error.

Dear, I try to install on ubuntu20.04. but got error. how to do....
Thank you !

Step 2/8 : RUN echo "deb [arch=amd64] http://repo.powerdns.com/debian stretch-auth-43 main" > /etc/apt/sources.list.d/pdns.list && echo "Package: pdns-\nPin: origin repo.powerdns.com\nPin-Priority: 600\n" >> /etc/apt/preferences.d/pdns && curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - && apt-get -y update && apt-get install -y pdns-server pdns-backend-remote && rm -rf /var/lib/apt/lists/
---> Running in 6e6c618b0d59
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: apt-key output should not be parsed (stdout is not a terminal)
0 0 0 0 0 0 0 0 --:--:-- 0:01:17 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:01:18 --:--:-- 0
curl: (35) Unknown SSL protocol error in connection to repo.powerdns.com:443
gpg: no valid OpenPGP data found.
ERROR: Service 'powerdns' failed to build:

Securing host registration

Hi
Congrats for this great job. I love it.
I was wondering if there is a possiblity to secure new host registration with a password.
The idea is to make it private and prevent random visitors to register their hosts.
Thanks!

docs update - how to update IP on openwrt

Hi! Thanks for this great project (and service). This issue is actually only for documentation purposes. Maybe there could be a place (in readme or wiki) for additional ddns client configuration docs.

I'm using OpenWRT for my router and wanted to update WAN IP on pboehm/ddns service as soon as possible and to avoid running cron job every X minutes to check if IP changed.

After some research I've found in OpenWRT forums those two relevant topics:

Basically what you have to do is:

  1. Make sure you have wget with SSL support opkg install wget ca-certificates
  2. Create a file /etc/udhcpc.user with following contents
#!/bin/sh
if [ "wan" = $INTERFACE ]; then
	logger "$INTERFACE - $interface - $J_T5_source"
	/usr/bin/wget -q -O - 'https://ddns.pboehm.de/update/[HOST]/[TOKEN]?myip='${ip}''
fi
exit 0
  1. Make it executable chmod +x /etc/udhcpc.user

That's it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.