LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-21-2004, 04:44 AM   #16
BillJennings
Member
 
Registered: Oct 2004
Location: Big River, California, USA
Distribution: Debian
Posts: 48

Rep: Reputation: 15

I have recently found a problem with Windows XP connecting to a Samba server when the Windows XP box has Service Pack 2 installed.

Did you do the backup with Windows XP SP1 or an earlier version of windows? ... and are you now trying to do the restore with Window XP with SP2 isntalled?

If so, here is what I found to be the problem on one of my servers. Service Pack 2 breaks Windows XP's ability to read files from Samba shares until you add:

use sendfile = no

to the global section of smb.conf.

Hope this helps.

Bill Jennings
 
Old 10-21-2004, 07:42 AM   #17
DertyolBA$HTARD
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86

Rep: Reputation: 15
Very Interesting, indeed.
 
Old 10-21-2004, 01:56 PM   #18
Pengus
LQ Newbie
 
Registered: Oct 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Well I fixed it. Seems that I don't need any advanced Samba config at all, I just needed to stop iptables, as it was blocking this computer from connecting at all. Thought /etc/hosts.allow 'ALL: 192.168.2.31' would work, but I guess iptables still blocked.


Instead of using /sbin/service iptables stop, is there an entry I can add to allow local network Samba connections? I've no idea how to begin messing with iptables at this point. The good thing is that I do have a router that handles security pretty well, except for a few forwarded ports to allow ssh and httpd when needed.

Thanks.
 
Old 10-21-2004, 02:34 PM   #19
BillJennings
Member
 
Registered: Oct 2004
Location: Big River, California, USA
Distribution: Debian
Posts: 48

Rep: Reputation: 15
If you know the network and netmask of your subnet you can type this as root:

iptables -I INPUT -s <your_subnet_CIDR_goes_here> -j ACCEPT

This will allow any computer on your local subnet access to this server. Not just for Samba, but for all services. If you want to only allow Samba services you need to indicate the protocol (tcp or udp) and list the ports.

My recollection is that Samba listens on (both tcp and udp, so you will need two rules) ports 137, 138, 139, and 445.

So...

Code:
iptables -I INPUT -s <your_subnet_CIDR> -p tcp --dport 137:139 -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p tcp --dport 445     -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p udp --dport 137:139 -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p ucp --dport 445     -j ACCEPT
Explanation:

"-I INPUT" means this rule is to be Inserted at the head of the rules controling INcoming packets destined for this machine
"-s <your_subnet_CIDR>" indicates packets with Source address inside your subnet
"-p tcp" means check the Protocol for TCP
"--dport 137:139" means check for Destination PORT 137 through 139
"-j ACCEPT" indicates what to do with packets meeting the above qualifications

Hope this helps.

Sincerely
Bill Jennings
 
  


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
Is it possible to log onto your home linux box from another machine running linux?! Gormless Linux - General 7 10-26-2004 10:27 PM
Connect two Linux box without samba melinda_sayang Linux - Newbie 6 08-02-2004 08:44 PM
linux box as samba client? luap Linux - Networking 3 03-12-2003 09:15 AM
Linux box - Windows box =Samba? hbidad Linux - Software 7 02-10-2003 10:00 PM
Can't see linux box running Samba from Windows machine RBLynch Linux - Newbie 2 03-21-2002 07:59 PM

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

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