LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-24-2010, 09:24 PM   #1
sudhirmhrj
LQ Newbie
 
Registered: Feb 2010
Location: Earth
Distribution: Centos, Redhat ENT
Posts: 23

Rep: Reputation: 0
Smile hosts allow paramerters


Hi all,


I was looking for a way to protect my samba server for limiting access to certain domains.

Can I use the parameter

hosts allow = example.com

or something like that or is there another way to do the job for domains

Thanks
Sudhir Mhrj
 
Old 11-24-2010, 10:41 PM   #2
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Lightbulb

Hi Sudhir,

Yes, you can use TCP Wrappers for this use.

You can write this in /etc/hosts.deny

Code:
smbd : .xyz.com
nmbd : .xyz.com
Here, I am denying access to xyz.com domain to use Samaba daemons, smbd and nmbd.

Try this, and get back if you face problems.
 
Old 11-25-2010, 12:05 AM   #3
sudhirmhrj
LQ Newbie
 
Registered: Feb 2010
Location: Earth
Distribution: Centos, Redhat ENT
Posts: 23

Original Poster
Rep: Reputation: 0
Thanks

Is there a way to limit using in smb.conf

Last edited by sudhirmhrj; 11-25-2010 at 12:07 AM.
 
Old 11-25-2010, 12:36 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Lightbulb

Quote:
Originally Posted by sudhirmhrj View Post
Thanks

Is there a way to limit using in smb.conf
Yes, you can do it with the hosts allow parameter in smb.conf

For example, in the below scenario all IPs starting from 192.168. can reach your samba shares.
Code:
hosts allow = 192.168. 127.0.0.1
But, I DO NOT think below configuration is permitted.
Code:
hosts allow = .example.com
Why don't you try and post your results here. Also, you can check syntax of your smb.conf as below
Code:
testparm /etc/samba/smb.conf

Last edited by vikas027; 11-25-2010 at 12:39 AM.
 
Old 11-26-2010, 08:20 PM   #5
sudhirmhrj
LQ Newbie
 
Registered: Feb 2010
Location: Earth
Distribution: Centos, Redhat ENT
Posts: 23

Original Poster
Rep: Reputation: 0
It works

Thanks A Lot
 
  


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
[SOLVED] dnsmasq: how to prevent upstream queries for hosts in /etc/hosts? catkin Linux - Networking 2 02-18-2013 10:50 AM
Script for hosts, numbers of hosts and users connected to squid server arunabh_biswas Programming 5 08-28-2010 04:11 AM
Verify /etc/hosts usage and round robin in /etc/hosts MikeyCarter Linux - Software 1 06-24-2008 12:20 PM
can't restrict sshd access through hosts.allow and hosts.deny but was working earlier farhan Linux - Security 4 04-18-2008 07:41 AM
./configure paramerters e1000 Linux - Software 8 10-19-2003 01:21 AM

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

All times are GMT -5. The time now is 11:43 PM.

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