DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 28th, 2011, 02:31 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
DNS Template Help -- Adding NS and A Records

I need some help adding custom NS and A records so that ns1.mydomain.com and ns2.mydomain.com point to my secondary server's ip of xxx.xxx.xxx.xxx while ns3.mydomain.com and ns4.mydomain.com both have NS and A records that point to the current server's IP address.

Here's a DNS template file for my site:

Code:
$TTL    86400
@       IN      SOA     ns.mydomain.com. {dnsemail} (
                        {serial}     ; Serial, this is dns zone template file.. 
                        10800   ; Refresh
                        1200     ; Retry
                        86400  ; Expire
                        86400 ) ; Minimum

mydomain.com.           IN NS   ns3.mydomain.com.
mydomain.com.           IN NS   ns4.mydomain.com.
ns.mydomain.com.        IN A    {dnsip}
ns1.mydomain.com.       IN A    209.44.107.250
ns2.mydomain.com.       IN A    209.44.107.250
ns3.mydomain.com.       IN A    {dnsip}
ns4.mydomain.com.       IN A    {dnsip}
dns.mydomain.com.       IN A    {dnsip}
dns1.mydomain.com.       IN A    {dnsip}
dns2.mydomain.com.       IN A    {dnsip}
mydomain.com.           IN A    {webip}
mail.mydomain.com.      IN A    {mailip}
smtp.mydomain.com.   IN A    {webip}
imap.mydomain.com.   IN A    {webip}
webmail.mydomain.com.   IN A    {webip}
ftp.mydomain.com.       IN CNAME        mydomain.com.
www.mydomain.com.       IN CNAME        mydomain.com.
mydomain.com.           IN MX  10 mail.mydomain.com.
mydomain.com.           IN TXT "v=spf1 a mx"
ns1.mydomain.com.           IN NS   209.44.107.250
ns2.mydomain.com.           IN NS   209.44.107.250
ns3.mydomain.com.           IN NS   {dnsip}
ns4.mydomain.com.           IN NS   {dnsip}

{customdns}

*                       IN A    {webip}




This template seems to be working, but I still can't access ns3.mydomain.com through http:// --- the nameservers are resolving. I just recently made these DNS changes, but I doubt it takes longer than 12 hours?

Do you see any problems? Will ns1.mydomain.com and ns2.mydomain.com successfully "redirect" to the secondary server while ns3.mydomain.com and ns4.mydomain.com will point to the current server? All of these entries will act as NS and A, right? Does anything need to be changed?

Reply With Quote
  #2  
Old May 28th, 2011, 03:29 PM
CaptPikel CaptPikel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Location: Florida
Posts: 248 CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
NS records are for domains, not hosts. The servers ns1, ns2, ns3 and ns4 are all considered hosts and do not need NS records. Just A records. So remove the NS records for the hosts towards the bottom, and add the following:

Code:
mydomain.com.   IN NS ns.mydomain.com.
mydomain.com.   IN NS ns1.mydomain.com.
mydomain.com.   IN NS ns2.mydomain.com.


As for a length of time for a change. If you didn't properly plan the change over, your default ttl is 86400 seconds, or 24 hours. So pretty much any of your records that got cached somewhere won't require an update for at least 24 hours. I'd suggest finishing your SPF statement with a "-all" as well. And lower the minimum value in the SOA down to something at or less than 3 hours. Most servers wont ncache over 3 hours but if it does and you make a mistake on a record, it will be ncached for 24 hours.

Reply With Quote
  #3  
Old May 28th, 2011, 07:10 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
Thanks so much for the help CaptPikel!

Does this look right now?

Code:
$TTL    86400
@       IN      SOA     ns.mydomain.com. {dnsemail} (
                        {serial}     ; Serial, this is www.ehcp.net dns zone template file.. 
                        10800   ; Refresh
                        1200     ; Retry
                        86400  ; Expire
                        10800 ) ; Minimum

mydomain.com.           IN NS   ns.mydomain.com.
mydomain.com.           IN NS   ns1.mydomain.com.
mydomain.com.           IN NS   ns2.mydomain.com.
mydomain.com.           IN NS   ns3.mydomain.com.
mydomain.com.           IN NS   ns4.mydomain.com.
ns.mydomain.com.        IN A    {dnsip}
ns1.mydomain.com.       IN A    209.44.107.250
ns2.mydomain.com.       IN A    209.44.107.250
ns3.mydomain.com.       IN A    {dnsip}
ns4.mydomain.com.       IN A    {dnsip}
dns.mydomain.com.       IN A    {dnsip}
dns1.mydomain.com.       IN A    {dnsip}
dns2.mydomain.com.       IN A    {dnsip}
mydomain.com.           IN A    {webip}
mail.mydomain.com.      IN A    {mailip}
smtp.mydomain.com.   IN A    {webip}
imap.mydomain.com.   IN A    {webip}
webmail.mydomain.com.   IN A    {webip}
ftp.mydomain.com.       IN CNAME        mydomain.com.
www.mydomain.com.       IN CNAME        mydomain.com.
mydomain.com.           IN MX  10 mail.mydomain.com.
mydomain.com.           IN TXT "v=spf1 a mx -all"

