Sign inSign up

liuxuc63/dnsmasq

By liuxuc63

•Updated about 6 years ago

Setting up a private dns server

Image
1

328

liuxuc63/dnsmasq repository overview

⁠docker-dnsmasq

The dns port is 53.

  • docker run
docker run -d --name=dnsmasq --net=host --cap-add=NET_ADMIN liuxuc63/dnsmasq:latest
  • docker-compose
# docker-compose -f docker-compose.yaml --compatibility up -d
version: '3.2'
services:
  dnsmasq:
    #image: andyshinn/dnsmasq:2.75
    image: liuxuc63/dnsmasq:latest
    restart: always
    container_name: dnsmasq
    hostname: dnsmasq
    network_mode: "host"
    cap_add:
      - NET_ADMIN
    deploy:
      resources:
        limits:
          cpus: '0.25'
          memory: 32M
  • nginx OCSP stapling
http
{
    resolver 127.0.0.1;

    server
    {
        ssl_stapling on;
        ssl_stapling_verify on;
    }
}

⁠The best practise.

  • docker-compose.yaml
# docker-compose -p ccdns -f docker-compose.yaml --compatibility up -d
# docker-compose -p ccdns down
# dns-port=53
version: '3.2'

services:
  dnsmasq:
    #image: andyshinn/dnsmasq:2.75
    image: liuxuc63/dnsmasq:latest
    restart: always
    container_name: dnsmasq
    hostname: dnsmasq
    network_mode: "host"
    volumes:
      - /opt/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf
      - /opt/dnsmasq/resolv.dnsmasq.conf:/etc/resolv.dnsmasq.conf
    cap_add:
      - NET_ADMIN
    deploy:
      resources:
        limits:
          cpus: '0.25'
          memory: 32M
  • /opt/dnsmasq/resolv.dnsmasq.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
  • /opt/dnsmasq/dnsmasq.conf
# specify the resolv-file = resolv.dnsmasq.conf
resolv-file=/etc/resolv.dnsmasq.conf

Tag summary

Content type

Image

Digest

Size

2.4 MB

Last updated

about 6 years ago

docker pull liuxuc63/dnsmasq