PDA

View Full Version : samba setup/port open


johnmont
2004-10-10, 17:27 PM
I'm trying to set up samba on my red hat server (Fedora Core1), but having problems connecting. My basic question is: Will the samba ports respond to a port scan? I want to find out if I have disabled the firewall correctly. I can't connect to the machine from another server.

The iptables section is:

ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-dgm
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ssn
ACCEPT udp -- anywhere anywhere state NEW udp dpt:microsoft-ds
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:microsoft-ds

The services are running:

smbd (pid 3898 3897) is running...
nmbd (pid 3902) is running...

Localhost check works:

#smbclient -L localhost

Domain=[SERVER1] OS=[Unix] Server=[Samba 3.0.7-2.FC1]

Sharename Type Comment
--------- ---- -------
myshare Disk temporary files


I can't figure out why it isn't working correctly externally. Turning the debug level to high, shows that the samba host machine is not getting any connections. Using smbclient on a remote machine at a high debug level, it seems as though I can't make connections to the samba host machine.

QT
2004-10-10, 20:17 PM
The ports samba needs are filtered to prevent worms and viruses from spreading through open Windows shares. If you really need samba, you'll need to change the ports or use a VPN between the servers.

canislupusyo
2004-10-10, 22:41 PM
i understand the blocked ports for security reasons but that puts a damper on things :(

htmlx
2004-10-10, 23:34 PM
Can't u setup samba over ssh?

A simple google search "samba ssh" turned up this link.

http://www.ibiblio.org/gferg/ldp/Samba-with-SSH/Samba-with-SSH.html


-Prashanth
htmlx.com

shutterstock
2004-11-03, 11:53 AM
Hmmm--- if you setup samba over SSH - does that mean that all SMB traffic goes through port 22? or does traffic go through the SMB port?

hmm
Jon

knightfoo
2004-11-04, 12:10 PM
The SMB traffic will travel over an out-of-band secure tunnel created by SSHD.

-knightfoo