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 11-10-2006, 02:50 PM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Rep: Reputation: 31
Question Opening port 137


I have being tring many commands to open this port for Samba:

iptables -A INPUT ip tcp --sport 137 -j ACCEPT
and
-A INPUT -p tcp -m tcp --dport 137:139 --syn -j ACCEPT
-A INPUT -p udp -m udp --dport 137:139 -j ACCEPT

This is how things look now:

root@XubuntuLab:/etc# netstat -plant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 4706/smbd
tcp 0 0 127.0.0.1:4236 0.0.0.0:* LISTEN 4185/hpiod
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4964/cupsd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 4706/smbd
tcp 0 0 127.0.0.1:4383 0.0.0.0:* LISTEN 4188/python
tcp 0 0 127.0.0.1:4236 127.0.0.1:1920 ESTABLISHED4185/hpiod
tcp 0 0 10.0.3.238:1424 10.0.1.25:9090 ESTABLISHED5227/firefox-bin
tcp 0 0 10.0.3.238:1421 10.0.1.25:9090 ESTABLISHED5227/firefox-bin
tcp 0 1 10.0.3.238:3814 66.98.242.116:80 SYN_SENT 4303/freshclam
tcp 0 0 127.0.0.1:1920 127.0.0.1:4236 ESTABLISHED4188/python
tcp6 0 0 :::22 :::* LISTEN 4724/sshd

According to Firestarter ports 139 137 445 are open, but I don't see port 137 open here and I cannot get Samba to work, I follow all the steps from http://samba.netfirms.com/. Here is more info when I use nmap:

PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds

I have spent a lot of time in this and I think I'm able to do it. Any help will be appreciated.
Thanks...
 
Old 11-10-2006, 03:01 PM   #2
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
You also got to make sure tht there's nothing thats blocking them to go out via OUTPUT chain as well. (after all every packet that traverse in will go OUT as well)

Can you post your complete script ?
 
Old 11-10-2006, 03:21 PM   #3
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Original Poster
Rep: Reputation: 31
This is my smb.conf file:

[global]
#Global Parameters
workgroup= LAB
netbios name=SAMBAtest
#security= SHARE
encrypt passwords= yes

[homes]
read only= no
browseable= no

[music]
path= /data/mp3
browseable= yes
public=yes
write list= xrgm,gts18,rguisbert

[everyone]
path= /data/everyone
read only= no
browseable= yes

[apps]
"smb.conf" 28L, 410C 1,1 Top

I'm sorry which script are you askin me about, I don't understand. Sorry I'm new to all this stuff. Thanks
 
Old 11-11-2006, 06:20 AM   #4
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by cucolin@
According to Firestarter ports 139 137 445 are open, but I don't see port 137 open here and I cannot get Samba to work, I follow all the steps from http://samba.netfirms.com/. Here is more info when I use nmap:

PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds
You know what; Your firestarter said it correct; you have 137 port open at your box, but you didnt checked it properly; as

with
Code:
nmap localhost -sU
you'll see that 137 is open but it uses UDP instead of TCP.

As 137 UDP port is being used by nmbd (for name registration & resolution) & it is open properly ; the problem you have had in your mind until now is not the actual reason for your samba misbehaviour.(if you were opening 137 port for such particular reason)

you can also check it with
Code:
lsof | grep netbios-ns
& you'll also get confirmed about its usage in association with nmbd.

Last edited by amitsharma_26; 11-11-2006 at 06:43 AM.
 
Old 11-13-2006, 11:51 AM   #5
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Original Poster
Rep: Reputation: 31
This is what I got when running the command: nmap localhost -sU

Starting Nmap 4.10 ( http://www.insecure.org/nmap/ ) at 2006-11-13 12:33 EST
Interesting ports on localhost (127.0.0.1):
Not shown: 1484 closed ports
PORT STATE SERVICE
68/udp open|filtered dhcpc
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm

For lsof | grep netbios-ns I did not get an output. Thanks for your help Amit, but at this point I don't know what to do!

Quote:
As 137 UDP port is being used by nmbd (for name registration & resolution) & it is open properly ; the problem you have had in your mind until now is not the actual reason for your samba misbehaviour.(if you were opening 137 port for such particular reason)
So what do you think is the problem here?? I'm confused! Thanks again!
 
Old 11-13-2006, 12:06 PM   #6
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by cucolin@
So what do you think is the problem here?? I'm confused! Thanks again!
Cucolin; Its your job to tell us the problem & ours to provide a solution to that.
Ok; jokes apart, look you havent told us about your problem yet; The only detail you have mentioned in your posts is tht you cannot get your samba to work// but you got to tell us it in more depth.

Like; Are your users able to see samba box in their network-neighborhood window or not ?
Like are they then further able to see samba-box shares or not ?
& then are they getting any problem in further traversing in these shares or somethin else ?
Or if your samba daemon is dying too early or not ?
Or are you getting any other message(errors) while starting your samba service ?
And you can refer your samba logs for further assitance; Please also post them with ya queries.
 
Old 11-13-2006, 02:11 PM   #7
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Original Poster
Rep: Reputation: 31
Amit sorry about all my confusion here. Ok, will answers the questions above:

1. Yes, users are able to see the Samba box in their network-neighborhood.
2. No, users are NOT able to see the samba-box shares.
3. About the samba deamon dying too early don't know how to tell about this!
4. Not getting any error messages while starting samba.
This is the error message that I get when I try to access the samba box from a WinXP pc:

\XubuntuLab is not accessible. You might not have permission to use this network resource.
Network path was not found.

Since I'm completely new to this, I followed all the steps at: http://samba.netfirms.com/

5. I don't know where the samba logs are located, it is at /var/log/samba I see a log.smbd and log.nmbd, but they are empty files. Please let me know.

Let me know if you need more info. and thanks for your help...
 
Old 08-06-2007, 01:09 AM   #8
UhhMaybe
Member
 
Registered: Jul 2004
Location: Salt Lake City, Utah
Distribution: Absolute 12.0 Studio 64 1.3.0
Posts: 470

Rep: Reputation: 30
Cool

http://www.tldp.org/HOWTO/Samba-Auth...way-HOWTO.html try here...Samba requires strict < interpreted as correctly adhered to directions> sequences and rules. Good luck. Suggestion...watch the passwords, they will stop any requests if not matched correctly in all file locations.
 
  


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
Opening Port steve007 Linux - Newbie 5 07-23-2005 01:05 PM
opening a port Robin01 Linux - General 3 11-17-2004 10:40 PM
Opening a Port gpamkenny Linux - Networking 3 11-04-2004 02:51 PM
Opening port 80 nmoog Linux - Newbie 4 02-01-2004 04:00 PM
TCP packets port 135,137,138,139 Gilion Linux - Networking 1 10-27-2003 09:11 AM

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

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