How to increase the security of NFS kernel server?
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Here are some quick examples of what you could add to your /etc/exports
For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255
* /files 192.168.1.0/24(rw,no_root_squash,async)
it means that if sbdy arrives with a linux machine, puts the ethernet cable into the router, then logs as root on his machine, and mount the exports. He can do almost everythg, with permissions chmod'ing ...
is that LAMP, or i am wrong for nfs kernel servers, the ultimate users/password servers against that to prevent those physical approches /logins?is there good how to ?
no_root_squash would be very unusual, I'd recommend root_squash (the default iirc).
That leading '*' looks wrong too; usually you start with the dir to be exported (this is on the server) then space, then network or ip to export to, then options in parentheses.
See http://www.linuxtopia.org/online_boo...g-exports.html
no_root_squash would be very unusual, I'd recommend root_squash (the default iirc).
That leading '*' looks wrong too; usually you start with the dir to be exported (this is on the server) then space, then network or ip to export to, then options in parentheses.
See http://www.linuxtopia.org/online_boo...g-exports.html
wow cool, an expert!
I think that I found this configuration on the board of ubuntu forum or wiki hmmm
I study your link, and come back with my progresses. Certainly on thursday.
I was thinking, about possible security hole, if it is the case.
So, let's take the example. One has an informatic linux ssh debian lenny server daemon running (simply, SSH). By default, you have the port tunneling possible, which means port 2049 for nfs sharing. The guy logins (or the woman, because there is too women that have linux. Well, I dont know any but ok, let's imagine) to your machine, running ssh daemon, with the very famous putty. This bright head, endlessly curiously gready for experimenting and discovering new things, forward with tunneling the ssh connection, using putty. He (or she) figures out to try mount, with an external machine ; let's call it Leathal-Intruder.
Unfortunately, the basic linux admin. newbie is not capable to have a Lamp server with a main and unique login/passwd for samba and nfs, and whatever exists for sharing. Since it's his own machine, he has the root pwd. (he, the Lethal-Intruder ; or actually, both, because they are admins. Well, he could be a she, or both...) That's because it can be a bit complicated, and those shall require time and bit of practice with Linux. So, this sort of mini hacker, as called Lethal-Intruder, has his tunneling to the nfs 2049, which is open. The admin command "su", ran from the intruder, followed by a "mount", gets the same exposure as a machine on the network. He mounts with root#, done. I am sure I have it wrong, and it exists security about it in Linux. But let's bet you a bier, how many have such security with their nfs? I bet you that 70 percent of Linuxers (let's call it like that ; btw is there a name? ) have a nfs configured without those security "abilities"
Like I said, I'm pretty sure root_squash is the default at install. Most people would probably leave it at that, in fact I'm sure I've seen qns at LQ where its been discussed.
There are various ways you can tighten down NFS. That link shows you how to lock down the other ports used by the helper tools (eg mount, lock, portmap etc).
Note also that in nfsv4, all that functionality has been encapsulated in the nfs server sw, so only one daemon (nfs) is reqd,
See also tcp_wrappers & iptables.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.