LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Bind internal IP to www (https://www.linuxquestions.org/questions/red-hat-31/bind-internal-ip-to-www-375611/)

tryangle 10-21-2005 09:59 PM

Bind internal IP to www
 
Is there a way to route an internal IP to a separate zone file (without setting up a separate incidence of bind on eth0:1)... in order to resolve www internally?

This is a wild guess that kinda illustrates my point...
if(listen-on:192.*){ include "internal.zone";}
else{include "external.zone";}

Thanks in advance for any help on this...

tryangle 11-02-2005 09:03 PM

named -v returned 9.3.0

Anyhow... basically I'm trying to get computers in the internal subnet to get different answers than the rest of the world when they are resolved.

192.168.1.27 query looks up www.domain.com and gets 192.168.1.1
207.65.181.23 query looks up www.domain.com and gets 200.22.216.125

Any ideas?

archtoad6 11-04-2005 09:42 AM

Thanks for providing the named -v results.

Some Q's:
  • Are you still using RH9?
  • What "FM's" have you already read?
  • What is BIND running on, to whom, & for what is it providing DNS?
  • Is "207.65.181.23" your real IP? In any case does it represent an external IP owned by a box on the internal net?

My guess is that you are running a web site from home (or office). You have a server on your LAN that has a separate static IP. You are providing your own DMS to the world for your domain through the DNS server under discussion. This DNS server is on your LAN & also provides local (internal) DNS also.

tryangle 11-30-2005 08:47 PM

Hi archtoad6,

Thanks for your reply... sorry, I'm a little late picking up on the thread.

I'm sortta still using RH9. I installed it a couple years ago... had it running for over a year, then switched to mepis... then to knoppix... now I'm using redWall, which is a derivative of RH9.

I used to have a second incidence of bind on eth0:1 but as I was getting things configured again, I had the thought that it may be able to be done a little easier with a script inside named.conf but I haven't found any info to support my theory.

Bind is running... not sure what you mean, "on what and to whom." The box also functions as a nameserver.

No, 207.65.181.23 is not my real IP it's just an arbitrary random IP address to provide an example of someone out on the web or wan who would access a website via it's external, static IP. By contrast, someone on the lan would access the same website via it's internal, static IP. Currently, I route the external queries to www. and the internal queries to lan. but when I had the alias set up on eth0:1 I could route the internal queries to www. as well.

I'm still interested in pursuing this further... however, I did come up with a workaround using php. I think it was $_SERVER['HTTP_HOST'] and a regular expression to "see" where the query was coming from, for cross-site links.

Thanks again...


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