LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-15-2012, 12:41 AM   #16
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

Quote:
I need a zone in the inside view to capture addresses bound for externaladdress.com to be redirected to the internal servers. This was my start but I really don't have a clue
I lost you again... Isn't that zone (externaladdress.com) supposed to be in both the internal and external views?
In external use:
Code:
;externaladdress.com.ns:
$TTL 1d
 mydomain.local. IN SOA ns.externaladdress.com. support.externaladdress.com. (
 2010031524
 3h
 15m
 3w
 3h )

# IN NS ns.externaladdress.com.
 IN NS ns.externaladdress.local.
...
And in internal
Code:
;internaladdress.com.ns:
$TTL 1d
mydomain.local. IN SOA ns.mydomain.local. support.externaladdress.com. (
 2010031524
 3h
 15m
 3w
 3h )

# IN NS ns.externaladdress.com.
 IN NS ns.externaladdress.local.

; private hosts
 IN NS ns.mydomain.local.
ns IN A 192.168.1.1
phprojekt.externaladdress.com. IN A 192.168.1.3

phprojekt.externaladdress.com. IN A 192.168.1.3
 
Old 02-15-2012, 08:36 AM   #17
bluefish1
Member
 
Registered: Apr 2004
Location: PA
Distribution: RedHat 9
Posts: 49

Original Poster
Rep: Reputation: 0
Not really sure if it does actually... but I will differ to your judgment and experience.

I think I am getting lost in the semantics of DNS terms. I am not, nor do I think I want to be, the designated authority for the domain name (at least not to the world again this may be my lack of clear understanding). I think noip.com is handling this for me. Noip provides me the ability to create an redirects the domain requests to the relevant locations based on the domain/subdomain of the request.
  • www goes to a hosted server in VA,
  • the rest are pointed to my local web servers which is running many virtualhosted sites. This server require the full domain name not the ip address to determine which site it should serve up.

