Solved

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

Posted on 2007-04-02
2
377 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
ID: 18838885
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
ID: 18840837
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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

912 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

20 Experts available now in Live!

Get 1:1 Help Now