{customdns}

*                       IN A    {webip}

Reply With Quote
  #4  
Old May 28th, 2011, 07:51 PM
CaptPikel CaptPikel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Location: Florida
Posts: 248 CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
Looks like it should be ok now for the zone.

Reply With Quote
  #5  
Old May 28th, 2011, 10:27 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
Thumbs up

Thanks again for clearing up my understanding of DNS! I really appreciate it.

Reply With Quote
  #6  
Old May 31st, 2011, 02:07 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
Hey, I've got another related question:

What should the following be set to if I have a dynamic IP address?

Code:
$TTL    86400
@       IN      SOA     ns.mydomain.com. {dnsemail} (
                        {serial}     ; Serial, this is www.ehcp.net dns zone template file.. 
                        10800   ; Refresh
                        1200     ; Retry
                        86400  ; Expire
                        10800 ) ; Minimum


Basically, I'm thinking that if my IP changes, I can update {dnsip} to my new IP address. How would I shorten the time it takes for my DNS to be updated? Bind is installed on my server.

Reply With Quote
  #7  
Old May 31st, 2011, 02:28 PM
CaptPikel CaptPikel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Location: Florida
Posts: 248 CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
Lower the $TTL value or explicitly state a value for whatever A record is changing. I have a dynamic ip at home and a website. I have my default ttl set to 60 seconds. This is acceptable since I have hardly any traffic to my site. So my max downtime from me changing a record is a minute. A time to choose is ultimately up to you though. I would highly suggest something much lower than the 86400 that you have at the moment.

Reply With Quote
  #8  
Old June 1st, 2011, 09:09 AM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
Quote:
Originally Posted by CaptPikel
Lower the $TTL value or explicitly state a value for whatever A record is changing. I have a dynamic ip at home and a website. I have my default ttl set to 60 seconds. This is acceptable since I have hardly any traffic to my site. So my max downtime from me changing a record is a minute. A time to choose is ultimately up to you though. I would highly suggest something much lower than the 86400 that you have at the moment.


I'll try that.

Do you use a dynamic DNS service? When ns3.mydomain.com and ns4.mydomain.com change IP addresses, wouldn't the host entries at my registrar (GoDaddy) need to be updated? My domain uses the nameservers of ns3.mydomain.com and ns4.mydomain.com... wouldn't that relinquish any control the registrar would have over my host entries and DNS?

Reply With Quote
  #9  
Old June 1st, 2011, 11:42 AM
CaptPikel CaptPikel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Location: Florida
Posts: 248 CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level)CaptPikel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
I have a dynamic IP that hasn't changed in over 2 years with my cable provider. Although, yes, everytime it changes I have to update with my registrar. Luckily an update takes about 45 minutes to update the glue records. There are ddns services out there but I honestly haven't looked in to them.

Reply With Quote
  #10  
Old June 1st, 2011, 02:49 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
My IP changes every 20 days

I'd like to be able to continue to give out NS3.mydomain.com and NS4.mydomain.com to my clients as the nameservers they need to use. How could I do this with DynamicDNS? Would I update the host name addresses at GoDaddy and point them to the DynamicDNS, which points to my server? Would I have to change any DNS settings on the server's end?

This is getting complicated now.

Or, would I have to give out the nameservers as mydomain.dyndns.org ?

Reply With Quote
  #11  
Old July 27th, 2011, 09:28 PM
own3mall own3mall is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 20 own3mall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 54 sec
Reputation Power: 0
Is the following a valid DNS A entry? If it's not, can you please explain why? My DNS stopped working after I added this line... got rid of it, and it worked again, but I don't see how it could have messed my DNS up.

Code:
www.mydomain.com. IN A myIP

Reply With Quote
  #12  
Old July 27th, 2011, 10:44 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jan 2005
Location: Florida
Posts: 5,091 hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 3 Months 2 Weeks 6 Days 21 h 46 m 50 sec
Reputation Power: 5048
Quote:
Originally Posted by own3mall
Is the following a valid DNS A entry? If it's not, can you please explain why? My DNS stopped working after I added this line... got rid of it, and it worked again, but I don't see how it could have messed my DNS up.

Code:
www.mydomain.com. IN A myIP


It is, provided you used the format xxx.xxx.xxx.xxx for the IP address. When you say your DNS stopped working, what exactly happened?
__________________
"I don't need to get a life. I'm a gamer. I have lots of lives!"

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > DNS Template Help -- Adding NS and A Records

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap