LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-01-2004, 02:08 AM   #1
theserge
LQ Newbie
 
Registered: Aug 2003
Location: Stinky Philly
Distribution: RedHat9
Posts: 10

Rep: Reputation: 0
NetBIOS lookup not working with nmblookup


I have not been using Samba for very long, so forgive me in advance:

I am trying to connect via smbclient to a computer that is on the network (different subnet). I have tried using nmblookup to get the IP address without any luck. I should be getting the WINS server with DHCP, right? In any case, that does not work.

However, when I hop onto the neighboring Windows 2000 machine, I can get the IP address simply by pinging the NetBIOS name of the machine I am looking for.

My question is:ame on the linux machine? And if I need a specific WINS server, how can I find out its IP address?


As far as I can make out, if I can find do it on the Windows machine, I should be able to do it on the Linux machine... right?

Thank you very much!
 
Old 01-07-2005, 12:50 PM   #2
greenish
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
I guess you're having the same problem. With Fedora Core 3, if I type:

nmblookup gimmeyourip

I get :

querying gimmeyourip on 192.168.0.255
name_query failed to find name gimmeyourip

At first, I tried to use system-config-security tool to open ports I suspected to be involved: UDP and TCP ports 137, 138 and 139, but everthing failed.

The inspection of packets on the interface with ethereal led me to the conclusion that the rules added to iptables by the Red Hat firewall is blocking the UDP answer from gimmeyourip. I fixed the problem by inserting the following rule at the top of the RH-Firewall-1-INPUT iptables chain. The source address range is restricted to the 192.168.0.x subnet.

/usr/sbin/iptables -I RH-Firewall-1-INPUT -p udp -s 192.168.0.0/24 -j ACCEPT

The port in question is in the 32000 range. I have to warn that I don't know much about iptables and Samba. Somebody with a better knowledge should tighten the rule above with a restricted range by using the switch --dport start_port:stop_port. Maybe there is also a way to set up a rule that links the initial request which is made I believe on port UDP 137.
 
Old 01-07-2005, 12:56 PM   #3
greenish
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
And of course, if you want this rule to persist after you reboot the machine, you have to issue:

/sbin/service iptables save
 
Old 01-08-2005, 11:17 AM   #4
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
From a routing standpoint the issue is the broadcast. You say that the other computer is on another subnet. As for WINS under Linux, I haven't a clue how that would work. I would just simply create an entry in my /etc/hosts file for the other computer. That should sove your name resolution problem, but not the WINS issue.

Wow, that was kind of a Microsoft fix... wasn't it. ;o)

Cheers!

MrKnisely
 
Old 01-09-2005, 06:35 AM   #5
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
You will not get the WINS server in Linux via DHCP. You'll need to make the setting manually in your smb.conf file with the line:

wins server = ipaddress

Use the ip address of a WINS serve on your network. After you make the change, be sure to restart Samba.

If you don't know what the address of a WINS server is on your network, execute ipconfig /all from a command line on the Win2k machine. The WINS servers assigned to that machine will be listed in the output.
 
  


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
Traceroute, Ping, Domain Name Server (DNS) Lookup, WHOIS, and DNS Records Lookup netoknet General 1 05-09-2005 03:43 AM
DNS lookup not working with ICS and mandrake10 jasybee2000 Linux - Networking 1 01-05-2005 02:25 PM
nmblookup ? Menestrel Linux - Networking 5 05-22-2004 03:55 AM
My Samba Netbios Name Server is not working ViroMan Linux - Networking 9 04-25-2004 10:52 PM
Host name lookup not working in 2.6 kernel ewildgoose Linux - Networking 0 08-03-2003 05:11 AM

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

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