How can I prevent a certain IP from the LAN to connect to Samba
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I prevent a certain IP from the LAN to connect to Samba
Hello everybody!
I would like to block an IP address from having access to my shared files,
Could someone tell me the line I have to put to the smb.conf in order to prevent a computer with a certain IP to connect to samba and have access t my shared files?
Restart Samba. Don't forget to change the varibles that are in mine to suit your needs. Also make sure that you create the samba users on the server in order to get the user based security to work.
Sorry if I wasn't that detailed on what these do. But here you go.
****************************************************
This will make it so in order to connect to the Samba server, it will prompt you for a username and password.
****************************************************
Under [global]
find security and change it to;
security = user
*************************************************
This will tell samba to direct the user to their home directory.
*************************************************
then go down to Share Definitions and insert this;
[homes]
comment = Home Directories
browseable = no
writable = yes
[Profiles]
path = /%G/%U/.profile
writable = yes
browseable = no
guest ok = yes
directory mask = 0755
create mask = 0755
read only = no
**************************************************
This will add additional share directories and also you can say which user cann access this directory.
*************************************************
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.