You can use TCP wrappers to limit subnet access via:
- /etc/hosts.allow - This file describes the names of the hosts which are allowed to use the local INET services, as decided by the /usr/sbin/tcpd server.
- /etc/hosts.deny - This file describes the names of the hosts which are NOT allowed to use the local INET services, as decided by the /usr/sbin/tcpd server.
smbd : 192.168.2.However, samba may or may not be built to support tcp wrappers.
hosts allow: Samba Configuration
Open your smb.conf file and add the following line to [share][share]
hosts allow = 192.168.2. 127.0.0.1
valid users: Samba Configuration
Open your smb.conf file and add the following line to [share][share]
valid users = user1 user2 @group1 @group2
read only & write only: Samba Configuration
You can also set read and write access to set of users with the read list and write list directives.[share]
read only = yes
write list = user1 user2 @group1 @group2
Examples
Make [sales] share read only but allow user tom and jerry to write it:[sales]You can also configure iptables to allow access to the Samba server.
comment = All Printers
path = /nas/fs/sales
read only = yes
write list = tom jerry
No comments:
Post a Comment