You are not logged in.

#1 2007-01-04 07:52:03

kaekko
Member
Registered: 2006-11-20
Posts: 5

Double DNS server

I have a domain pointing to my server.
Is it possible to configure the dns server so that it gives two different answeres acording to the requesting ip?
I need that it gives IP like 192.168.1.23 to the computer in my network, but ip like 236.48.215.32 to the computers outside the network.

Offline

#2 2007-01-04 08:33:05

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Double DNS server

Use /etc/hosts for your LAN.

Offline

#3 2007-01-04 08:45:49

kaekko
Member
Registered: 2006-11-20
Posts: 5

Re: Double DNS server

tomk wrote:

Use /etc/hosts for your LAN.

If I use /etc/hosts I don't have to configure it on every machine? Or only on the server?

Offline

#4 2007-01-04 15:22:50

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Double DNS server

the easiest solution is probably going to be split dns.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2007-01-04 18:56:29

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: Double DNS server

kaekko wrote:
tomk wrote:

Use /etc/hosts for your LAN.

If I use /etc/hosts I don't have to configure it on every machine? Or only on the server?

You can use /etc/hosts on server, install dnsmasq and tell all local clients to use that dnsmasq server.


to live is to die

Offline

#6 2007-01-06 05:29:32

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Double DNS server

If the clients are windows PCs, you can put the server into C:/windows/system32/drivers/hosts

This file is consulted before any DNS lookup, so putting your domain and then the 192.168.*.* address should override anything in DNS.

The DNSMASQ solution would also work, but you would be required to have your server on for your clients to access the internet with any sort of speed (or such is my experience), because the windows clients try to connect to the DNS server each time they want to do a lookup, and you have to wait for the connection to the server that isn't there to time out before a new server is tried.

Offline

#7 2007-01-06 07:30:20

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Double DNS server

Hi kaekko,
with Bind 9.x you can use the views, see this:
http://www.howtoforge.com/two_in_one_dns_bind9_views

Offline

#8 2007-01-06 15:44:57

kaekko
Member
Registered: 2006-11-20
Posts: 5

Re: Double DNS server

luca wrote:

Hi kaekko,
with Bind 9.x you can use the views, see this:
http://www.howtoforge.com/two_in_one_dns_bind9_views

I have chose this solution, because bind9 was just installed and configured.
Thanks to all. Now everthing works.

Offline

Board footer

Powered by FluxBB