LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-18-2011, 03:27 PM   #1
Syllinger
LQ Newbie
 
Registered: Sep 2011
Posts: 22

Rep: Reputation: 1
Linux hostname winbind vs. DNS?


Hey folks,

So, I'm a bit confused here, so bear with me. My issue is that on my network I have a small home/office router/switch and it currently is set to provide DNS services.

My issue is that I although I can get Windows to resolve the hostname of my Ubuntu Server LTS 10.04 box, I can't get the Ubuntu server to resolve the Windows clients. Why is this the case?

I have a feeling that the nmbd process is advertising the NetBIOS name of the Linux server for Windows machines to resolve, but there is no way for Linux to resolve the NetBIOS names of the incoming clients. This forces me to use IP addresses instead of the client names.

I found an article that explained that the winbind package is needed for the Linux server to recognize NetBIOS names, but can this not be accomplished by setting my router as the primary DNS in the /etc/resolv.conf file? I added the IP address of the router to /etc/resolv.conf, but I still can't reach the client machine using its NetBIOS name even though it shows up on the client list provided by the router's DNS table.

What am I missing here?

Also, as a side note, is there a utility that opertates like the Windows Network Neighbourhood, whereby a Linux Server list all visible clients on the network? i.e. list all available hosts that it can connect to?

Thanks!

Last edited by Syllinger; 12-18-2011 at 03:28 PM.
 
Old 12-18-2011, 03:35 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Syllinger,

Appears that Ubuntu system is unaware about the DNS and thus it is not able to resolve name of your Windows system. Try the following:

1. Open up command prompt on Windows machine.
2. Type nslookup
3. Once you are in nslookup up type "server" without quotes. It should show you the IP or hostname of your DNS server.
4. Do the same on your Ubuntu machine. Open up terminal and get into nslookup.
5. Type server and it should show you the name or IP of your dns server.

If the IP or hostname of DNS server matches on both machines then something is wrong with DNS server because DNS should resolve the name.

If not, then your Ubuntu machine is totally unaware of DNS server and you have to configure its interface to use the DNS server which is used by your Windows machine.
 
Old 12-18-2011, 03:58 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by Syllinger View Post
Hey folks,

So, I'm a bit confused here, so bear with me. My issue is that on my network I have a small home/office router/switch and it currently is set to provide DNS services.

My issue is that I although I can get Windows to resolve the hostname of my Ubuntu Server LTS 10.04 box, I can't get the Ubuntu server to resolve the Windows clients. Why is this the case?

I have a feeling that the nmbd process is advertising the NetBIOS name of the Linux server for Windows machines to resolve, but there is no way for Linux to resolve the NetBIOS names of the incoming clients. This forces me to use IP addresses instead of the client names.

I found an article that explained that the winbind package is needed for the Linux server to recognize NetBIOS names, but can this not be accomplished by setting my router as the primary DNS in the /etc/resolv.conf file? I added the IP address of the router to /etc/resolv.conf, but I still can't reach the client machine using its NetBIOS name even though it shows up on the client list provided by the router's DNS table.

What am I missing here?

Also, as a side note, is there a utility that opertates like the Windows Network Neighbourhood, whereby a Linux Server list all visible clients on the network? i.e. list all available hosts that it can connect to?

Thanks!
Hard to answer w/o knowing the router, and what kind of set-up for DNS
it can handle. You need to understand first and foremost that DNS and
winbind are orthogonal to each other. Because windows wants (needs) to
be able to also reach machines via plain IP it is bound to do name-lookups
the good old-fashioned DNS way. The reverse is not true.

