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 02-29-2012, 09:19 AM   #1
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Rep: Reputation: Disabled
dns server - bind configuration question


I need help in confirming a simple bind configuration.

At home, beyond a dynamic IP, I run my WEB server on debian lenny. Now I want this computer to be also a DNS server. I have my own domain, I don't care about a secondary server and have no need for a mail server.

Please tell me if my data base configured well. Since my IP is dynamic, I'll run a script and whenever I sense an IP change, I'll stop bind, create new zone files and start it again.

Assuming the IP I receive is 79.180.60.23, is this file is okay.

; example.com
$TTL 604800
@ IN SOA ns1.example.com. root.example.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800); Negative Cache TTL
;
@ IN NS ns1
IN A 79.180.60.23
ns1 IN A 79.180.60.23 ;my case is simple both DNS server and
www IN A 79.180.60.23 ;web server are on the very same debian
 
Old 02-29-2012, 09:47 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
how does running a dns server on a dynamic IP help you? If your IP changes, how does anything reach your DNS server to find out??

Don't run your own DNS. User a service like zoneedit.com, and use their scripts to trigger updates when your IP changes
 
Old 02-29-2012, 09:58 AM   #3
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
My understanding was that once I start bind, it will the the root server of my domain the IP of my DNS server, based on the following line in the zone file:
ns1 IN A 79.180.60.23
 
Old 02-29-2012, 11:46 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Right.... and when the IP changes...???
 
Old 02-29-2012, 11:58 AM   #5
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
This is why, I suggetsed that I'll have a script running, from root, that when it senses an IP change, it will do bind stop, prepare new files, zone and reverse, delete the old ones, and fire again bind.
 
Old 02-29-2012, 12:08 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, you're really not getting this.

Firstly rebuilding a zone file is a really bad idea - use dynamic updates instead, but principally, how does anyone EVER use your server in the first place out on the web?

Your understanding of DNS architecturs seems pretty floored. What do you think would happen if you built a zone file for google.com? would 2/3 of the worlds search traffic suddenly hit your machine?

Last edited by acid_kewpie; 02-29-2012 at 12:10 PM.
 
Old 02-29-2012, 12:32 PM   #7
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Well I am new to DNS servers, but I want to run my WEB server as well as DNS server on the same computer at home. Presently my WEB site runs on my computer at home and noip does the DDNS, but I am going to buy a domain of my own. Still I want to save and do the DNS server on the very same debian box.

I thought that once I start bind, it will tell the domain company that this is my primary DNS server. When the IP changes, I'll do it again (bind stop, file update, bind start).

What does companies like no-ip do when I notify them on IP change.

I did not understand the example with google, which was mentioned. I'll always point to the domain that I bought.
 
Old 02-29-2012, 03:34 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it will tell the domain company?? how? magic? It'll do no such thing. you need to tell your registrar where your name servers are, and you clearly can't do that if it changes constantly.

You do NOT wnt to run your own name server. not yet. use zoneedit etc, or your registrar may provide their own solution for you already.
 
Old 02-29-2012, 10:21 PM   #9
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
So this is to say: that when I buy a domain they' ll ask also for an IP? I have to commit for this IP and can not change it every two weeks on average. Why should the domain company care? It is a matter between my DNS server and their root server only?

Isn't it like I start by storing my site with company A and switch to B?
 
Old 03-01-2012, 01:36 AM   #10
pini
LQ Newbie
 
Registered: Feb 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
From a DNS tutorial on this site, I learn that when I register a domain I need also to give names for primary and secondary name servers. When I specify an A record, during the process of configuring bind, I specify IP addresses.

I did not see a restriction on how often one may do it.
 
Old 03-01-2012, 02:23 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Right, step one. you go find a domain registrar that will let you constantly update your NS records. Changing NS records on their stub zone is not at all the same as changing your own A / CNAME records on a whim, and just doesn't happen. Get that sorted first, and THEN worry about the mess you have from continually changing them. from TTL's not being adhered to, from caches containing old data.

Do not run your own DNS server. There is NO benefit to you at all, if it is even possible to achieve what you want in the first place.

If you don't understand the issues that i'm trying to get across to you, that in itself should be enough reason for you to either stop to properly understand the situation or use one of the MANY perfectly good alternatives already available that will put you in a much better solution whatever you manage to end up assembling.
 
  


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
BIND IPv6 DNS Server Configuration austinium Linux - Server 3 07-17-2012 09:54 AM
bind dns configuration help anurajr Linux - Newbie 4 01-02-2012 06:22 AM
LXer: Linux DNS server BIND configuration LXer Syndicated Linux News 0 08-05-2010 11:30 PM
configuration DNS ,bind server Tomas12345 Linux - Newbie 1 06-29-2009 08:42 AM
DNS configuration with bind snipersock Linux - Networking 6 08-24-2004 04:00 PM

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

All times are GMT -5. The time now is 03:09 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