Can you limit a specific samba share to certain IPs?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Oh ok, so it's valid under both, but if you do it at the share level, you must do it for all then.
So say i have three shares, but I only do an allow hosts under two of them, does that mean the one without allow hosts is then wide open, or closed off to everyone due to the lack of allow hosts?
Explanation: Globally, there is no hosts_allow specified. So the default behavior is to allow all hosts. At the share level, 'shared' only allows 1.86 to connect to it and nothing else, but 'music' on the other hand inheritcs the global settings, which allows any ip to connect to it.
Last edited by szboardstretcher; 02-27-2014 at 09:10 AM.
Now if I can just figure out how to limit a specific share so it only shows/allows a certain total disk space, I'd be all set. Trying to tweak some existing servers but really not sure what's possible and what isn't yet. Really appreciate the help on this hosts allow thing.
I was afraid that was going to be the only answer. Was hoping there was a way to do it via samba config, since this is an existing server I'm hoping I don't need to reload.
Well the only other way I know how is by using quotas. Now, Samba doesn't directly know about these quotas, instead it is configured and handled in the user space by quotad. Its involved, and possibly complicated based on your linux level. But here is the first guide i found:
That might be a clever way to do it, force the mount to use a user that has a quote. I'll have to dig into it, but that's a pretty clever idea. thanks again!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.