LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-17-2012, 10:24 AM   #16
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032

So your client can resolve a hostname if you specify the dns server. Are you sure that the dns settings are not changed somehow?
What happens if you don't give the dns IP?
Code:
nslookup www.vls.local
Maybe you need to flush your dns cache before running the nslookup command
 
Old 09-17-2012, 10:28 AM   #17
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
So your client can resolve a hostname if you specify the dns server. Are you sure that the dns settings are not changed somehow?
What happens if you don't give the dns IP?
Code:
nslookup www.vls.local
Maybe you need to flush your dns cache before running the nslookup command
i get the same result by running nslookup www.vls.local so it is resolving the hostname but still i can't do http or ftp on the win7 client. i always flush the dns on the win7 everytime i run nslookup..
 
Old 09-17-2012, 10:49 AM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
i get the same result by running nslookup www.vls.local so it is resolving the hostname but still i can't do http or ftp on the win7 client. i always flush the dns on the win7 everytime i run nslookup..
This doesn't make sense. If your client can resolve a hostname using your dns, then http, ftp or whatever should also resolve it.
Perhaps you have to configure a http vhost with a name of www.vls.local in your webserver running on 10.0.0.88.
 
Old 09-17-2012, 10:53 AM   #19
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
This doesn't make sense. If your client can resolve a hostname using your dns, then http, ftp or whatever should also resolve it.
Perhaps you have to configure a http vhost with a name of www.vls.local in your webserver running on 10.0.0.88.
i know it does not really make sense.. even using ftp doesn't work..

by the way..on the dns server i get no response using nslookup www.vls.local

is this ok?

Last edited by michibahn; 09-17-2012 at 10:54 AM.
 
Old 09-17-2012, 11:05 AM   #20
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
by the way..on the dns server i get no response using nslookup www.vls.local

is this ok?
Of course it's not ok. Run
Code:
dig www.vls.local
and post the complete output
 
Old 09-17-2012, 11:07 AM   #21
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Of course it's not ok. Run
Code:
dig www.vls.local
and post the complete output

[root@machine ~]# dig www.vls.local

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> www.vls.local
;; global options: +cmd
;; connection timed out; no servers could be reached
[root@machine ~]#
 
Old 09-17-2012, 11:31 AM   #22
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> www.vls.local
;; global options: +cmd
;; connection timed out; no servers could be reached
What's in /etc/resolv.conf? You may comment out the 2 "listen-on ...", so bind listens on all available interfaces (the default)
 
Old 09-17-2012, 11:42 AM   #23
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On the DNS server itself (since it is *NIX) you need to tell it what DNS servers to use in the /etc/resolv.conf and also tell it to use DNS in /etc/nsswitch.conf.

On the DNS server first type "lsof -i :53" and verify you see it LISTEN on that port on IP 127.0.0.1 (localhost).

Assuming that is the case you're /etc/resolv.conf should have (at least):
Code:
nameserver 127.0.0.1
Also assuming your domain is vls.local you could add a search path to /etc/resolv.conf:
Code:
search vls.local
nameserver 127.0.0.1
That way when you do a lookup you can specify the short name as opposed to the FQDN (e.g. "host www" or "nslookup www" would append vls.local so return the answer for www.vls.local). Note that this only has effect on the server itself and would NOT help your Windows 7 box.

/etc/nsswitch.conf may have a line like:
Code:
hosts:     db files nisplus nis dns
That tells it to first check a database then your local /etc/hosts, then nisplus, then nis and finally dns. If all you actually have is /etc/hosts and BIND you could simplify the line to do the following:
Code:
hosts:      files dns
No point in slowing things down to lookup things that aren't there.

However, going back to your original problem. It appears you are saying nslookup on the Windows 7 machine without specifying the server IS finding the correct IP for your web server. If this is the case then DNS is NOT your problem. It is the web server that is the problem. This would be a SEPARATE issue from DNS.

Rather than going into troubleshooting web here you should close this thread and open a new one because the configuration for web (e.g. apache/httpd) can be quite complicated in itself.

Also you now mention ftp. Having a web server on a host does not automatically grant ftp access to it so this also would be a SEPARATE issue. Here again you should think of opening a separate thread for just the ftp stuff.

That is to say on Linux you can have many different services/servers. BIND (DNS), HTTPD (Apache/Web) and FTPD are 3 different services and you should try to segregate your problems.

I'd recommend:
1) First verify DNS is working the way it should. It appears from the Windows 7 results you indicate that it is in fact so far as Windows 7 is concerned.
2) Once that is DONE. Open a new thread for the Web stuff. You can post a link back to this thread in the new one but set your new title for that.
3) Once this is DONE. open a new thread for the FTP stuff.

Not segregating the problem leads to confusion both on the part of those who are trying to help and on your part. It is also likely to lead folks to quit responding.
 
Old 09-17-2012, 12:32 PM   #24
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
resolv.conf
====
nameserver 127.0.0.1
search vls.local
====

nsswitch.conf
====
hosts: dns files
====

i just used the ftp example since i cannot do ftp as well bu if i use 10.0.0.88 i can access ftp and the web...

dig www.vls.local is now showing:



[root@machine ~]# dig www.vls.local

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> www.vls.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11185
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;www.vls.local. IN A

;; ANSWER SECTION:
www.vls.local. 86400 IN CNAME machine.vls.local.
machine.vls.local. 86400 IN A 10.0.0.88

