Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] bind own tld
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Fri Mar 19, 2010 8:06 pm    Post subject: [solved] bind own tld Reply with quote

hi,
what i need to do to setup my own tld, i want to have my own tld (something like .local) for my testing projects, i have just installed bind, configured some basic settings by guide on gentoo-wiki, but there is no guide how to setup own tld. can anyone point me to right way how to setup this?
thanks


Last edited by mistake25 on Sun Jul 11, 2010 7:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Sat Mar 20, 2010 6:46 pm    Post subject: Reply with quote

Hello!

You'd set up a local, 'fake' tld the same way you'd set up any domain in BIND.

For example, I have a tld called 'bitfarm' for my wireless network. I define it thusly:

Code:
zone "bitfarm" {
        type master;
        file "pri/bitfarm.fw";
        allow-update { key "rndc-key"; };
};

and then the zone record looks something like:

Code:
$ORIGIN .
$TTL 7200       ; 2 hours
bitfarm         IN      SOA     ns1.cluster dan.danf.us (
                                2010020701 ; serial
                                7200       ; refresh (2 hours)
                                1800       ; retry (30 minutes)
                                7200       ; expire (2 hours)
                                7200       ; minimum (2 hours)
                                )
                        NS      ns1.cluster
$ORIGIN bitfarm.
pascal                  A       172.17.9.1


When I look up, for example, pascal.bitfarm:
Code:
dan@pascal ~ $ nslookup pascal.bitfarm
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   pascal.bitfarm
Address: 172.17.9.1


As you can see, BIND doesn't care whether 'bitfarm' is a public, 'real' TLD or just something I made up.

But there is a catch: you need to look up the names on the local nameserver before you look them up online. There are a number of reasons you might be looking up your names publicly instead. For starters, you might have a local recursive view and a public nonrecursive view, and not want to replicate public data in the local view, so you'd have to have the local view look up public names publicly instead (the public upstream servers would then refer the nameserver back to itself). Or, perhaps you have foreward-first or forward-only in your named.conf.

At any rate, the important thing is that you don't expect a public IP to send you back to your local name server for names in your made-up TLD.

Well, hope it helps. Let me know if you have any more problems, I love BIND and would be happy to help.

-- DF
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Wed Mar 24, 2010 7:32 pm    Post subject: Reply with quote

sorry, but this is my first try with bind, i have no idea about configuration on my own domains/fake tlds....can you more describe these configuration files, i want to bind redirect *.dp to my local server and let apache to do next redirect by adress(i have already apache configured)...
so only thing i want bind to do is if anyone try to open *.dp he will be given 192.168.0.5 IP, or how i describe it and i want to anoyone, that have setup my server as dns server to be able to do this...if it is ununderstable please let me know i try to describe better what i want and sorry for me english.

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum