🌎 A smart dns for unblocking geo restrictions.
10K+
A smart dns container for unblocking geo restrictions.
Built on rundqvist/sniproxy-openvpn container.
$ 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
$ 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.
See image (rundqvist/openvpn) for detailed vpn configuration.
| 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.
| Folder | Usage |
|---|---|
| /cache/ | Used for caching original configuration files from vpn provider. |
| /etc/dnsmasq.d/ | Output of dnsmasq configuration file (usually /etc/dnsmasq.d/). |
Set DNS_ENABLED=true and configure your client (or router) to use HOST_IP as 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.
/path/to/etc/dnsmasq.d/ folder (if not, map this directory to a temp-folder).docker runcommand to start container./etc/dnsmasq.d/ is mapped to a temp-folder, now copy the autogenerated 10-smartdns.conf-file to your dnsmasq.d-folder manually.Just surf to one of the supported sites and watch without geo restrictions.
Please report issues at https://github.com/rundqvist/docker-smartdns/issues
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.
Content type
Image
Digest
Size
20.9 MB
Last updated
over 5 years ago
docker pull rundqvist/smartdns