Solved

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

Posted on 2007-04-02
2
428 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2010 to 2013 8 102
Single Record DNS Zones 9 39
Windows Deployment Services 6 106
Chrome browsers suddenly reporting DNS_PROBE_FINISHED_BAD_CONFIG when searching 1 47
This article is intended as an extension of a blog on Aging and Scavenging by the MS Enterprise Networking Team. In brief, Scavenging is used as follows: Each record in a zone which has been dynamically registered with an MS DNS Server will have…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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