Since i receive my RPi2 i wanted to increment it’s use also as DNS AdBlock
so all my device (ipad-iphone-android phone) in my LAN could be adfree.
[ one day i will install also a l2tp VPN server so i will give this service outside my home but will be for another day ]
I found this amazing work: Instant Raspberry Pi Ad-blocker
done by : Jacob Salmela [all credit goes to him i barely made it work on osmc]
steps are simple and easy:
1: set a fixed IP to your RaspberryPI (i made a reservation on my ADSL modem DHCP server, but there are many options)
2: on the KODI interface move the webserver port from 80 to something else (8080 for example)
go to:
settings → Service → WebServer → Port → 8080
3: connect by SSH to your raspberry pi (default username: osmc password: osmc)
4: Disable the program connman that is currently listening on the DNS server port:
sudo nano /usr/bin/start-network
5: now make sure the service will not occupy the DNS port, change the line at the end of the file:
exec /usr/sbin/connmand -n --config=/etc/connman.conf
to:
exec /usr/sbin/connmand -n --config=/etc/connman.conf --nodnsproxy
6: reboot the raspberrypi:
sudo reboot
7: install the Raspberry Pi-Hole (thanks again Jacob Salmela )
sudo curl -s “https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/automated%20install/basic-install.sh” | bash
8: now in the DHCP server of your modem set the DNS server to the IP of the raspberry pi ( AND LEAVE IT ALWAYS ON!! )
9: disconnect and reconnect your device
10: try to look at this page to check if it’s working: Test your ad blocker (in a few simple steps) - Ads-blocker.com
Hope this will help someone else too!