;; AUTHORITY SECTION:
vls.local. 86400 IN NS ns1.vls.local.

;; ADDITIONAL SECTION:
ns1.vls.local. 86400 IN A 10.0.0.88

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Sep 17 13:16:40 2012
;; MSG SIZE rcvd: 103


but still i cannot access www.vls.local in the win7 desktop...

Last edited by michibahn; 09-17-2012 at 12:34 PM.
 
Old 09-17-2012, 01:02 PM   #25
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
if i use 10.0.0.88 i can access ftp and the web
So from the Windows 7 box in browser if you put "http://10.0.0.88" it goes to the correct web page?

From the Windows 7 box if you type "ftp 10.0.0.88" it lets you enter the login/password?

Notice in your dig output that www.vls.local is a CNAME to machine.vls.local and it is the A record for the latter that has the IP assignment. Given this I'm wondering what happens if you type "http://machine.vls.local" in browser or "ftp machine.vls.local" at command prompt.

For web setup you MUST allow each URL you want in the web configuration. That is to say even if you can get to http://10.0.0.88 it does NOT automatically mean you can get to http://www.vls.local or http://machine.vls.local even though they resolve to that IP. This is because the web server configuration itself determines what are acceptable URLs and what to do with them. This is why a single web server with a single IP address can do different things with different URLs.

For the ftp I wouldn't expect that to be an issue.

Again I urge you to open a new ticket specifically regarding your web setup. The people that responded to your DNS setup may or may not be able to assist you on the web setup.
 
Old 09-17-2012, 01:18 PM   #26
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
So from the Windows 7 box in browser if you put "http://10.0.0.88" it goes to the correct web page?

From the Windows 7 box if you type "ftp 10.0.0.88" it lets you enter the login/password?

Notice in your dig output that www.vls.local is a CNAME to machine.vls.local and it is the A record for the latter that has the IP assignment. Given this I'm wondering what happens if you type "http://machine.vls.local" in browser or "ftp machine.vls.local" at command prompt.

For web setup you MUST allow each URL you want in the web configuration. That is to say even if you can get to http://10.0.0.88 it does NOT automatically mean you can get to http://www.vls.local or http://machine.vls.local even though they resolve to that IP. This is because the web server configuration itself determines what are acceptable URLs and what to do with them. This is why a single web server with a single IP address can do different things with different URLs.

For the ftp I wouldn't expect that to be an issue.

Again I urge you to open a new ticket specifically regarding your web setup. The people that responded to your DNS setup may or may not be able to assist you on the web setup.
yes you are right. if i use http://10.0.0.88 the page comes out and if i use my ftp program (filezilla) and enter 10.0.0.88 i can access the ftp folder in the server. "http://machine.vls.local" in browser or "ftp machine.vls.local" at command prompt doesn't work at all..

in this case, the dns server is still not working right?

Last edited by michibahn; 09-17-2012 at 01:45 PM.
 
Old 09-17-2012, 01:47 PM   #27
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669


You need to go back and reread my last two posts.

Either you are NOT reading what I'm writing or you're deliberately being dense.

Again all DNS does is provide NAME to IP resolution. It has nothing to do with how Web pages or FTP work - it is ONLY used to get to the correct IP when you input names.

To reiterate:
If nslookup on the Windows 7 host is correctly equating the www with the IP you expect then DNS is NOT the problem!
 
Old 09-17-2012, 02:00 PM   #28
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post


You need to go back and reread my last two posts.

Either you are NOT reading what I'm writing or you're deliberately being dense.

Again all DNS does is provide NAME to IP resolution. It has nothing to do with how Web pages or FTP work - it is ONLY used to get to the correct IP when you input names.

To reiterate:
If nslookup on the Windows 7 host is correctly equating the www with the IP you expect then DNS is NOT the problem!
i've read all your post and it seems strange to me that even FTP doesn't work. i don't see any settings in any ftp server that you need to add a url to allow it to work.

i guess i found the problem.. i removed the secondary dns which is 10.0.0.1 in the win7 machine and left only the 10.0.0.88. i was able to ping now www.vls.local and access the http://www.vls.local as well as the ftp.

after doing the above, i needed to add a DNS2 entry in the eth0 interface of the dns server and put the 10.0.0.1 to have internet access.

thanks for all your help..

Last edited by michibahn; 09-17-2012 at 02:12 PM.
 
Old 09-17-2012, 03:58 PM   #29
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I'm glad you got it working but what you did to fix it means you must not have been providing accurate information about your results from nslookup without specifying server. If you'd gotten the answer you said it should have meant nothing was looking at the other DNS server.
 
Old 09-17-2012, 04:03 PM   #30
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
I'm glad you got it working but what you did to fix it means you must not have been providing accurate information about your results from nslookup without specifying server. If you'd gotten the answer you said it should have meant nothing was looking at the other DNS server.
Im not sure if i got it right. But i've provided all the results on every command that was requested me to run in this thread. May i know what was the info that i did not provide?

Last edited by michibahn; 09-17-2012 at 04:36 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
Please help complete setup DNS in centos 5.6 splinux Linux - Server 7 07-09-2011 02:40 PM
LXer: CentOS 4.6 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 01-10-2008 03:40 PM
LXer: CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 12-06-2007 03:21 PM
CentOS DNS fails on internal network (works on server) ucffool Linux - Networking 1 05-31-2007 02:36 PM
Setup Internal DNS Server loufeliz Linux - Networking 1 01-28-2005 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:34 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