Giter Site home page Giter Site logo

terafin / nextdns-proxy Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 14.0 32 KB

Simple NextDNS proxy DNS server that you can run on your local network to proxy all traffic via secure DNS to NextDNS

License: MIT License

Dockerfile 39.00% Shell 61.00%
dns-server dnsmasq dns nextdns doh

nextdns-proxy's Introduction

nextdns-proxy

This is a simple DNS server that wraps up dnsmasq and the nextdns client into a single package

Example usage

Here is an example docker-compose.yml file that will setup three docker services.

  1. The autoheal service from willfarrell/autoheal that will kill the container if DNS services fail.
  2. The DNS service itself
  3. Will auto update nextdns-proxy
version: '2'

services:
  watchtower:
    container_name: watchtower
    restart: always
    image: v2tec/watchtower
    environment:
      WATCHTOWER_CLEANUP: "true"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
  autoheal:
    container_name: autoheal
    image: jstrader/autoheal
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
  nextdns-proxy:
    image: "ghcr.io/terafin/nextdns-proxy:latest"
    container_name: nextdns-proxy
    hostname: nextdns-proxy
    labels:
      autoheal: "true"
    ports:
     - "53:53/udp"
    environment: # Note, these are ALL optional
      NEXTDNS_CONFIG: <<Your NextDNS Config/Endpoint ID here, this can be found on the NextDNS Setup page>
      NEXTDNS_CONFIG_CUSTOM1: <<Your conditional routing pattern here. Documentation here: https://github.com/nextdns/nextdns/wiki/Conditional-Configuration>
      NEXTDNS_CONFIG_CUSTOM2: <<Your conditional routing pattern here. Documentation here: https://github.com/nextdns/nextdns/wiki/Conditional-Configuration>
      NEXTDNS_CONFIG_YOUR_CUSTOM_SUFFIX: <<Your conditional routing pattern here. Documentation here: https://github.com/nextdns/nextdns/wiki/Conditional-Configuration>
      NEXTDNS_FORWARDING_DOMAIN: <<Your Local DNS Name Here, eg: myfancyhome.net>>
      NEXTDNS_FORWARDING_DNSIP: <<Your Local Router's IP Here, eg: 10.0.1.1>>
      NEXTDNS_MAX_TTL: <<Maximum TTL in seconds for hostnames from NextDNS - defaults to 15>>
      NEXTDNS_CACHE_SIZE: <<Cache size for NextDNS - defaults to 10MB>>
    restart: always

To use the compose file, just make it in the directory of your choice, then simply run:

docker-compose up -d

Note, for Raspberry Pi deployment, change the line: image: jstrader/autoheal to be: image: jstrader/autoheal:latest-arm

nextdns-proxy's People

Contributors

pridkett avatar snyk-bot avatar terafin avatar woody-apple 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

Watchers

 avatar  avatar  avatar

nextdns-proxy's Issues

attach to new container?

Hello,

forgive my ignorance, i got container nextdns-proxy up and running.
now how do i attach it to new container so it will have nextdns?

thanks

examples

I'm running the nextdns-cli on Linux are I'm using the Conditional Configuration. Can you provide an example of how that's done here, ie. syntax:

NEXTDNS_CONFIG_CUSTOM1:

And how would this be used:

NEXTDNS_CONFIG_YOUR_CUSTOM_SUFFIX:

Device names not showing up

For the life of me I can't figure out how to get the device names to show up properly in the logs. Right now they appear as "Device #xxxx."

I've gone as far as modifying the /etc/nextdns.conf file in the Docker container. Here's what it's currently set to, which is a combination of what multiple people on the Internet say resolved their issue:

report-client-info true
detect-captive-portals false
bogus-priv true
control /var/run/nextdns.sock
hardened-privacy false
use-hosts true
setup-router true
auto-activate false
discovery-dns 192.168.4.1
cache-size 0
max-ttl 0s
timeout 5s
listen 192.168.4.32:53
log-queries false
cache-max-age 0s

I'm not an expert at this stuff so pretty sure I'm missing something.

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.