All Projects → segura2010 → GoHole

segura2010 / GoHole

Licence: GPL-2.0 license
GoHole is a DNS server written in Golang with the same idea than the PiHole, blocking advertisements's and tracking's domains

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to GoHole

Hblock
Improve your security and privacy by blocking ads, tracking and malware domains.
Stars: ✭ 724 (+2485.71%)
Mutual labels:  dns, ads, ad-blocker
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-17.86%)
Mutual labels:  dns, ads
Ttv aderaser
TTV AdEraser aims to remove livestream ads as well as add some useful features to our favourite streaming site.
Stars: ✭ 122 (+335.71%)
Mutual labels:  block, ads
Blocky
Fast and lightweight DNS proxy as ad-blocker for local network with many features
Stars: ✭ 523 (+1767.86%)
Mutual labels:  dns, ad-blocker
CyberSecurity-Box
Firewall-System based on OpenWRT or Pi-Hole with UnBound, TOR, optional Privoxy, opt. ntopng and opt. Configuration of the AVM FRITZ!Box with Presets for Security and Port-List. Please visit:
Stars: ✭ 20 (-28.57%)
Mutual labels:  ads, ad-blocker
Pornlist
Ad-blocking porn websites filter list for Adblock Plus and uBlock Origin.
Stars: ✭ 21 (-25%)
Mutual labels:  ads, ad-blocker
Docker Pi Hole
Pi-hole in a docker container
Stars: ✭ 4,288 (+15214.29%)
Mutual labels:  dns, ad-blocker
Hosts
Hostfile blocklist for ads and tracking, updated regularly
Stars: ✭ 398 (+1321.43%)
Mutual labels:  ads, ad-blocker
1hosts
DNS filter-/blocklists | safe. private. clean. browsing!
Stars: ✭ 85 (+203.57%)
Mutual labels:  dns, ads
Hosts Blocklists
Automatically updated, moderated and optimized lists for blocking ads, trackers, malware and other garbage
Stars: ✭ 1,749 (+6146.43%)
Mutual labels:  dns, ads
Windows.10.DNS.Block.List
Windows DNS Block List
Stars: ✭ 18 (-35.71%)
Mutual labels:  dns, block
smashblock
📡 🛡️A self-updating extensive blocklist filter for AdGaurd. Be sure to 🌟 this repository for updates!
Stars: ✭ 66 (+135.71%)
Mutual labels:  ads, ad-blocker
Spotify Adblock Linux
Spotify adblocker for Linux
Stars: ✭ 641 (+2189.29%)
Mutual labels:  dns, ads
Nogo
A cross-platform network-wide ad/site blocker with a simple web control panel.
Stars: ✭ 143 (+410.71%)
Mutual labels:  dns, ad-blocker
docker-nxfilter
🐳 Run NxFilter in Docker!
Stars: ✭ 28 (+0%)
Mutual labels:  dns, ad-blocker
go-srvlb
DNS SRV Load Balancer for gRPC
Stars: ✭ 41 (+46.43%)
Mutual labels:  dns
dnsredir
Yet another seems better forward/proxy plugin for CoreDNS
Stars: ✭ 58 (+107.14%)
Mutual labels:  dns
pihole-blocklists
Domain blocklists for Pi-Hole that are free and open for use by everyone.
Stars: ✭ 13 (-53.57%)
Mutual labels:  ads
ocaml-dns
OCaml implementation of the DNS protocol
Stars: ✭ 93 (+232.14%)
Mutual labels:  dns
arp-dns-attacks
ARP spoofing, HTTP redirection, DNS spoofing and DNS forging using pcap library
Stars: ✭ 25 (-10.71%)
Mutual labels:  dns

GoHole

GoHole is a DNS server written in Golang with the same idea than the PiHole, blocking advertisements's and tracking's domains.

It uses a Redis DB as cache.

Installation

  1. Clone this repository and rename the folder to GoHole if it is not the name.
  2. Run the install script install.sh to install all the dependencies.
  3. Compile using Makefile (make). Or run make install to install (you should have included your $GOPATH/bin to your $PATH).

Finally, run using the executable for your platform.

Usage

To start the DNS server you have to run the following command:

gohole -s

You can specify a config file with the command line argument -c. See the config_example.json file to see the structure.

You can also provide the -p argument to specify the port in which the DNS server will listen.

You can use the secure DNS server generating an AES encryption key using the command "gohole -gkey". Then, download it in your device and configure the GoHole CryptClient.

To block ads domains, you must add them to the cache DB. In order to do that, you must pass a blocklist file using the following command:

gohole -ab path/to/blacklist_file

If the list is published in a web server, you can provide the URL:

gohole -ab http://domain/path/to/blacklist_file

You can follow this link to get an updated list of available block content: https://github.com/StevenBlack/hosts

If you does not know any blacklist, you can see the file blacklists/list.txt. It contains the blacklists used by the PiHole. You can use a file with a list of blacklist like the blacklists/list.txt file to automatically add all the lists:

gohole -abl blacklists/list.txt

You can also block domains by using the following command:

gohole -ad google.com -ip4 0.0.0.0 -ip6 "::1"

and unblock domains by using the following command:

gohole -dd google.com

Flush cache and logs

You can flush cache and logs DBs.

Flush domains cache

gohole -fcache

Flush logs

gohole -flog

Statistics and Logs

You can see the stats and logs by using the following command line arguments:

See all the clients that have made a request

gohole -lc

See all request made by a client

gohole -lip <clientip>

See all clients that queried a domain

gohole -ld <clientip>

See top domains and number of queries for them

gohole -ldt -limit 10

Docker

You can use GoHole in a Docker container. To do that, you can use the Docker image: https://hub.docker.com/r/segura2010/gohole/ running:

docker pull segura2010/gohole

Once you pull the Docker image, you can run a container using the command:

docker run -d --name gohole -p 53:53/udp --restart=unless-stopped gohole/master

Then, you will have a Docker container running GoHole. But it does not install any blacklist (domains will not be blocked). In order to do that, you must open a shell in the container with:

docker exec -it gohole /bin/bash

After that, you can run gohole -abl blacklists/list.txt to set up the blocked domains.

Metrics & Statistics on Graphite

You can send the statistics to your Graphite server. Configure it on your config file (host and port of the server). Then, you will be able to see your graphs in the Graphite web panel or in Grafana.

Grafana Dashboard

You can export the Grafana dashboard I used in the image using the grafana/GoHole.json file.

You can use the Graphite+Grafana Docker image from: https://github.com/kamon-io/docker-grafana-graphite

Tested on Go 1.8.3 and 1.9.2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].