LinuxQuestions.org
Review your favorite Linux distribution.
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 05-05-2015, 10:26 AM   #1
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Rep: Reputation: Disabled
Linux Bind conditional forwarder based on dst domain


Hi
i have Linux Bind server that use norton for resoling and as up server.

but i need to do somethink like conditional forwarding,

if any request comes to ask for facebook.com , i want it go to ask 8.8.8.8 not the original forwarder identified in :

forwarders { 198.153.192.50; };

=================

here is my config below , and hope to get Help :



[root@x~]# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { 127.0.0.1; 1xxxxx; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; xxxxxx; };
recursion yes;
////////////////Extend limits
recursive-clients 50000;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
forwarders { 198.153.192.50; };
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};


include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";



thankx alot


cheers
 
Old 05-06-2015, 07:22 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,502

Rep: Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768
Quote:
if any request comes to ask for facebook.com , i want it go to ask 8.8.8.8 not the original forwarder identified in :

forwarders { 198.153.192.50; };
It can be done per domain, by defining the zone in question, as a forward only zone:
Code:
zone "facebook.com" {
        type forward;
        forwarders {8.8.8.8;};
};
 
1 members found this post helpful.
Old 05-07-2015, 03:24 AM   #3
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
It can be done per domain, by defining the zone in question, as a forward only zone:
Code:
zone "facebook.com" {
        type forward;
        forwarders {8.8.8.8;};
};

hi , i added that in named.conf file

but after that , it no longer being resolved !!


any help ?
 
Old 05-07-2015, 05:51 AM   #4
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Original Poster
Rep: Reputation: Disabled
This webpage is not available

ERR_NAME_NOT_RESOLVED
Details

any help ?
 
Old 05-07-2015, 06:53 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,502

Rep: Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768
What happens if you try to resolve the domain in question from your name server?
Quote:
Originally Posted by dr.x View Post
This webpage is not available

ERR_NAME_NOT_RESOLVED
Details

any help ?
This looks like a Chrome error.
Follow the instructions in the last 2 posts here, to clear Chrome cache and flush windows dns cache (if you're running Chrome on windows)
 
Old 05-07-2015, 09:17 AM   #6
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Original Poster
Rep: Reputation: Disabled
i did flush , but not working !!!!

any help ?

i did ipconfig /flushdns

and changed browser ...no luck

it still has no longer being resolved.
 
Old 05-07-2015, 12:10 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,502

Rep: Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768
Quote:
Originally Posted by dr.x View Post
i did flush , but not working !!!!

any help ?

i did ipconfig /flushdns

and changed browser ...no luck

it still has no longer being resolved.
Did you try to resolve the domain in question from your dns server?
I'm not a windows user, but the guy in the link I gave you, flushes the windows dns running:
Code:
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns
 
1 members found this post helpful.
Old 05-07-2015, 02:31 PM   #8
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Did you try to resolve the domain in question from your dns server?
I'm not a windows user, but the guy in the link I gave you, flushes the windows dns running:
Code:
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns

Hi thank yoiu it worked
i think it was cache in the DNS itself

now its okay

one more question
assume i want to forward domain and all subdomains to forwarder.
as an example
i want abc.com and anything like a.abc.com , b.abc.com all go to 8.8.8.8 forwarders

how can i do that ?


the modthod above u gave me works only on the same exact domain , what about if i do it for domain all subdomains

cheers
 
Old 05-08-2015, 03:07 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,502

Rep: Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768Reputation: 1768
Quote:
one more question
assume i want to forward domain and all subdomains to forwarder.
as an example
i want abc.com and anything like a.abc.com , b.abc.com all go to 8.8.8.8 forwarders

how can i do that ?

the modthod above u gave me works only on the same exact domain , what about if i do it for domain all subdomains
There is no need to do something else. If a domain is configured as "forward only", any subdomain is resolved also by the forwarder
 
1 members found this post helpful.
Old 05-08-2015, 07:55 AM   #10
dr.x
Member
 
Registered: Jan 2013
Posts: 180

Original Poster
Rep: Reputation: Disabled
great , thank you alot alot alot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Domain forwarder MarHazK Linux - Software 1 09-06-2014 04:25 AM
BIND single cname to lookup through the forwarder Bullz3y3 Linux - Server 1 03-03-2012 01:39 AM
named.conf - Adding a forwarder for additional domain elliot01 Linux - Server 6 10-19-2009 12:43 PM
Bind conditional DNS responses? 300zxkyle Linux - Server 3 02-11-2008 05:35 PM

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

All times are GMT -5. The time now is 09:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration