TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

DHCP leases lost when updating #675

Closed zpxp closed 1 year ago

zpxp commented 1 year ago

Updated from 11.1 to 11.3 and it lost existing DHCP leases so devices connected to the network could no longer connect. This may also happen when restarting idk. If it does perhaps persist leases to disk so they are persistent during restarts.

Im running this in a docker container if that makes a difference.

ShreyasZare commented 1 year ago

Thanks for the feedback. The DHCP lease data is stored on disk in the .scope files so they are expected to be persistent and restarting or upgrade should not have any effect on it.

Since you are using docker, was only the lease data lost or all config got reset?

zpxp commented 1 year ago

All config got reset. I didnt change the volume path or any docker compose config

ShreyasZare commented 1 year ago

All config got reset. I didnt change the volume path or any docker compose config

It seems to be something related to volume path. The volume path was changed in 11.0.1 to /etc/dns. Just confirm if the docker container is using /etc/dns as the volume path.

Or, if you had a backup zip exported earlier, then use the same to restore the settings.

zpxp commented 1 year ago

Ok that is probably the issue then. This is my compose file

services:
  dns:
    #container_name: ts-dnsserver
    #build: .
    image: technitium/dns-server:latest
    # network_mode: host
    ports:
      - "80:5380"
      - "53:53/udp" #DNS service
      - "53:53/tcp" #DNS service
      - "67:67/udp" #DHCP service
      # - "853:853/tcp" #DNS-over-TLS service
      # - "443:443/tcp" #DNS-over-HTTPS service
      # - "80:80/tcp" #DNS-over-HTTPS service certbot certificate renewal
      # - "8053:8053/tcp" #DNS-over-HTTPS using reverse proxy
    restart: unless-stopped
    volumes:
      #- ./config:/app/config
      - ./config:/etc/dns/config
    environment:
      - PUID=1000
      - PGID=1000