LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2015, 12:28 AM   #1
feizaguirre
LQ Newbie
 
Registered: Jun 2015
Posts: 1

Rep: Reputation: Disabled
Smile restrict file share access to only certain LAN IP addresses?


Hello
I have a few folders that I would like allow only access to certain ip schema
like for example
-folder "Products" allow access only to 10.10.20.x
-folder "Customers" allow access only to 10.10.21.x

Can this be dome using Samba?

machines connecting are windows machine from different networks coming true vpn

Thank you
-Fred
 
Old 06-05-2015, 12:39 AM   #2
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
I remember there is something like this in smb.conf

[Products]
hosts allow = 10.10.20.
 
Old 06-05-2015, 06:22 PM   #3
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Personally I am thinking to control that by assigning the users into groups and using chmod for access control. What you are describing by designating by address was how the Internet got invented in the first place. The router was first invented by hackers.
 
Old 06-05-2015, 07:25 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
Might have to go well beyond and create self signed certificates and give them to the trusted members.

Lan ip if static may be possible on a very simple lan. It isn't a great way to secure a system.

Last edited by jefro; 06-05-2015 at 07:26 PM.
 
Old 06-05-2015, 08:27 PM   #5
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
This is something NFS does very easily.

This will permit Products for 10.10.20.* and Customers for 10.10.21.
Code:
# /etc/exports file
/directory1/Products 10.10.20.(ro,sync,no_subtree_check,other_options)
/directory2/Customers 10.10.21.(rw,sync,subtree_check)
Security-wise, this isn't very secure however since a lan address can be spoofed.

Last edited by Sefyir; 06-05-2015 at 08:29 PM.
 
1 members found this post helpful.
  


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
Internet Gateway Bandwidth monitor, restrict IP addresses in LAN mrkagz Linux - Networking 2 10-28-2007 03:05 AM
restrict Samba access to only certain LAN IP addresses? dgr Red Hat 3 08-07-2007 10:00 AM
Restrict access times for specific IP addresses? gjhicks Linux - Networking 11 11-02-2006 10:42 PM
How to restrict website access in a LAN? mummrra Linux - Networking 3 12-05-2003 01:56 PM
How do I restrict ssh access to certain ip addresses? 360 Linux - Networking 5 04-05-2002 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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