And just because your router has some knowledge of your windows
machines names (you sure it's a DNS table, not a DHCP one?) doesn't
necessarily mean that it passes these names on via DNS - again, I don't
know make or model of your router.

To make things "easy" (I know, that's a relative term ;}) you may want
to consider to make your Linux box a DNS & DHCP server for your internal
network.


Cheers,
Tink
 
Old 12-18-2011, 04:00 PM   #4
Syllinger
LQ Newbie
 
Registered: Sep 2011
Posts: 22

Original Poster
Rep: Reputation: 1
Hey T3RM1NVT0R, thanks for the reply.

I have two nameserver entries in /etc/resolv.conf, but the priority is the router which is 10.0.0.1. The only difference I see between the ouput is that on the Windows client this information is listed as:

Server: my.router
Address: 10.0.0.1

While on the Ubuntu Server the output is:

Default server: 10.0.0.1
Address: 10.0.0.1#53

It's the #53 part that's concerning me...I have never seen that.
 
Old 12-18-2011, 04:04 PM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Port 53 is the port DNS server uses. So that is normal.

If it shows the same server IP then both the systems are using the same DNS server.

Now perform the following test on both the machines:

1. Open up nslookup and type the following commands.
2. set debug
3. hostname (If doing from ubuntu type in Windows host name and if doing it from Windows type in ubuntu hostname)
4. Paste the output here. The output should contain the query being asked to DNS server and the reply it is giving.
 
Old 12-18-2011, 04:21 PM   #6
Syllinger
LQ Newbie
 
Registered: Sep 2011
Posts: 22

Original Poster
Rep: Reputation: 1
On Linux:

Name: rome
Address: 8.15.7.107
Name: rome
Address: 63.251.179.17


On Windows the request timed out.

I have a feeling that the router doesn't actually have DNS capability as I originally thought. Based on the IP that the Linux server produced it looks like it's forwarding the request to the ISP DNS server and simply acting as an intermediary.

I'm using the ASUS RT-N56U, and after reading a few posts, I don't believe it has DNS capability.

I may opt to do what Tinkster suggested, but I'll keep my router as the DHCP server and run DNS services on the Linux server. That said, I don't want to expose the server directly to the internet. If I were to use this approach, if the server can't find the hostname that is queried, will it not then query the ISP's DNS servers to see if it can fidn a match there?

I want to keep security as tight as possible.

My goal was to separate the entire network from the internet via the router. But it seems that may not be possible now.
 
Old 12-18-2011, 04:25 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Yes go with the tinkster's suggestion. If there are not many hosts in your network then you can use /etc/hosts file to populate hostnames.

Please mark the thread as solved if you think you got the solution to your query.

Last edited by T3RM1NVT0R; 12-18-2011 at 04:26 PM. Reason: Additional info
 
Old 12-19-2011, 08:12 AM   #8
agentbuzz
Member
 
Registered: Oct 2010
Location: Texas
Distribution: Debian, Ubuntu, CentOS, RHEL
Posts: 131

Rep: Reputation: 25
DNS queries to ISP

Quote:
I may opt to do what Tinkster suggested, but I'll keep my router as the DHCP server and run DNS services on the Linux server. That said, I don't want to expose the server directly to the internet. If I were to use this approach, if the server can't find the hostname that is queried, will it not then query the ISP's DNS servers to see if it can fidn a match there?
Syllinger,
Don't worry about your Linux box making recursive queries outbound to DNS servers; that's what DNS is supposed to do. If you have an ISP's gateway router installed, that probably firewalls incoming traffic except that which you have explicitly allowed. Unless you've poked a pinhole in the CPE router/firewall for DNS, Internet clients will not be able to get information about your internal address space. You can log into the web interface for the router and make sure.
 
Old 12-19-2011, 11:48 AM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by agentbuzz View Post
Syllinger,
Don't worry about your Linux box making recursive queries outbound to DNS servers; that's what DNS is supposed to do. If you have an ISP's gateway router installed, that probably firewalls incoming traffic except that which you have explicitly allowed. Unless you've poked a pinhole in the CPE router/firewall for DNS, Internet clients will not be able to get information about your internal address space. You can log into the web interface for the router and make sure.
His problem is that the windows machines on his LAN don't
resolve. His ISP won't help him much with that, neither will
DNS forwarding, or a pinhole. He needs to stand up DNS on
his Linux box, and that's that.


Cheers,
Tink

Last edited by Tinkster; 12-19-2011 at 11:50 AM.
 
  


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
Linux Hostname in Linux DNS List saigop Linux - Networking 4 06-09-2010 11:19 PM
Autoupdate of Hostname of Linux sevrer to internal DNS in LInux chandramani_yadav Linux - Server 2 10-21-2009 10:14 AM
hostname and dns settings blanker Linux - Networking 3 09-15-2007 01:55 PM
Linux Server Hostname/Dns name? Logarithim Slackware 1 05-21-2005 08:01 PM

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

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