LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2006, 05:46 PM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Strange DNS behavior with apache


I’ve never owned a domain name until recently and am still pretty new to this kind of stuff, so you will have to bare with me.

I have a domain, let’s say “domain.com”. This domain is registered with godaddy.com (which I am actually transferring to DynDNS).

Internally, I have two domains set up for my local network in my /etc/hosts file.
Code:
127.0.0.1 srv.domain.com  srv   #server
192.168.0.179 dsk.domain.com dsk   #desktop
I put up a small web page on my server which has just an ‘index.html’ file and a subdirectory with another ‘index.html’ file. My domain is not registered to the correct IP address since it changes frequently and godaddy.com does not make it easy to update, so I have been accessing this page by typing my IP into the web browser.

Now, take a look at the following scenarios and let me know if this is normal behavior. (assuming the IP shown is the correct one)

1) http://99.99.99.99 --> displays page just fine
2) http://99.99.99.99/directory --> shows my local domain ‘srv.domain.com’ as the website address and a godaddy.com “coming soon” page is displayed
3) http://99.99.99.99/directory/index.html --> page displays fine
4) if I then remove the ‘index.html’ part from the address when I am at the page on #3, the page will also display fine.

My question is in regards to #2 If I have never once referenced my external IP with my domain, how does it redirect to my domain, and why does it show the sub-domain I have set to my local IP (127.0.0.1). I’m not an expert in security, but it seems to me that if people have access my local domain, they have access to my local network. This bothers me for some reason. Is apache some how trying to forward to my local domain when I attempt to view the directory? If this is so, why does it not happen on example #4?

Sorry this is so long, I was trying to include as much relevant information as possible. I’ll be looking forward to everybody’s input.

Thanks for your time!
…drkstr

**edit**
corrected mistake with local IP in /etc/hosts file. The subdomain that refers to itself is set at the loopback addr, not the actual local IP. The same thing is true for the hosts file on the desktop as well:
Code:
127.0.0.1 dsk.domain.com dsk
192.168.0.101 srv.domain.com srv
I used to have it set as the actual IP of the network device but recently changed it to the loopback. I don't know if this is relevant though.
**edit**

Last edited by drkstr; 05-25-2006 at 08:41 PM.
 
  


Reply



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
Strange Apache Webserver Behavior AMarchini Linux - Networking 3 04-28-2005 10:49 AM
apache with strange behavior dimc Linux - Software 5 11-07-2004 03:58 PM
Very Strange Behavior raysr Mandriva 4 08-31-2004 02:06 PM
Strange Behavior andrewb758 Linux - Hardware 5 08-31-2003 02:42 PM
strange behavior abhijit Linux - General 3 07-09-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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