DNS IP Addresses

$ttl 38400
@ IN SOA ns1.company.com.au. hostmaster.company.com.au. (
1270671248
10800
3600
604800
38400 )
company.com.au. IN NS ns1.company.com.au.
company.com.au. IN NS ns2.company.com.au.
company.com.au. IN A xxx.xxx.xxx.xxx
ns1.company.com.au. IN A xxx.xxx.xxx.xxx
ns2.company.com.au. IN A xxx.xxx.xxx.xxx
www.company.com.au. IN A xxx.xxx.xxx.xxx
ftp.company.com.au. IN A xxx.xxx.xxx.xxx
m.company.com.au. IN A xxx.xxx.xxx.xxx
localhost.company.com.au. IN A 127.0.0.1
webmail.company.com.au. IN A xxx.xxx.xxx.xxx
admin.company.com.au. IN A xxx.xxx.xxx.xxx
mail.company.com.au. IN A xxx.xxx.xxx.xxx
company.com.au. IN MX 5 mail.company.com.au.
company.com.au. IN TXT “v=spf1 a mx a:company.com.au ip4:xxx.xxx.xxx.xxx ?all”

Above is a typical DNS record produced by Virtualmin.

Q1: In a production server what should the IP Addresses (xxx.xxx.xxx.xxx) be. Should they be the internal address (192.xxx.xxx.xxx) or the external address (230.xxx.xxx.xxx)?

Q2: Should all (except localhost) have the same address?

Q3: If the answer to Q2 is no then which should have which?

Q4: and most importantly why should they have the IP that they should?

Thanks
Allan

Q1: In a production server what should the IP Addresses (xxx.xxx.xxx.xxx) be. Should they be the internal address (192.xxx.xxx.xxx) or the external address (230.xxx.xxx.xxx)?

That all depends on your setup.

That said, typically, DNS records would point to your external IP address. Otherwise, if remote users were given your local IP during DNS lookups, they’d never be able to find your server, they’d only have a local IP addres.

Q2: Should all (except localhost) have the same address?

That also depends on your setup, and if all the services you’re providing are in a single server.

However, most folks end up with the same IP for the records within a zone file (the “IN NS” records typically differ from the IP addresss though).

Q4: and most importantly why should they have the IP that they should?

This question is a bit like asking “why is the sky blue”. It’s a fair question, but if I knew what problem you were trying to solve, it might be easier to provide a response :slight_smile:

If you’re interested in learning about DNS, the book that helped me get my head around all that was O’Reilly’s “DNS and BIND”.

Remote users are going to do DNS lookups on the various domain names on your server – and BIND needs to have IP addresses associated with those domain names that will lead those remote users to your server.

That’s the short answer… but if you have specific questions, feel free to ask them :slight_smile:

-Eric

Hi Eric

Your answers are very helpful for the first time I feel like I am beginning to understand some of DNS. There is no problem, I am trying to understand the seemingly un-understandable, before I setup a new server. I would say, rather than bring like asking “why is the sky blue” it is more like playing snakes and ladders with real snakes (those suckers just wont sit still). There are to many ways to set this stuff up.

for the benefit of any one reading this, I should also point out, that what I called “the typical DNS record produced by Virtualmin ” was not I made a mistake the typical DNS record produced by Virtualmin is here.

$ttl 38400
@ IN SOA server1.company.com.au. hostmaster.server1.company.com.au. (
1271526339
10800
3600
604800
38400 )
@ IN NS server1.company.com.au.
company.com.au. IN A xxx.xxx.xxx.xxx
www.company.com.au. IN A xxx.xxx.xxx.xxx
ftp.company.com.au. IN A xxx.xxx.xxx.xxx
m.company.com.au. IN A xxx.xxx.xxx.xxx
localhost.company.com.au. IN A 127.0.0.1
webmail.company.com.au. IN A xxx.xxx.xxx.xxx
admin.company.com.au. IN A xxx.xxx.xxx.xxx
mail.company.com.au. IN A xxx.xxx.xxx.xxx
company.com.au. IN MX 5 mail.company.com.au.
company.com.au. IN TXT “v=spf1 a mx a:company.com.au ip4:xxx.xxx.xxx.xxx ?all”

However I am a bit confused by your comment

(the “IN NS” records typically differ from the IP addresss though).

Was that because of my mistake/bad DNS record? Or does it still apply to the DNS record in this post and if so can you please explain what you mean.

Thanks for you great help
Allan

Was that because of my mistake/bad DNS record? Or does it still apply to the DNS record in this post and if so can you please explain what you mean.

If you’re looking to understand what all the DNS stuff there means, I highly recommend reading a book on it… there’s a ton of stuff to learn on the subject :slight_smile:

The “IN NS” record differs because it refers to the names of the nameservers considered to be primary for that domain.

-Eric