Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DNS Record/Response on a Per Client Basis with BIND

Posted on 2013-01-02
5
Medium Priority
?
296 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know for anybody starting from Beginner to Expert in Networking knows what OSI model. But this tutorial is for freshers or those who are new to networking world. Why I am putting OSI in such simple and compact manner is because it enables you to k…
The article explains the protocols and technology which is involved when two computers on different TCP/IP networks communicate with each other. In the diagram, a router is used to segregate two networks. The networks are 192.168.1.0/24 and 192…
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…
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…
Suggested Courses

772 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