Solved

DNS Record/Response on a Per Client Basis with BIND

Posted on 2013-01-02
5
285 Views
Last Modified: 2013-01-08
I have certain devices on my network that I wish to block webpages using DNS.

Normally I would use my Squid Proxy... Unfortunately, this device has NO support for Proxy...

Is there a way to have BIND respond on a per client basis? As in...

Device "A"  (has static IP) is in need of the block:
   Device "A" requests *.* from BIND
   BIND Responds as if the domain does not exist.
   I want to force all requests to be unresolved for Device A
   I only want to allow one domain to be resolved for Device A

Thank You
0
Comment
Question by:scogger1974
  • 3
5 Comments
 
LVL 18

Expert Comment

by:Andrej Pirman
ID: 38736668
With transparent proxy you could do this without a need for any proxy setup on client side. You would then just nned to create rule, based on MAC address, to filter this device out.

But as MAC is Layer 2, you would probably need to make DHCP reservation on IP for this MAC, which moves you one step away from some secure setup.

Instead, try IPTABLES rule and play with it:

iptables -I FORWARD 7 -p tcp -d restricted.com -m mac --mac-source XX:XX:XX:XX:XX:XX --dport 80 -j DROP 
iptables -I FORWARD 7 -p tcp -d www.restricted.com -m mac --mac-source XX:XX:XX:XX:XX:XX --dport 80 -j DROP

Open in new window

0
 
LVL 1

Author Comment

by:scogger1974
ID: 38736764
Unfortunately the set of devices I wish to block are all on different networks. I simply have an Adtran router for each network. I could add a rule in the ACL to block all for that particular host and then an allow for each website... I would have to do this for 8+ routers. These devices will see more use

Transparent Proxy would be ideal. In this situation I cannot apply it.

Ex. "device a" is 192.168.66.85  and DNS is 192.168.1.3. My Squid Proxy is on 192.168.1.4.

If there was someway to "tie a zone" to a certain set of hosts...
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 38737059
If you have multiple DNS servers you may be able to use a hybrid DNS solution. For example if device A has a MAC address of AA:BB:CC:DD:EE:FF, you could use DHCP to set a static reservation for AA:BB:CC:DD:EE:FF and set its DNS server as 192.168.x.x. This 192.168.x.x dns server could server its own ip addres for whatever dns zones you want blocked. For example you could have this DNS server host facebook.com.  Any clients getting addresses through regular DHCP would resolve the regular address, any clients you have registered as 'blocked' would get 192.168.x.x from the alternative dns server. Just be sure you don't replicate zones from this blocked DNS service to the normal DNS servers
0
 
LVL 1

Accepted Solution

by:
scogger1974 earned 0 total points
ID: 38740647
I found the solution.

For the community: Simply create Separate Views for the different Hosts/Groups of Hosts.

I ended up creating a view just for the specific Host that have been assigned via Static DHCP. I create a Root Zone that has an *. A Record. Works Like a Charm :)

Thank You All
0
 
LVL 1

Author Closing Comment

by:scogger1974
ID: 38754079
Found it myself. I need a pat on the back :)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A few months ago I attended the Rocky Mountain IPv6 Summit which was a two-day educational event; it was the 3rd annual conference held here in Denver, Colorado that was held at the Hyatt Regency Denver at the Colorado Convention Center. It was an e…
SSL is a very common protocol used these days when browsing the web.  The purpose is to provide security to communication, but how does it do it?  There are several pieces at work that have to be setup before SSL will even work and it requires both …
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now