PDA

View Full Version : [ubuntu] Help me secure Samba



choco140
March 12th, 2009, 01:05 PM
Hi,

I would like to secure my Samba share as much as I can and reduce access to local machine only (192.168.1.x).

Can somebody tell me what I need to do in order to do that properly (firewall, smb.conf, etc...)?

My idea is to try and lock Samba access as much as I can still leaving local users the ability to connect.

Thanks.

Nepherte
March 12th, 2009, 01:31 PM
Put this in your smb.conf file under [global]:

hosts allow = 192.168.1.0/24
hosts deny = 0.0.0.0/0

choco140
March 12th, 2009, 08:26 PM
Thanks.

Do you reckon that it would be safe enough?

Would you consider that I should also restrict the access through IPTables (not sure how to do that)?

Nepherte
March 12th, 2009, 11:02 PM
It should be sufficient enough. There's no reason to do exactly the same on more than one place. When you try to change something, you will have to make the change twice, kinda stupid if you ask me. You might also forget about one place.

choco140
March 13th, 2009, 07:21 AM
Thanks.