www ilo local ip to access website on lan
I can access a website hosted in-house by using the internal ip. I'd like to be able to resolve the Domain name (ie www.sitename.com) from the lan instead of using the internal ip though. I've been checking around, and I'm not sure... but what I'd like to configure might be referred to as Split Horizon? I've also found info about setting up a proxy... Zorp? I've also found info related to setting up two instances of tinydns or one instance of BIND and editing /etc/hosts? I'm not sure... maybe this isn't even a Linux question... perhaps there's a router setting that will accomplish this?
I guess I'm looking for a little direction here... not wanting to make it more complicated than it needs to be, and certainly not wanting to make all kinds of changes and not even accomplish what I'd like to do. Thanks in advance for any help on this... Tryangle |
If you're talking about 1 computer, you can add the name/ip to your /etc/hosts file. If there are several computers, are you using your ISP's DNS server, or your own?
|
Thanks Suncoast for picking up on this...
I setup a Server for a friend to host his website. I have it doing DNS with BIND named. The thing is, he's unable to run a spider to index his site because it returns the lan address. I added the Server's internal IP to /etc/hosts but now it gets stuck on the router address of 10.0.0.2 for some reason... and asks for a username and password. Thanks again for any help... Tryangle |
Quote:
Is the website reachable from the outside? What is the IP from the server? What is the content of /etc/hosts ? |
So you have a public Web server behind NAT, and you want both internal and external hosts to resolve by name to that server. Are you running Apache with VirtualHost directives? Because the easiest way I know to do this is to create a unique Extranet name for the private IP and add a VirtualHost directive for it in Apache. Or if you just have a couple of computers on the Intranet or Extranet, you can simply add a static host record to your local client hosts file with the private IP address, and let bind resolve external DNS queries to the public IP address.
|
Quote:
|
Sorry for the delay in my reply...
# /etc/hosts 66.59.110.177 sun.questudio.com sun 192.168.1.234 sun.questudio.com sun 127.0.0.1 localhost 127.0.1.1 sun # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts I'm running Ubuntu. The website is accessible from the outside... www.surchin.net But when I type in the external address from the LAN, I get this message on a login screen... "The server 10.0.0.2 at Viking requires a username and password." I have no Viking, that I know of. I have a Linksys router, and I'm able to log into it at 192.168.1.1 However, as I've looked through the configuration files of the Linksys, I noted the 10.0.0.2 address, but I don't understand what it's for. I have a password for logging in to 192.168.1.1 but not for 10.0.0.2 so when I fail to login, it takes me to http://10.0.0.2/hag/pages/home.htm with a "401 Unauthorized" message. I sorta understand some of what's recommended here... I have a virtual host setup for Apache, so I'm understanding that I need to have a "duplicate" entry for the site, associated with the internal ip? Thanks again for any help on this... Tryangle |
I can only guess that your internal request is being routed externally, and the ISP's network is able to route that IP address to a location other than yours.
Try just this for your internal client: Code:
192.168.1.234 sun sun.questudio.com. Quote:
|
Indexing should be done on the basis of the domain name not the IP address, since tomorrow there is a distant possibility that you change the host.
You can set up a single instance of bind to serve for both the internal/external domains, so that in case you resolve www.example.com from external, it resolves to a public IP, and from internal it resolves to a private IP. As said by @Suncoast, internal request is being routed externally, to a location other than yours. Regards, -- Prasanta |
Thank you for the responses...
I have had it setup to resolve the site internally as lan.surchin.net and that has worked fine all along. The thing is, when I index the site internally it returns pages with lan (or www2) as part of the address path that can't be accessed externally... and if I index it externally it returns pages with www as part of the address path that can't be accessed internally. I know it can work, because I had it setup using a different router and another server about 4 years ago that got fried. I only did it that one time, and don't remember how I got it to work, but I was able to resolve the exact same www address both internally and externally. I'm wondering if it had something to do with having dansguardian and squid on the other box... something about the proxy? I just don't know. That's my dilemma, Tryangle |
All times are GMT -5. The time now is 01:09 PM. |