LinuxQuestions.org
Help answer threads with 0 replies.
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 08-02-2004, 10:59 AM   #1
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Rep: Reputation: 15
Question Trouble with DNS


I just setup a Slackware email/web server and everything works perfectly except for when I try and access it over my internal lan from windows clients (I don't have any linux clients handy for testing). My problem is that when I type in the IP address for the web server (10.0.0.6) my browser immediately tries to pull up the hostname. I then have to remove the hostname from the address bar, and re-enter the hard IP address and it works.

EX.

http://10.0.0.6/email

becomes

http://susie.nles.local/email

in my browser's address bar.

If I try and access the server over the web from home, it looks for the susie.nles.local address as well.

Do you guys have any idea where I can go to fix this? Does it have something to do with /etc/hosts?

Here's a copy of my /etc/hosts:
Quote:
#
# hostsThis file describes a number of hostname-to-address
#mappings for the TCP/IP subsystem. It is mostly
#used at boot time, when no name servers are running.
#On small systems, this file can be used instead of a
#"named" name server. Just add the names, addresses
#and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1localhost
10.0.0.6susie.nles.local susie

# End of hosts.
I also cannot access the outside domain from within the internal network...I always have to use the hard IP address to access the server (i.e. www.mydomainname.com does not work internally, I have to use 10.0.0.6).

I have a DNS server internally (Win2k3 box), and all non-internal addresses are forwarded onto my ISP's DNS servers.

Any ideas?
 
Old 08-02-2004, 11:09 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
Any ideas?
Use a GNU/Linux DNS server instead of a windows one

More seriously, I would edit httpd.conf and set a virtual host for susie.nles.local then I would type http://susie.nles.local to access the web server.
 
Old 08-02-2004, 11:19 AM   #3
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
Heh, I'm happy with the Windows DNS so far, thanks anyway

If I set that up as a virtual domain would that cure my problems connecting from outside the network over the internet (i.e. users trying to view their email from home)?
 
Old 08-02-2004, 11:28 AM   #4
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
I have a couple questions.

when you access http://10.0.0.6/email are you saying that it automatically changes itself as you are typing it? or after you attempt to make the connection. If it is after you attempt to make the connection it very well may be that there is a script that is redirecting to the URL http://susie.nles.local/email.

___

127.0.0.1 localhost
10.0.0.6 susie.nles.local susie
___

The hosts file looks ok I'm not sure if the lack of a space between the address and the fqdn makes a difference in resolution but it still wouldn't cause the browser to redirect to the url.

something you may want to look at (depending on which web server you use) is what you have set as default pages in your httpd.conf file. Say for example if you set your default pages to files that are not available you may check to see if you have the error page redirecting to http://susie.nles.local/ or if you run virtual sites what your default site is. you may be getting pushed to http://susie.nles.local do to misconfiguration of a virtual site. There are several other reasons that can cause your problem.

More detail would help.
 
Old 08-02-2004, 11:38 AM   #5
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
when you access http://10.0.0.6/email are you saying that it automatically changes itself as you are typing it? or after you attempt to make the connection. If it is after you attempt to make the connection it very well may be that there is a script that is redirecting to the URL http://susie.nles.local/email.
It happens after I enter the address to make the connection (not automatically while I'm typing it into the browser address bar). I've tried it in multiple browsers, just in case (IE, Opera, etc.) it was the browser itself.

Quote:
The hosts file looks ok I'm not sure if the lack of a space between the address and the fqdn makes a difference in resolution but it still wouldn't cause the browser to redirect to the url.
Sorry about that, the spaces must've been removed during the copy/paste.

Quote:
something you may want to look at (depending on which web server you use) is what you have set as default pages in your httpd.conf file. Say for example if you set your default pages to files that are not available you may check to see if you have the error page redirecting to http://susie.nles.local/ or if you run virtual sites what your default site is. you may be getting pushed to http://susie.nles.local do to misconfiguration of a virtual site. There are several other reasons that can cause your problem.
Default (i.e. index pages) are set to index.html and index.php. Nothing else as far as I know. The apache version is whatever Slackware 10 comes with standard...I believe it's apache 1.3.31.

As for virtual sites, I have no mention of "susie.nles.local" in my httpd.conf file. The only place I can think of that has susie.nles.local is my /etc/hosts file, which I believe was placed there when I ran the "netconfig" program that comes with Slackware.
 
Old 08-02-2004, 11:47 AM   #6
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
The problem with that

The problem with that is that the client machines don't look at the host file on the server. They only know what DNS or the web server tells them. by accessing the ip address directly you bypass the DNS server all together. so I would stick with it being a configuration on the web server or a script on the web server. Is the address set to the FQDN in any directory that you navigate to on the webserver or only when you go to /email ?

___

about the clients having dns problems? could you explain that in a little more detail?
 
Old 08-02-2004, 12:40 PM   #7
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
about the clients having dns problems? could you explain that in a little more detail?
The client's "DNS problems" is this issue of not being able to use the internal hostname to connect to the machine properly (susie.nles.local [internal], nles.k12.wi.us [external]). The only way I can connect to the machine with an internet browser is by using the IP address...and even then it makes an annoying change (as I mentioned at the top of this thread). Sorry if I'm not explaining things well enough, I'm new to DNS as a whole.

I just tried pinging susie.nles.local and susie from my Windows 2k3 server and it was unable to ping the Slackware server.

Quote:
Is the address set to the FQDN in any directory that you navigate to on the webserver or only when you go to /email ?
I'm afraid I don't understand "FQDN".
 
Old 08-02-2004, 12:44 PM   #8
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
I just checked /etc/resolv.conf, don't know if it will have an impact on my issue but it's content's read:

Quote:
search nles.local
nameserver 10.0.0.3
10.0.0.3 is the ip of the Windows 2003 DNS server.
 
Old 08-02-2004, 01:31 PM   #9
binidiot
Member
 
Registered: May 2004
Location: Spain
Distribution: Debian Woody, FreeBSD 5.2.1
Posts: 106

Rep: Reputation: 15
Whew. resolv.conf is perfect. That lets your linux query net thru the windows server. This mail thing is wierd. What webmail server are you using and could it be that it is configure with the name as host __
 
Old 08-02-2004, 01:39 PM   #10
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
the resolv.conf should not affect your issue.


FQDN = Fully Qualified Domain Name

By going to the page I can see right away that a lot of your problems are in the web coding.

coding like HREF="http://10.0.0.6/templates/CleanBlue/template.css"

form name="search" method="post" action="http://10.0.0.6/results.php">

<a href="http://www.dotwidget.com"><img src="http://10.0.0.6/images/widget_cms_pow12

Is not going to work on your external site.

perhaps you should consider recoding your links so that they are relative to the document.

so they work from either address.

for example HREF="http://10.0.0.6/templates/CleanBlue/template.css"
would be HREF="./templates/CleanBlue/template.css" and it will work from either address.

long story short, it looks like everything is working properly your dns is correct but I'm going to come down on it being rooted in the web page and the scripts on it.

I'm betting it's just a simple combination of a dns header issue in the httpd.conf file and page coding that needs fixed.

the first part of the problem I can't help with without having a better idea what is in the httpd.conf file and the second is not your primary problem

the site does not allow me to download images from the site while using the fqdn that tells me that it is not setup properly on the web server and because I can do an nslookup and it is resolving properly {205.213.115.2} I would not keep looking at it as a dns problem.

Last edited by BrianWGray; 08-02-2004 at 01:48 PM.
 
Old 08-02-2004, 01:41 PM   #11
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
I'm running Hivemail 1.2.2 (stable) for the webmail client. Mail server is the latest version of Qmail, though I have no problems sending/receiving mail.

Under Hivemail options I have program location set to: http://nles.k12.wi.us/mail

That would be about the only thing I can think of for server address specific settings (other than SMTP, but those are just fine as I just mentioned).

Yeah, I know what you mean about weird. This all seems really odd to me too, but I suppose I can look at it from the standpoint that I'm learning DNS like crazy here.
 
Old 08-02-2004, 01:47 PM   #12
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
Could it be possible that my gateway might be screwing everything up? It runs the NAT for the internal network...
 
Old 08-02-2004, 02:00 PM   #13
binidiot
Member
 
Registered: May 2004
Location: Spain
Distribution: Debian Woody, FreeBSD 5.2.1
Posts: 106

Rep: Reputation: 15
So when you hit the http server with the localhost IP/mail it is told to look for http://nles.k12.wi.us/mail ?? and that resolves into 10.0.0.6 then into the localhost name ... hhmmm the mail client is not guilty ... there must be reverse ns lookup involved ... now where's that at ?? I can't remember.
 
Old 08-02-2004, 02:01 PM   #14
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
I doubt it.

As long as the site is resolving 205.213.115.2 which it is and the site works with http://205.213.115.2/mail then it's not the dns.
 
Old 08-02-2004, 02:03 PM   #15
technician
Member
 
Registered: Jul 2003
Location: Wisconsin
Distribution: Slackware 10
Posts: 50

Original Poster
Rep: Reputation: 15
Ah ha...making some progress. I went into my gateway's hosts file and setup 10.0.0.6 susie.nles.local. Now it works just fine. I hope my gateway isn't running DNS as well (two DNS servers on a 150+ node network is way too much IMO).

I guess I just need to find out why I can't access "nles.k12.wi.us" addresses from inside the network (that's the web server's domain name that is accessable from the web).
 
  


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
DHCP / DNS Trouble gkurts Linux - Networking 3 06-29-2009 04:37 AM
dns trouble isales Linux - Networking 6 10-22-2004 02:31 AM
trouble with DNS/Network vr6stress Linux - Networking 2 07-08-2004 08:01 AM
DNS trouble pmh6310 Linux - Newbie 2 06-12-2003 12:13 PM
DNS trouble MojoLuv Linux - Networking 2 05-06-2003 08:17 PM

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

All times are GMT -5. The time now is 11:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration