Macgeeks has a really good guide on setting up a local DNS server on a Raspberry Pi that can filter out ADs for any device on the local network. Bonus the guide is mac based and very simple to follow.
In this guide we’ll set up a Raspberry Pi with a DNS server to block ads on your network. You can then use this on your iPad to block ads, but also on other devices. Not only will this make browsing a much cleaner experience, it will also make it much faster!