Solved

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

Posted on 2007-04-02
2
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I will assume you are running a non-server version of some sort of Windows throughout this article. There are many flavors of Windows since Windows Server 2000 - 2008, XP Home & Pro, Vista Home & Pro, and Windows 7 Starter, Home, Pro, Ultimate, etc.…
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

636 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