Help answer threads with 0 replies.
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 04-19-2006, 10:42 AM   #1
LQ Newbie
Registered: Aug 2005
Posts: 16

Rep: Reputation: 0
BIND - want to give local IP to internal users

I have a Fedora Core 4 server running a webserver, it has a domain which is updated regularly to point to my dynamic external IP.
But I have some users on my local network that should go to the webservers local IP rather than the external IP. How can I set up my (already working) caching DNS-server BIND to return when somebody asks the dns-server of the IP to my domain?
Old 04-20-2006, 02:27 PM   #2
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
A regular dns server can't give 2 different answers depending on the source of the query.

So, you should use another name to access your webserver internally, or you can use a different nameserver for internal and external queries, or you can play with iptables to forward the traffic from one IP to the other (maybe not the nore efficient solution).
Another solution is to add the name and IP of the webserver in the hosts file of every client (exists also under windows, smewhere lost in the middle of the windows/winNT directory). I don't think you can push these entries through DHCP, but that might be worth checking as it would be an easy solution to implement.

Hope this helps
Old 04-20-2006, 05:30 PM   #3
LQ Newbie
Registered: Aug 2005
Posts: 16

Original Poster
Rep: Reputation: 0
I know it cannot give two different answers, but I'm only going to use this DNS-server for local users, the only thing I want to is to get it to give my local IP adress instead of the "real" external dns-record for my domain.

And I cant' get it to work, when I try to "dig" the domain after making my zone file I get an errormessage from the DNS-server.

In messages BIND logs an error on my " A 10.0.0.x" line in the zone-file. why I don't understand, I have followed some guides I found on the net...
Old 04-20-2006, 11:16 PM   #4
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
A regular dns server can't give 2 different answers depending on the source of the query.
Sorry, but I disagree. A single DNS server (single instance/single NIC) can return a different answer based on the source address of the query. Checkout the bind/named feature called "views"
Old 04-21-2006, 12:49 PM   #5
LQ Newbie
Registered: Aug 2004
Posts: 18

Rep: Reputation: 0
my limited experince with dns server tells me that he would have to use full blown DNS server instead of cache.

Also, why not just simply give different name to internal user for intranet site??
Old 04-21-2006, 06:22 PM   #6
LQ Newbie
Registered: Aug 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Well, I got it all working - my FC4 with BIND worked as a charm just by turning it on, and then I made a zone for mye domain which points to the local IP adress.
Since this DNS-server is just to be used for users connected to my local network I didn't bother using the "view" function to give different IP's for internal or external users.


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
Bind internal IP to www tryangle Red Hat 3 11-30-2005 09:47 PM
how to authenticate external users but bypass prompt on local LAN users? taiwf Linux - Security 5 07-13-2005 10:01 AM
Give local computer unrestricted access Boffy Linux - Security 2 08-15-2004 06:23 PM
know what bind, dns, a domain, and an internal network have in common? me neither majortool Linux - Networking 10 07-27-2004 01:42 PM
Bind 9 - zone transfer using internal IP ? michael_util Slackware 1 03-25-2004 12:15 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:40 PM.

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
Open Source Consulting | Domain Registration