Solved

How to make DNS Server work with intranet on Unbutu Server?

Posted on 2007-04-02
2
359 Views
Last Modified: 2011-09-20
Hi all,

  I want to set up a test environment for the Web Developing,so download a Unbutu Server 6.10, installed it on a old PC.

  I had setup the apache well....

  But on the intranet, something not work for me.

  I am using Netgear WNR854T for the broadband router. And all computer are using static IP base on 192.168.218.x, and all computer's DNS is setting to using ISP's DNS ....

  On my environment, here are the setting:

  PC A (Developmet Workstation)
  IP: 192.168.218.61
  Sub mask 255.255.255.0
  Gateway: 192.168.218.1
  DNS1: 218.102.66.71 (Want to change to using 192.168.218.121 also can resolv domain name)

Linux Server (full name is linux.testserver.org)
IP 192.168.218.121
Sub mask 255.255.255.0
Gateway: 192.168.218.1
DNS: 192.168.218.121


  The big problem is, while I change the DNS value from the ISP one to the Unbutu one, like from 218.102.66.71 change to 192.168.218.121 (The Intranet Linux Server DNS IP) on my workstation

  Try using nslookup on my workstation and the linux server It will time out, and can not resolv any domain name, both the Linux Server itself and the client, but if using the ISP' DNS server, the Linux server can resolv domain name ....

  The Router's Gateway is 192.168.218.1, and the Unbutu Server IP setting are like that.

in   /etc/resolv.conf
search testserver.org
nameserver 192.168.218.121
nameserver 192.168.218.1
-----------------------------------------------

in /etc/bind/named.conf

zone "testserver.org" {
    type master;
    file "/etc/bind/zone.testserver.org";
};
--------------------------------------------------------------

in /etc/bind/zone.testserver.org
$TTL    3600
@       IN      SOA     linux.testserver.org. root.localhost. (
                              1         ; Serial
                           3600         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                          86400 )       ; Negative Cache TTL
;
@       IN      NS      linux.testserver.org.
@       IN      A       192.168.218.121
www     IN      A       192.168.218.121
ftp     IN      A       192.168.218.121

It is all, how to setting the Unbutu DNS Server work on my intranet, since if it not work, I can not make a test environment to development the web site like enter this type of domain name ...

 www.microsofttest01.com, etc ....

It just time out while my workstation change from using ISP's DNS to the Linux Server one.

Thx for your time.
0
Comment
Question by:explorer1979
2 Comments
 
LVL 5

Expert Comment

by:NickVd
Comment Utility
You could always just use http://localhost for your development purposes, as it's what I use on my development machine.

Now, to your question (as I also have a setup like you are using for the other pc's in the office to connect to my machine easily)

What I did was create a new TLD (top level domain [.com .net .org]) named .int (for internal) as such:

zone "int" {
        type master;
        file "/etc/bind/db.int";
};

That way, I am able to create my own second level domain names for my various projects that I want the other people to easily access, since it's my own DNS system, I'm able to create any domain I want, and point it to any ip address I want.

$TTL    86400
@       IN      SOA     int. admin.localhost. (
                         200703156              ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                          86400 )       ; Negative Cache TTL
;
@       IN      NS      ns.int.
ns      IN      A       192.168.0.3 ; the dns server itself
nick    IN      A       192.168.0.127 ; my development machine on a static dhcp address
; the rest are just cnames for utilities on the local server
; to activecollab.int will load my companies install of active collab
staging IN      CNAME   ns
activecollab    IN      CNAME   ns
backup  IN      CNAME ns
passgen IN      CNAME   ns
;pma    IN      CNAME   ns

; I could have just as easily done this in order to have a domain pointed to my dev machine like so.
newwebsite     IN     CNAME     nick

; Or To a specific address not already defined
clients_site      IN     A     the.hosts.ip.addr


my resolv.conf:

nameserver 127.0.0.1
nameserver my.isps.dns.server

That should be enough to get you started.  I'm also using an ubuntu server for my dns/web/ftp/db.

Just remember to restart bind when changing the bind config, amd reload it when changing the zone files. (/etc/init.d/bind9 reload/restart)
0
 
LVL 35

Accepted Solution

by:
ShineOn earned 125 total points
Comment Utility
Another option would be to set up forwarding, so anything not resolvable by your new DNS server is forwarded by the DNS server to your ISP...

Add an options section at the top of your named.conf

options {
  forwarders {218.102.66.71;};
  forward only;
  // disables all zone transfer requests
  allow-transfer{"none";};
  // Closed DNS - permits only local IPs to issue queries
  // remove if an Open DNS required to support all users
  // or add additional IP ranges
  // in this case either allow-query or allow-recusrion can be used
  allow-query {192.168.218.0/24;};
};

This will create a local DNS cache, and will forward all non-Master-zone requests to your ISP's DNS unless it's in cache.

You should also set up a reverse-lookup zone to balance your forward-lookup zone, if you're going to have more hosts in your internal DNS...:

in /etc/bind/named.conf

zone "218.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/zone.218.168.192.in-addr.arpa";
};

in /etc/bind/zone.218.168.192.in-addr.arpa:

218.168.192.in-addr.arpa.      IN      SOA      linux.testserver.org. root.localhost. (
                              1         ; Serial
                           3600         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                          86400 )       ; Negative Cache TTL
;
@     IN     NS    linux.testserver.org
121  IN  PTR  linux.testserver.org
)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

One of the most often confused topics in the area DNS is the idea of GLUE records. Specifically, what they are, when they are needed, when they are provided, and how they are created. First, WHAT IS GLUE? To understand GLUE, you must first under…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now