Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

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

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
Old 06-05-2015, 01:39 AM   #2
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

hosts allow = 10.10.20.
Old 06-05-2015, 07:22 PM   #3
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, 08:25 PM   #4
Registered: Mar 2008
Posts: 19,423

Rep: Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998
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 08:26 PM.
Old 06-05-2015, 09:27 PM   #5
Registered: Mar 2015
Distribution: Linux Mint
Posts: 607

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

This will permit Products for 10.10.20.* and Customers for 10.10.21.
# /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 09:29 PM.
1 members found this post helpful.


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

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration