Re: DNS Name Server with one IP address

From: Chris (ceo_at_nospan.on.net)
Date: 01/22/04


Date: Thu, 22 Jan 2004 16:20:42 GMT

Ivan wrote:
> Hi all,
>
> Scenario:-
> Linsys Router
> External IP (xxx.xx.xx.xx)
> Internal IP (192.168.1.1)
>
> Router DMZ on and points to Linux box (192.168.1.10)
>
> Linux Box (192.168.1.10)
>
> Now I have a domain name www.mydomain.com registered with a registrar
> (Currently uses their dummy name servers need to supply my own)
>
> 1) I cannot ask my ISP for this service or the registrar due to $$
> 2) I would like to use run my own name server for flexibility (i will
> find a secondary nameserver)
> 3) I have tried free name server providers (but the refresh times are
> too long >24hr)
>
> How do I set up so when a user points to www.mydomain.com so it
> resolves to my Static IP address (xx.xx.xx.xx)?
> My primary dns/www/mail server will all be on one machine
> (192.168.1.10), is this configuration possible for an individual with
> one IP address? If so how?
> Please brief me on the DNS named and zone files as to what IP address
> they should contain (local 192.168.1.10 or external (xx.xx.xx.xx)).
>
> All suggestions welcome however wish your answer can be detailed as I
> am now worn out....
>
> p.s. I have gone through a lot of postings but not come across with my
> setup above.(I could eliminate the router in between and configure
> Linux as the router)

This is totally possible to do. I would say that the responses you've
received thus far haven't been overly enlightening. I wish I had the
time to get really detailed with you, but I don't right now. But basically:

(1) Start by getting your Linux machine set up first:
- Create your DNS zone file for mydomain.com in /var/named
- Reference the zone file in /etc/named.conf allowing zone transfers
from the registrar and whomever you chose as your secondary DNS (more on
that soon)
- Restart named on your machine (# /etc/init.d/named restart)

(It's totally possible to setup your /etc/named.conf to allow your DNS
to work as a local caching DNS as well as your primary DNS simulatneously.)

(2) Ready your router/firewall:
- Port forward (I believe the correct nomenclature for Linksys) your
service ports to the box or boxes behind your router that will be doing
the HTTP, SMTP, etc. processing. If it's the Linux box, then port
forward 80, 25, and whatever else you want to 192.168.1.10.
- You don't need DNS set up to test to see if these work, just telnet
(from an outside IP preferably) to your public IP at port <x>.
- Port forward port 53 to 192.168.1.10. This will allow the DNS servers
you specifed in /etc/named.conf to complete their zone transfers. You
HAVE to do this.

(3) Get a secondary DNS.
- You have to do this for most registrars.
- I can't recommend any secondary DNS service providers, but I used
www.twisted4life.com with GREAT success. It was free and updates were
>24hrs.
- Whatever address your secondary DNS provider says is going to do the
zone transfers, make sure that address is specified in /etc/named.conf
so that they can do zone transfers.
- You should, within the refresh period, see the zone transfer take
place from the secondary DNS provider to your Linux box (xxx.xxx.xxx.xxx
-> 192.168.1.10) by looking in /var/log/messages.

(4) Update your registrar records.
- Go back to your registrar and specify your primary DNS address as your
public IP and your secondary DNS providers IP as your secondary.
- Wait. Should take 24 hours but they allow for 72 hours.

This *should* do it.

It is totally possible for all your services to run off the same box and
to have the same IP set in your DNS zone file. Works just fine. There
are differing opinions in the DNS world as to whether you should use
CNAME records for the same IP, but I use regular A records, and this
works just fine. CNAME cause an additional DNS lookup, so I use A
records. Either way is going to get you what you want if you set it all
up correctly. It's a BIT tedious, but it's not impossible to do and
very rewarding to be running your own DNS...

When you are all done and you know your new DNS servers have propogated
out from updating your registrar records, run your public IP through
http://www.dnsreport.com You should come back with a good report.

If you are going to run email through your box, you need to address MX
records as well in your zone file.

Sorry I can't get more detailed right now (about the configuration of
the zone file which is important!!!) Maybe you can read up on that. If
you are going to run your own DNS, you should at least get serious and
purchase O'Reilly's "DNS and BIND" book. It's the best. And it details
the configuration of a simple zone file which should work for you. It
has a couple of "cookbook" scenarios in the book. It's well worth your
money if you are going to be serious about this. Everything will hang
on the proper configuration of your zone file...

The guys in the Linux networking group will do you better than here,
more than likely, if you need some tweeking.

Chris
-----
Chris Olive
chris (-at-) technologEase (-dot-) com
http://www.technologEase.com
(pronounced "technologies")



Relevant Pages

  • Re: Networking problems (again) tough one
    ... The problem *only* occurs on my Linux machines. ... DNS numbers, ... all systems start working again whether setup manually or with DHCP. ... If theu are shoing good, and yet things dont work, you may have a misconfigured router. ...
    (comp.os.linux.setup)
  • Re: DNS Name Server with one IP address
    ... > Router DMZ on and points to Linux box ... Create your DNS zone file for mydomain.com in /var/named ... Reference the zone file in /etc/named.conf allowing zone transfers ...
    (comp.os.linux.setup)
  • Re: DNS Name Server with one IP address
    ... > Router DMZ on and points to Linux box ... Create your DNS zone file for mydomain.com in /var/named ... Reference the zone file in /etc/named.conf allowing zone transfers ...
    (comp.os.linux.misc)
  • Re: DNS Name Server with one IP address
    ... >> Router DMZ on and points to Linux box ... > from the registrar and whomever you chose as your secondary DNS (more on ... > to have the same IP set in your DNS zone file. ...
    (comp.os.linux.networking)
  • Re: DNS Name Server with one IP address
    ... >> Router DMZ on and points to Linux box ... > from the registrar and whomever you chose as your secondary DNS (more on ... > to have the same IP set in your DNS zone file. ...
    (comp.os.linux.setup)