For this project I am using Orange pi lite 2. Preferably we should use any board with similar specifications and that has an ethernet port. Lite 2 doesn't have an ethernet port but it does has wifi AC 5Ghz. Which works pretty well in our use case. I have ubuntu 16.04.5 LTS installed on this board.
1. Connect to the pi with SSH or Serial port.
2. Set a static IP address. Its better to give a static IP in your router to get rid of IP clashes.
5. Now follow the on screen instructions.
6. Select ClouldFlare DNS because its faster than the Google DNS(right now).
7. Select Protocols (IPv4 and IPv6).
8. It will again ask for network settings. Make sure your gateway and IP are entered correctly.
9. Follow along with default settings.
10. In the final step write down the web password for web access.
Some other Gravity lists for more blocking
https://raw.githubusercontent.com/anudeepND/youtubeadsblacklist/master/hosts.txt
https://raw.githubusercontent.com/HenningVanRaumle/pihole-ytadblock/master/ytadblock.txt
https://tspprs.com/dl/ads
https://raw.githubusercontent.com/CHEF-KOCH/CKs-FilterList/master/HOSTS/CK's-Spotify-HOSTS-FilterList.txt
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
https://v.firebog.net/hosts/Easylist.txt
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts;showintro=0
https://v.firebog.net/hosts/AdguardDNS.txt
I did use https://smokingwheels.github.io/Pi-hole/allhosts. It contains over 1.2 Million domains but don't use this because it blocks many CDNs and other important domains. Important point to be noted here you cannot block youtube ads because these are coming from same domains as the content.