LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-26-2010, 02:30 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,208

Rep: Reputation: Disabled
Question "Hosts allow" in Samba


If I set:
Code:
hosts allow = 192.168.0.5 192.168.0.8
then only PCs with IP addresses 192.168.0.5 and 192.168.0.8 will be able to enter shared dir? And noone else? And if there's no "hosts allow" in config of Samba, Samba doesn't filter IPs? Is it correct?
 
Old 09-26-2010, 02:46 AM   #2
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,208

Original Poster
Rep: Reputation: Disabled
And is it good for security to add
hosts deny = all
before
hosts allow ...
?
 
Old 09-26-2010, 10:17 AM   #3
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, SolydX, Salix64
Posts: 74

Rep: Reputation: 6
Yes to both. You should also add 'localhost' to the hosts.allow section, otherwise you will get some strange error messages.

Paul.
 
Old 09-26-2010, 11:33 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,208

Original Poster
Rep: Reputation: Disabled
Paul, thanks, but your answer is not clear. "Yes" to both what? Can you point it out please?

Last edited by Mr. Alex; 09-26-2010 at 11:34 AM.
 
Old 09-27-2010, 08:33 PM   #5
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, SolydX, Salix64
Posts: 74

Rep: Reputation: 6
Quote:
Originally Posted by Mr. Alex View Post
Paul, thanks, but your answer is not clear. "Yes" to both what? Can you point it out please?
Sorry. You should use both the hosts.deny and hosts.allow section of /etc/samba/smb.conf. In addition to the IP addresses that you specify for hosts.allow, you also need to add localhost, otherwise there will be errors.

Hope that is clearer.

Paul.
 
1 members found this post helpful.
Old 09-28-2010, 07:52 AM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,208

Original Poster
Rep: Reputation: Disabled
Much better now. Thanks. Will use it.
 
  


Reply

Tags
samba config allow hosts


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
Hostname defined in file "network" changes after change to file "hosts" qwkfish Linux - Networking 2 10-14-2009 05:07 PM
What is the difference between "/etc/hosts.equiv" AND ".rhosts" ? kcarun Solaris / OpenSolaris 15 08-07-2009 12:46 AM
samba does not create "samba/netlogon" and "samba/profiles" mianmajidali Linux - Server 0 04-27-2008 06:07 AM
Post Ubuntu Installation Error "No serving hosts found" Fouad Riaz Bajwa Linux - Laptop and Netbook 1 12-28-2006 09:29 PM
"hosts allow" in smb.conf expects only FQDN, not alias or netbios name!? Not now, John! Linux - Networking 1 10-13-2006 06:17 AM


All times are GMT -5. The time now is 02:18 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration