Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible so use dnsmasq as a selective content filter (just for specified clients - defined by their MAC address)

I know how to create a global content filter.

I know that a proxy should be used for this kind of stuff but I'm looking for a basic lightweight solution (but I don't want to use OpenDNS or any similar services... it has to be local).


share|improve this question

closed as not a real question by mgorven, Michael Hampton, Khaled, mdpc, John Gardeniers Feb 15 '13 at 12:24

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

From the authors site :

Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines.

So the answer is, no, you can't use dnsmasq as a content filter. Unless you only intend to maintain a blacklist of domains so dnsmasq will not forward them at all. But of course you can do this with any DNS server, I wouldn't call this a content filter.

You can maintain a hosts file in dnsmasq and map all of them to, the parameter to use is --addn-host=samplehostsfile.txt.

share|improve this answer
Sorry for my expression... I need a basic blocker of provided domains... And I know what dnsmasq is for... I just wanted to know if there's a way... thanks – Mission Feb 14 '13 at 11:56
Yes, there is see my edit. – drcelus Feb 14 '13 at 12:06
Yes but the main problem is that I don't want to block all clients on the LAN... just a few computers... that was the point of my question... – Mission Feb 14 '13 at 12:08
And the answer is no :) not just with dnsmasq . – drcelus Feb 14 '13 at 13:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.