{"id":17081077,"url":"https://github.com/expoli/unbound-server","last_synced_at":"2026-04-21T16:05:45.350Z","repository":{"id":110876656,"uuid":"238684520","full_name":"expoli/unbound-server","owner":"expoli","description":"unbound docker server","archived":false,"fork":false,"pushed_at":"2020-08-25T09:56:44.000Z","size":5372,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"alpine-image","last_synced_at":"2025-07-04T12:03:01.607Z","etag":null,"topics":["dns","unbound-server"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/expoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-06T12:31:38.000Z","updated_at":"2020-02-11T11:00:45.000Z","dependencies_parsed_at":"2023-03-14T00:30:55.486Z","dependency_job_id":null,"html_url":"https://github.com/expoli/unbound-server","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/expoli/unbound-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expoli%2Funbound-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expoli%2Funbound-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expoli%2Funbound-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expoli%2Funbound-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/expoli","download_url":"https://codeload.github.com/expoli/unbound-server/tar.gz/refs/heads/alpine-image","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expoli%2Funbound-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32099221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","unbound-server"],"created_at":"2024-10-14T12:49:22.645Z","updated_at":"2026-04-21T16:05:45.344Z","avatar_url":"https://github.com/expoli.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unbound-server\nunbound docker sever\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/tangcuyu/unbound-server.svg?style=plastic)](https://hub.docker.com/r/tangcuyu/unbound-server)\n\n## 使用方法\n\n### 准备证书文件\n\n镜像会检查是否提供了，正确的ssl证书文件。正确的目录结构应该如下。\n\n```shell\n.\n├── Dockerfile\n├── entrypoint.sh\n├── LICENSE\n├── README.md\n├── release-1.9.6.tar.gz\n├── ssl\n│   ├── ssl-service-key.key\n│   └── ssl-service-pem.pem\n└── unbound.conf\n```\n\n### 可启用的变量\n\n- DNS_DOMAIN_NAME\n  - 你的DNS域名（必要变量）\n- THREADS_NUM\n  - unbound 线程数（默认为2）\n\n### 启动容器\n\n```shell\ndocker run --rm -e DNS_DOMAIN_NAME=\"your_dns_domain\" \\\n    -v ${PWD}/ssl:/etc/unbound/ssl \\\n    --privileged \\\n    --network=host   \\\n    tangcuyu/unbound-server\n```\n\n### 解析测试\n\n在终端键入以下命令并运行。\n\n```shell\ndig github.com @127.0.0.1 -p 853\n\n; \u003c\u003c\u003e\u003e DiG 9.14.10 \u003c\u003c\u003e\u003e github.com @127.0.0.1 -p 853\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 40410\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;github.com.                    IN      A\n\n;; ANSWER SECTION:\ngithub.com.             12      IN      A       13.229.188.59\n\n;; Query time: 1267 msec\n;; SERVER: 127.0.0.1#853(127.0.0.1)\n;; WHEN: 六 2月 08 20:36:29 CST 2020\n;; MSG SIZE  rcvd: 55\n\ndig google.com @127.0.0.1 -p 853\n\n; \u003c\u003c\u003e\u003e DiG 9.14.10 \u003c\u003c\u003e\u003e google.com @127.0.0.1 -p 853\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 48185\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;google.com.                    IN      A\n\n;; ANSWER SECTION:\ngoogle.com.             75      IN      A       172.217.160.110\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#853(127.0.0.1)\n;; WHEN: 六 2月 08 20:44:54 CST 2020\n;; MSG SIZE  rcvd: 55\n```\n\n## `Dockerfile`\n\n```Dockerfile\nFROM alpine:latest\n\nRUN apk --no-cache add \\\n    unbound \\\n    openssl\\\n    wget\\\n    bash\\\n    \u0026\u0026 touch /var/log/unbound.log\\\n    \u0026\u0026 chown unbound:unbound /var/log/unbound.log\n\nCOPY ./unbound.conf /etc/unbound/unbound.conf\nCOPY ./entrypoint.sh /entrypoint.sh\n\n# These commands copy your files into the specified directory in the image\n# and set that as the working location\nWORKDIR /\n\nVOLUME [ \"/etc/unbound/ssl/\" ]\n\nEXPOSE 853/tcp 853/udp\n# This command runs your application, comment out this line to compile only\nCMD [\"/entrypoint.sh\"]\n```\n\n### 输出示例\n\n```shell\n==================================================================\n      SETTING UP ...\n==================================================================\n\n==================================================================\n      INITING UNBOUND CONFIGURE FILE ...\n==================================================================\n----\u003e init unbound configure file success\n\n==================================================================\n      INITING ROOT HINTS FILE ...\n==================================================================\n--2020-02-07 07:58:55--  https://www.internic.net/domain/named.cache\nResolving www.internic.net... 192.0.32.9, 2620:0:2d0:200::9\nConnecting to www.internic.net|192.0.32.9|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 3315 (3.2K) [text/plain]\nSaving to: '/etc/unbound/root.hints'\n\n     0K ...                                                   100% 9.98K=0.3s\n\n2020-02-07 07:59:00 (9.98 KB/s) - '/etc/unbound/root.hints' saved [3315/3315]\n\n----\u003e init root hints file success!\n\n==================================================================\n      SET UNBOUND THREADS NUM CONF ...\n==================================================================\n----\u003e set unbound threads num conf success!\n----\u003e setup complete\n\n==================================================================\n      CHECKING UNBOUND CONFIGURE /ETC/UNBOUND/UNBOUND.CONF ...\n==================================================================\nunbound-checkconf: no errors in /etc/unbound/unbound.conf\n----\u003e no errors in unbound configure file /etc/unbound/unbound.conf \n\n==================================================================\n      BOOTING UNBOUND ...\n==================================================================\n----\u003e unbound already started!\n\n==================================================================\n      CONTAINERD INFO\n==================================================================\n\n==================================================================\n      CAT /ETC/UNBOUND/UNBOUND.CONF\n==================================================================\n# Unbound configuration file for Debian.\n#\n# See the unbound.conf(5) man page.\n#\n# See /usr/share/doc/unbound/examples/unbound.conf for a commented\n# reference config file.\n#\n# The following line includes additional configuration files from the\n# /etc/unbound/unbound.conf.d directory.\n# include: \"/etc/unbound/unbound.conf.d/*.conf\"\n#\nserver:\n    directory: \"/etc/unbound\"\n    username: unbound\n    chroot: \"/etc/unbound\"\n    use-syslog: yes\n    log-time-ascii: yes\n    log-queries: yes\n    hide-version: yes\n    pidfile: \"/var/run/unbound.pid\"\n    interface: 0.0.0.0@853\n    access-control: 0.0.0.0/0 allow\n    ssl-service-key: \"/etc/unbound/ssl/ssl-service-key.key\"\n    ssl-service-pem: \"/etc/unbound/ssl/ssl-service-pem.pem\"\n    ssl-port: 853\n    incoming-num-tcp: 1000\n    udp-upstream-without-downstream: yes \n    qname-minimisation: yes #\n    do-not-query-localhost: no\n    val-log-level: 1\n    rrset-roundrobin: yes\n    prefetch: yes\n    use-caps-for-id: yes\n    harden-referral-path: yes\n    harden-large-queries: yes\n    identity: \"dns2.expoli.tech\"\n    log-queries: yes\n    do-ip6: yes\n    do-ip4: yes\n    ssl-upstream: yes\n    root-hints: \"root.hints\" \n    harden-glue: yes\n    so-rcvbuf: 1m\n    num-threads: 2\n    msg-buffer-size: 8192   # note this limits service, 'no huge stuff'.\n    msg-cache-size: 100k\n    msg-cache-slabs: 1\n    rrset-cache-size: 100k\n    rrset-cache-slabs: 1\n    infra-cache-numhosts: 200\n    infra-cache-slabs: 1\n    key-cache-size: 100k\n    key-cache-slabs: 1\n    neg-cache-size: 10k\n    num-queries-per-thread: 30\n    target-fetch-policy: \"2 1 0 0 0 0\"\n\n    private-address: 192.168.0.0/16\n    private-address: 169.254.0.0/16\n    private-address: 172.16.0.0/12\n    private-address: 10.0.0.0/8\n    private-address: fd00::/8\n    private-address: fe80::/10\n\nforward-zone:\n    name: \".\"\n    forward-tls-upstream: yes\n    forward-addr: 8.8.8.8@853,1.1.1.1@853 #\n    forward-first: yes\n\n==================================================================\n      UNBOUND IS RUNNING ...\n==================================================================\nActive Internet connections (only servers)\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    \ntcp        0      0 0.0.0.0:853             0.0.0.0:*               LISTEN      33/unbound          \ntcp        0      0 0.0.0.0:853             0.0.0.0:*               LISTEN      33/unbound          \n\n; \u003c\u003c\u003e\u003e DiG 9.14.8 \u003c\u003c\u003e\u003e google.com @127.0.0.1 -p 853\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 37376\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;google.com.                    IN      A\n\n;; ANSWER SECTION:\ngoogle.com.             299     IN      A       172.217.160.78\n\n;; Query time: 1142 msec\n;; SERVER: 127.0.0.1#853(127.0.0.1)\n;; WHEN: Fri Feb 07 07:59:01 UTC 2020\n;; MSG SIZE  rcvd: 55\n\n\n==================================================================\n      CONTAINERD IP INFO\n==================================================================\neth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02  \n          inet addr:172.17.0.2  Bcast:172.17.255.255  Mask:255.255.0.0\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:40 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:0 \n          RX bytes:15491 (15.1 KiB)  TX bytes:2652 (2.5 KiB)\n\nlo        Link encap:Local Loopback  \n          inet addr:127.0.0.1  Mask:255.0.0.0\n          UP LOOPBACK RUNNING  MTU:65536  Metric:1\n          RX packets:3 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000 \n          RX bytes:191 (191.0 B)  TX bytes:191 (191.0 B)\n\n\n==================================================================\n      READY AND WAITING FOR CLIENT CONNECTIONS\n==================================================================\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpoli%2Funbound-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpoli%2Funbound-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpoli%2Funbound-server/lists"}