LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-24-2005, 02:59 AM   #1
novaprime
Member
 
Registered: Jan 2005
Posts: 39

Rep: Reputation: 15
Question Intranet via hostname


I have a registered DNS and Hostname hosted on the internet that points to my networks WAN IP, and port 80 directed to a computer with a webserver on it via my ADSL router. This works fine if I connect from the internet ie www.mydomain.com brings up the page, but if I type www.mydomain.com inside the local network I get "connection refused".

How can I make the site accessable from inside the network (keep in mind the DNS is hosted externally).

Thanks
 
Old 01-24-2005, 05:16 AM   #2
TheIrish
Member
 
Registered: Oct 2003
Location: ITALY
Distribution: Debian, Ubuntu, Fedora
Posts: 137

Rep: Reputation: 15
Red face

Unluckly, this is quite obvious. Oh, well, I was quite surprised too when it happened to me
When you type the url in your web browser, you get resolved with the external public ip so when you try to access it, the prerouting routines will see it like a sort of spoofing... well, it's more complex actually, but let's make it easy!
Anyway, academic explainations apart, you have an easy, ugly way, and a more complex cool way.
The first one is adding in all you hosts files in your lan a resolution like:
www.mydomain.com 192.168.1.2 (assuming 192.168.1.2 is your webserver)
the second one is putting a DNS cache server in your gateway and instruct him to resolve 192.168.1.2 for local requests...
 
Old 01-24-2005, 05:19 AM   #3
novaprime
Member
 
Registered: Jan 2005
Posts: 39

Original Poster
Rep: Reputation: 15
yeah, thanks. I knew what the problem was, was hoping for a better way around it though.
I ended up sticking a bunch of records in the hosts file for now. Thanks
 
  


Reply


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
Won't connect outside of intranet ignorant_savant Linux - Networking 1 10-23-2004 07:06 AM
What makes an intranet an intranet? pembo13 Linux - Networking 3 06-21-2004 08:20 PM
create an intranet site using the Linux HostName cyberswami Linux - Networking 1 06-08-2003 12:44 AM
Intranet yadavankur Linux - Networking 2 09-18-2002 11:06 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:53 PM.

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