LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2011, 12:04 PM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
BIND - Query Control - how to


Hi there !
I am using BIND9 and I wand to deny some queries per domain basis.

Example: I don't want client1 to query the server for Ip address (A) for domain.com

The server should respond with an error, no such domain, nothing, etc.
It's not authoritative for domain.com. I don't want the server to resolve recursive or iterative that domain.


How can I do that?

Thanks
 
Old 01-27-2011, 01:18 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You can create an acl like:
Code:
acl "queries" { 192.168.0.0/24; !192.168.0.1;};
and use it (in the options part of named.conf) like:
Code:
allow-query {127.0.0.1; queries;};
This way localhost and the whole 192.168.0.0/24 network, except the 192.168.0.1 host, can query the server. You can do the same for allow-recursion if you want.

Regards
 
Old 01-28-2011, 05:09 AM   #3
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
I want something else. I want for example that client 192.168.0.5 could not query for google.com, abc.com, 1234.de etc. All other queries are allowed.
 
Old 01-28-2011, 05:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
In this case, the only thing that comes in mind, is to use 2 views:
One for that host and configure your name server as authoritative for the domains you don't want him to visit and another view for the rest of the hosts.
In the 1st view you can either use fake zonefile(s), or make zonefile(s) to point to /dev/null, so he gets a SERVFAIL response

You understand of course, that he can use a different name server, so it'll be able to resolve any domain

Last edited by bathory; 01-28-2011 at 05:54 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate BIND Query per second sem007 Linux - Server 2 01-05-2010 12:30 AM
Bind Query Logging per Zone? archangel_617b Linux - Server 1 03-04-2009 08:28 AM
Bind open to query from anyone noir911 Linux - Server 1 01-05-2009 07:43 AM
BIND: Reverse query not working imanassypov Linux - Networking 0 06-21-2007 12:30 PM
Bind query denied grimse Linux - Networking 1 10-09-2006 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration