dynamic-ish DNS for gandi and porkbun [ no namecheap support until namecheap opens up thier API!! >:( ]
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
forest 8f542d16f9 Update 'ReadMe.md' 2 weeks ago
deployment refactoring dns resolver so that hosts file entries dont clobber 2 years ago
.gitignore fixing bugs found at layerze.ro setup 3 years ago
Dockerfile first working version 3 years ago
ReadMe.md Update 'ReadMe.md' 2 weeks ago
build-docker.sh refactor to allow for multiple registrar accounts 1 year ago
config.go OOOPS lol kinda important to actually check if things changed 2 weeks ago
config.json refactor to allow for multiple registrar accounts 1 year ago
dns_echo_ip_service.go IPv6 Support is working 7 months ago
dns_resolver.go IPv6 Support is working 7 months ago
gandi_service.go fixing bugs related to ipv6 changes 7 months ago
go.mod IPv6 Support is working 7 months ago
go.sum IPv6 Support is working 7 months ago
http_plaintext_ip_service.go IPv6 Support is working 7 months ago
ip6_dot_me_service.go IPv6 Support is working 7 months ago
libp2p_self_ip.go first working version 3 years ago
main.go fix logic 2 weeks ago
my_ipv6_address_dotcom_service.go IPv6 Support is working 7 months ago
porkbun_service.go Setting more timeouts.. ? 3 weeks ago

ReadMe.md

DNS Updater

Uses Gandi's LiveDNS API to keep my A records up to date when CenturyLink changes my home IP address.

It polls intelligently: It spams YOUR domains that you configure to determine if everything is ok. Only when your stuff goes down does it start talking to gandi. Once it gets the current list of resource records for a domain does it then proceed to determine its public IP and attempt to update the records.

It uses a consensus of over 50% of the following 3rd party services in order to determine its current public IP:

  • myipv6address.com
  • ip6.me/api
  • icanhazip.com
  • getmyip.dev
  • ipify.org
  • myip.opendns.com
  • o-o.myaddr.l.google.com

Example Config

{
  "PingPongLog": false,
  "HealthPollingSeconds": 60,
  "ResetAfterConsecutiveFailures": 3,
  "IPv6Enabled": true,
  "CheckIfInternetIsReachableURLs": [
    "http://connectivitycheck.gstatic.com/generate_204",
    "http://www.apple.com/library/test/success.html",
    "http://www.msftconnecttest.com/connecttest.txt"
  ],
  "DNSResolvers": [
    "8.8.8.8:53",
    "9.9.9.9:53",
    "1.1.1.1:53"
  ],
  "RegistrarAccounts": [
    {
      "Label": "sequentialread-gandi",
      "Provider": "gandi",
      "SecretKey" : "*****************",
      "RecordTTLSeconds": 300
    }
  ]
  "Domains": [
    {
      "RegistrarAccountLabel": "sequentialread-gandi", 
      "Domain": "sequentialread.com",
      "Records": [
        {
          "Name": "@",
          "Type": "A"
        },
        {
          "Name": "*",
          "Type": "A"
        },
        {
          "Name": "@",
          "Type": "AAAA"
        },
        {
          "Name": "*",
          "Type": "AAAA"
        }
      ]
    },
    {
      "RegistrarAccountLabel": "sequentialread-gandi", 
      "Domain": "server.garden",
      "Records": [
        {
          "Name": "@",
          "Type": "A"
        },
        {
          "Name": "www",
          "Type": "A"
        },
        {
          "Name": "@",
          "Type": "AAAA"
        },
        {
          "Name": "www",
          "Type": "AAAA"
        }
      ]
    }
  ]
}

or

    environment:
      - GDU_IPV6ENABLED=true
      - GDU_REGISTRARACCOUNTS_0_LABEL=sequentialread-gandi
      - GDU_REGISTRARACCOUNTS_0_PROVIDER=gandi
      - GDU_REGISTRARACCOUNTS_0_SECRETKEY=${GREENHOUSE_GANDI_API_KEY}
      - GDU_REGISTRARACCOUNTS_0_RECORDTTLSECONDS=300
      - GDU_DOMAINS_0_REGISTRARACCOUNTLABEL=sequentialread-gandi
      - GDU_DOMAINS_0_DOMAIN=sequentialread.com
      - GDU_DOMAINS_0_RECORDS_0_NAME=@
      - GDU_DOMAINS_0_RECORDS_0_TYPE=A
      - GDU_DOMAINS_0_RECORDS_1_NAME=*
      - GDU_DOMAINS_0_RECORDS_1_TYPE=A
      - GDU_DOMAINS_0_RECORDS_2_NAME=@
      - GDU_DOMAINS_0_RECORDS_2_TYPE=AAAA
      - GDU_DOMAINS_0_RECORDS_3_NAME=*
      - GDU_DOMAINS_0_RECORDS_4_TYPE=AAAA
      - GDU_DOMAINS_1_REGISTRARACCOUNTLABEL=sequentialread-gandi
      - GDU_DOMAINS_1_DOMAIN=server.garden
      - GDU_DOMAINS_1_RECORDS_0_NAME=@
      - GDU_DOMAINS_1_RECORDS_0_TYPE=A
      - GDU_DOMAINS_1_RECORDS_1_NAME=www
      - GDU_DOMAINS_1_RECORDS_1_TYPE=A
      - GDU_DOMAINS_1_RECORDS_2_NAME=@
      - GDU_DOMAINS_1_RECORDS_2_TYPE=AAAA
      - GDU_DOMAINS_1_RECORDS_3_NAME=www
      - GDU_DOMAINS_1_RECORDS_3_TYPE=AAAA

layerze.ro deployment

Build the app & webclip the build:

$ GOARCH=amd64 go build -o gandi-dns-updater .
$ curl https://webclip.sequentialread.com/gandi-dns-updater | bash

Deploy the new binary from webclip:

sudo -i

cd /opt/gandi-dns-updater && service gandi-dns-updater stop && rm gandi-dns-updater && curl https://webclip.sequentialread.com > gandi-dns-updater && chmod +x gandi-dns-updater && service gandi-dns-updater start

OR

cd /opt/gandi-dns-updater && systemctl stop gandi-dns-updater && rm gandi-dns-updater && curl https://webclip.sequentialread.com > gandi-dns-updater && chmod +x gandi-dns-updater && systemctl start gandi-dns-updater