Adblock Bypass for a Host or an IP address

Sometimes it’s useful to be able to disable or bypass Adblock for a specific host or IP address. It took me a while to find the right solution and here it is. First you assign the host a static IP address using its MAC address and then you push specific DNS server addresses to it through the DHCP configuration.

You need to find the MAC address of your host and assign it an IP address from the range of your network. The example is using the CloudFlare DNS, so you may want to change that as well.

Adjust /etc/config/dhcp:

config host
         option name 'laptop'
         option dns '1'
         option mac 'XX:XX:XX:XX:XX:XX'
         option ip ''
         option tag 'enableads'
 config tag 'enableads'
         list dhcp_option '6,,'

Now restart dnsmasq with /etc/init.d/dnsmasq restart and have the host do a release/renew on it’s interface. That should propagate the new configuration.