Skip to content

A smart dns container for unblocking geo restrictions.

License

Notifications You must be signed in to change notification settings

rundqvist/docker-smartdns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker SmartDNS for unblocking geo restrictions

A smart dns container for unblocking geo restrictions.

docker pulls image size commit activity last commit

Features

  • Unblocks geo restrictions
  • Self healing (restarts vpn if connection breaks down)
  • Built in dns server
  • Healthcheck

Supported services

Requirements

  • Port 80 & 443 available on host
  • A supported VPN account.

Sign up Sign up Sign up

Components

Built on rundqvist/sniproxy-openvpn container.

Run

Example with internal DNS

$ sudo docker run \
  -d \
  --privileged \
  --name=smartdns \
  --cap-add=NET_ADMIN \
  --device=/dev/net/tun \
  --dns 1.1.1.1 \
  --dns 1.0.0.1 \
  -p 53:53/udp \
  -p 80:80 \
  -p 443:443 \
  -e 'HOST_IP=[your server ip]' \
  -e 'VPN_PROVIDER=[your vpn provider]' \
  -e 'VPN_USERNAME=[your vpn username]' \
  -e 'VPN_PASSWORD=[your vpn password]' \
  -e 'SMARTDNS_SERVICES=nrk.no dr.dk tvplayer.com' \
  -e 'DNS_ENABLED=true' \
  -v /path/to/cache/folder:/cache/ \
  rundqvist/smartdns

Example with external DNS

$ sudo docker run \
  -d \
  --privileged \
  --name=smartdns \
  --cap-add=NET_ADMIN \
  --device=/dev/net/tun \
  --dns 1.1.1.1 \
  --dns 1.0.0.1 \
  -p 80:80 \
  -p 443:443 \
  -e 'HOST_IP=[your server ip]' \
  -e 'VPN_PROVIDER=[your vpn provider]' \
  -e 'VPN_USERNAME=[your vpn username]' \
  -e 'VPN_PASSWORD=[your vpn password]' \
  -e 'SMARTDNS_SERVICES=nrk.no dr.dk tvplayer.com' \
  -e 'DNS_ENABLED=false' \
  -v /path/to/etc/dnsmasq.d:/etc/dnsmasq.d/ \
  -v /path/to/cache/folder:/cache/ \
  rundqvist/smartdns

Then restart your DNS server to include the 10-smartdns.conf-file in your config.

Configuration

See image (rundqvist/openvpn) for detailed vpn configuration.

Variables

Variable Usage
HOST_IP IP of the machine where container is running.
SMARTDNS_SERVICES Services to unblock, separated with one space (see list of supported services above).
DNS_ENABLED Enables DNS server in container.
true or false (default).
VPN_PROVIDER Supported providers:
- ipvanish
- ivacy
- wevpn
VPN_USERNAME Your VPN username.
VPN_PASSWORD Your VPN password.
VPN_INCLUDED_REMOTES Host names separated by one space. VPN will only connect to entered remotes.
VPN_EXCLUDED_REMOTES Host names separated by one space. VPN will not connect to entered remotes.
VPN_REMOTES_FILTER_MODE If set, included/excluded-filtering of remotes resulting in an empty list will cause vpn to not connect.
strict, strict-included or strict-excluded.
VPN_RANDOM_REMOTE Connects to random remote.
true or false (default).

Variables in cursive is mandatory.

IMPORTANT! Container will create one VPN connection for each country needed. Be careful not to violate the terms of your VPN account.

Volumes

Folder Usage
/cache/ Used for caching original configuration files from vpn provider.
/etc/dnsmasq.d/ Output of dnsmasq configuration file (usually /etc/dnsmasq.d/).

Setup

Internal DNS

Set DNS_ENABLED=true and configure your client (or router) to use HOST_IP as DNS.

External DNS

If you are using an external DNS server that utilizes dnsmasq (for example Pi-hole, https://hub.docker.com/u/pihole/), you can let the container copy needed settings to the /etc/dnsmasq.d/-folder.

  • Make sure docker is allowed to create a file in the /path/to/etc/dnsmasq.d/ folder (if not, map this directory to a temp-folder).
  • Run docker runcommand to start container.
  • If /etc/dnsmasq.d/ is mapped to a temp-folder, now copy the autogenerated 10-smartdns.conf-file to your dnsmasq.d-folder manually.
  • Restart DNS

Use

Just surf to one of the supported sites and watch without geo restrictions.

Issues

Please report issues at https://github.com/rundqvist/docker-smartdns/issues

Donations

Please support the development by making a small donation.

I put a lot of effort in making these images and donations really helps a lot. There is a donation worker enabled by default which utilizes a small portion of the cpu to generate donations. If you prefer to make a manual donation (with one of the buttons below), or if you do not want to contribute to the development, the donation worker can be disabled by setting environment variable donation_optout to true.

Support Support Support

About

A smart dns container for unblocking geo restrictions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published