My goal is to capture/intercept (systems within my LAN) request for DNS lookups specific to the domain (or rather sub domains of) external.com that would normally resolve using external DNS authority. I need to do this because (and don't ask me why... some thing to do with the way the vps services sets up the virtual network nics) the local web servers will not resolve to my local clients using the authoritative external DNS records. The "world" however can access the web servers with no issues.. go figure.

The views seem like an ideal way to deal with this... as I can manual fix the problem on each client machine by adding the local ip address to the hosts/lmhost file on each machine. If I need to have a zone on the external view for the external.com domain then so be it. I have been reading feverishly on the subject but most of the books are either WAY over my head, and/or seem to be geared to enterprise solutions for DNS gurus. There would appear to be an opportunity for a "basic" book that focuses on setting up a private DNS for the small office/SOHO environment... with various examples of different scenarios.
 
Old 02-15-2012, 11:22 AM   #18
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
Quote:
Noip provides me the ability to create an redirects the domain requests to the relevant locations based on the domain/subdomain of the request.
...
My goal is to capture/intercept (systems within my LAN) request for DNS lookups specific to the domain (or rather sub domains of) external.com that would normally resolve using external DNS authority.
So, if I can understand you well, you have noip as an authoritative nameserver to resolve dns lookups for your domain from external clients and you want the hosts in your lan to use an internal nameserver, so they get an "internal" name resolution (the local IPs of your servers).
If that's the case, you don't need views. Just setup bind as a master for your domain (line in your post #12).
Then configure clients to use your dns as a resolver. E.g. for linux boxes use 1st in /etc/resolv.conf
Code:
nameserver 192.168.1.1
 
Old 02-15-2012, 12:19 PM   #19
bluefish1
Member
 
Registered: Apr 2004
Location: PA
Distribution: RedHat 9
Posts: 49

Original Poster
Rep: Reputation: 0
I will try that... thank you
 
Old 02-17-2012, 11:06 AM   #20
bluefish1
Member
 
Registered: Apr 2004
Location: PA
Distribution: RedHat 9
Posts: 49

Original Poster
Rep: Reputation: 0
Ok... have a handle on this now.

I have set up multiple zones and they all resolve. Very cool and powerful. I am getting the functionality that I was looking for and I have a better concept of how Bind works.... at least to the extent that the books are starting to make sense.

One glitch that I did not anticipate (but makes total sense to me now)...
One of my private zones "local DNS overrides" is a blanket coverage for the entire domain myftp.org. This domain is a free noip.com domain that I am using a sub domain from. I set the subdom up a while back because I did not want my domain name "brand" associated with a clients content.. but did not want to buy an additional domain. It was a economical giveaway that the client really appreciated.

The issue is that if I ever happen to need to access some other subdom from within the myftp.org domain it will "of course" come back as:
nslookup www.myftp.org
Server: 192.168.1.1
Address: 192.168.1.1#53
** server can't find www.myftp.org: NXDOMAIN

So my question is: can I define a "master zone" file to enable it to forward unknown DNS request for the domain (like say 123.myftp.org) to an actual authority? See below.

Code:
zone "myftp.org" in {
        type master;
        file "myftp.org";
        allow-update { none; };
             };

[myftp.org]
$TTL    1d
@	IN	SOA	ns.myftp.org. support.myftp.org. (
			2012021701 	; Serial
			3h 		; Refresh
			15m 		; Retry
			3w 		; Expire
			3h )  		; Minimum


; Name servers
myftp.org.  IN    	NS    ns.myftp.org.


; Public Servers
ns  IN A 192.168.1.1

; private clients on the LAN
myclient	IN	A	192.168.1.3
 
Old 02-17-2012, 03:06 PM   #21
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,

Quote:
I have set up multiple zones and they all resolve. Very cool and powerful. I am getting the functionality that I was looking for and I have a better concept of how Bind works.... at least to the extent that the books are starting to make sense
.
So, I guess there was no need to use views for your setup?


Quote:
So my question is: can I define a "master zone" file to enable it to forward unknown DNS request for the domain (like say 123.myftp.org) to an actual authority? See below.
Again I'm not sure if I can get what you're trying to do, but if you want to define a different NS for a subdomain like 123.myftp.org, you can use $ORIGIN:
Code:
[myftp.org]
$TTL    1d
@	IN	SOA	ns.myftp.org. support.myftp.org. (
			2012021701 	; Serial
			3h 		; Refresh
			15m 		; Retry
			3w 		; Expire
			3h )  		; Minimum


; Name servers
myftp.org.  IN    	NS    ns.myftp.org.


; Public Servers
ns  IN A 192.168.1.1

; private clients on the LAN
myclient	IN	A	192.168.1.3

$ORIGIN 123.myftp.org.
 IN NS some.other.dns.
...
Regards
 
Old 02-17-2012, 04:47 PM   #22
bluefish1
Member
 
Registered: Apr 2004
Location: PA
Distribution: RedHat 9
Posts: 49

Original Poster
Rep: Reputation: 0
I actually kept the views (it was working so I decided not to muck with it)... I just left the external view blank.... just in case I decided to use it someday. I can't image it will impact the service.

I had already added the zone as you indicated (actually I have about 5-6 zones now.... having too much fun.) Love it when things work and I actually "get it".

What I was wondering was if it is possible to have a private zone for only parts of a domain.
AKA:
; private clients on the LAN
Myclient IN A 192.168.1.3
;All others
*othersDoms forward nameserver

But have all others requests use the public DNS.
I realize this is probably a idiotic question. I was thinking that there might be a wildcard option to point all non-listed subdoms for the specific zone to a different name server? Kind of like the forwarding is doing for the DNS.
 
Old 02-17-2012, 05:13 PM   #23
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
Quote:
I was thinking that there might be a wildcard option to point all non-listed subdoms for the specific zone to a different name server? Kind of like the forwarding is doing for the DNS
This is not possible. You can have a wildcard host, pointing to an A (or CNAME) record, but not forwarding to another dns.
 
1 members found this post helpful.
  


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
DNS not resolving private ip tsaravan Linux - Networking 1 10-04-2007 02:13 PM
Basic question: getting DNS info with dig anirvana Linux - Networking 7 04-12-2007 06:51 AM
Basic DNS/Bind question chess Linux - Server 3 10-06-2006 09:25 AM
Recursive Servers basic question in DNS emailssent Linux - Networking 1 10-02-2004 10:01 AM
Basic DNS/DHCP question sporkfish Linux - Networking 5 07-14-2004 07:30 PM

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

All times are GMT -5. The time now is 10:21 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
Open Source Consulting | Domain Registration