How to serve custom DHCP configuration with OpenWRT’s dnsmasq

There are times when you need to filter out what some hosts in the network can or cannot do. When you have a router running OpenWRT this can be done at the firewall level.

But if you’re not much into advanced configuration and just want to completely block out some network hosts from reaching the internet (and hence phoning home) then it’s a lot simpler to do this directly from the DHCP and simply leave them without a DNS and gateway configuration.

Configure network connection via files in Linux

Setting your hostname, IP address, netmask, gateway, DNS server via files
It is sometimes helpful to know what is going on behind the scenes or if you want to modify the network configuration via changing files.
For example, assume you want to modify the network configuration by modifying files with the following…