Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-21-2005, 02:58 PM   #1
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Need advice / suggestions on DNS behind a router

Hi folks,

I have a localized lab that I work in. The setup is pretty simple - I have a router that forwards DNS requests to the "outside world", and behind it about 30 some odd machines that have a mix of static and DHCP addresses.

The lab boxes use the router for primary DNS, The router also does NAT and DHCP.

What I'd like to do is build up a Debian DNS server in the lab for local addresses only. So if I have a machine named "server1" that has a NAT address, I can type "ping server1" from within my lab and get the address of the machine.

The problem is that the actual machine name needs to be a company mandated ( So what I hope to do is assign my new internal Debian DNS box a set of static name mappings, and thenset that server as secondary DNS for the windows and linux boxes inside.

Does that make sense? Eg: - > maps to -> "server1"

Basically I want to make up my own names for the machines and be able to ping them (eg "ping mailserver" "ping fileserver") instead of having to know the machine's actual domain name in order to hit it with either a ping, or a \\ in Windows.

Does it seem sensical that I could set a Debian DNS box as seconday, then edit (something I'm not sure of) to add my own A records in?
Old 01-21-2005, 03:54 PM   #2
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You add the information to the /etc/hosts file. This will only work for static addressing. If you are using dhcp assigned addresses it gets very complicated. Basically on Linux boxes you would setup the host names with their ip address in the hosts file. M$ also use the hosts file but I am not sure that it can be used for name resolution.
Old 01-21-2005, 04:02 PM   #3
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
If you have control of the primary DNS server, then you could just use a split-view on that server. That way the outside world only sees what you want it too and you can add the internal stuff to the other view which you set to only be viewable within the LAN. Then you can keep a seaparate zone file for the domain with whatever naming scheme you want in the internal view.

If you don't have control over the primary, then sure you could setup your own DNS server for the domain and use it to resolve the names for you. Either way should work fine, I'd think.
Old 01-22-2005, 12:04 AM   #4
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
I am afraid ti's not that simple .. DNS servers are not "routers" .. they only resolve names .. and they need to talk to each other ..
If you can connect to 1 .. you don't don't connect to the second .. the 1st one is supposed to give you answers or get it for your.
DNS servers also don't behave when they are hidden behind "firewalls". So it may not work for you at all.

What you are looking for are aliases to ping around with .. your DNS solution will be a huge undertaking.
my suggestion is
: write a script that pings thes the host by IP numbes and collect your "hostname" data ..
now use that host name data and map it into "your names" and.

now you can write a wrapper on ping to translate "your name" to the "actual hostnames" .. which is what you want to do .. not the
full bang DNS server.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless PCI Card-- some advice / suggestions harisund Linux - Hardware 6 11-28-2005 06:34 AM
DNS Server suggestions Drfarfrompuken Linux - Networking 1 08-10-2005 01:50 PM
help! i need advice and suggestions for fast processing eph General 4 03-17-2004 06:42 AM
suggestions for DNS redundancy? rabbate Linux - General 3 03-15-2004 11:34 PM
Router/firewall suggestions phoenix76 Linux - Security 3 11-30-2003 10:26 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration