LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-30-2006, 02:31 PM   #1
gatsby
Member
 
Registered: Jan 2006
Posts: 59

Rep: Reputation: 16
Securing Samba?


Hi all -

I am setting up Samba 3.x on a Red Hat Linux box to share some files between a few friends. The sharing itself works fine, and I'd be interested to hear if anyone has any experience with or thoughts on securing Samba.

In smb.conf (the samba config file), I have restricted access to my samba shares for only those IP addresses on the same subnet at the machine itself. Samba is set to 'user' security mode. Also, I've set hosts deny to deny everyone by default, so I specifically allow those I want. The shares themselves require a password to access.

IPTables also allows only those on my subnet to connect to the Samba ports. The tables' default policy is to drop everything. I am using TCP wrappers (though I don't think samba is affected by this). BitDefender is my anti-virus software. I've been thinking of putting Snort on...it seems pretty cool.

If anything comes to mind, let me know. I would just like to be sure before turning my friends lose. Thanks in advance.
 
Old 01-30-2006, 05:01 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Normally I don't recommend running Samba exposed to the internet at all. It's not really a hardened service and isn't designed with a security-centric mindset. Running it inside of a trusted network behind a firewall is a little different story.

That being said, it will help minimize risk if you can limit access to a small subnet of IPs using iptables. Unfortunately remote users often have dynamic IP addresses from their ISP which can fluctuate frequently, making ip-based access control challenging. There also is the option of setting up a VPN which the users must authenticate to before accessing the Samba shares. That is a bit of work to get working, especially if you are unexperienced with VPN. Setting up a simple samba-over-ssh tunnel might be easier.

If you just need to share files, why not use ftp?

Last edited by Capt_Caveman; 01-30-2006 at 05:02 PM.
 
Old 01-30-2006, 08:02 PM   #3
gatsby
Member
 
Registered: Jan 2006
Posts: 59

Original Poster
Rep: Reputation: 16
thanks for the reply. as for ftp, in another situation that would work fine for me. this time, though, i need the seamless file sharing that samba provides to windows.

Quote:
Running it inside of a trusted network behind a firewall is a little different story.
sorry, i should have mentioned that. there is a larger trusted network which this samba server would be connected to (it isn't stand-alone in the wild). rather, it would be an additional machine in a trusted network. according to our head IT people, they shield those samba ports and several others from being connected to from the internet. i hope that fact improves the situation a little...

Last edited by gatsby; 01-30-2006 at 08:05 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Securing new samba server Hans Zilles Linux - Security 1 11-08-2005 06:40 PM
Securing Konqueror ice_hockey Linux - Security 1 06-25-2005 06:04 PM
Securing A directory? Spreegem Debian 3 04-04-2005 09:49 PM
Securing Slackware 8.1 Tekime Slackware 9 02-21-2004 09:27 PM
Securing slackware 9.0 ematrixxx Linux - Security 1 08-27-2003 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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