07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

perfectly correct, the clients do authenticate with the anonymous username; the password is<br />

often, by convention, the user's email address, but the server ignores it.<br />

Many FTP servers are available in Debian (ftpd, proftpd, wu-ftpd and so on). The Falcot Corp<br />

administrators picked vsftpd because they only use the FTP server to distribute a few files (including<br />

a Debian package repository); since they don't need advanced features, they chose to<br />

focus on the security aspects.<br />

Installing the package creates an p system user. This account is always used for anonymous<br />

FTP connections, and its home directory (/home/ftp/) is the root of the tree made available<br />

to users connecting to this service. The default configuration (in /etc/vsftpd.conf) is very<br />

restrictive: it only allows read-only anonymous access (since the write_enable and anon_uplo<br />

ad_enable options are disabled), and local users cannot connect with their usual username and<br />

password and access their own files (local_enable option). However, this default configuration<br />

is well-suited to the needs at Falcot Corp.<br />

11.4. NFS File Server<br />

NFS (Network File System) is a protocol allowing remote access to a filesystem through the network.<br />

All Unix systems can work with this protocol; when Windows systems are involved,<br />

Samba must be used instead.<br />

NFS is a very useful tool, but its shortcomings must be kept in mind especially where security<br />

matters are concerned: all data goes over the network in the clear (a sniffer can intercept it); the<br />

server enforces access restrictions based on the client's IP address (which can be spoofed); and<br />

finally, when a client machine is granted access to a misconfigured NFS share, the client's root<br />

user can access all the files on the share (even those belonging to other users) since the server<br />

trusts the username it receives from the client (this is a historical limitation of the protocol).<br />

DOCUMENTATION<br />

NFS HOWTO<br />

The NFS HOWTO is full of interesting information, including methods for<br />

optimizing performance. It also describes a way to secure NFS transfers with<br />

an SSH tunnel; however, that technique precludes the use of lockd).<br />

➨ http://nfs.sourceforge.net/nfs-howto/<br />

11.4.1. Securing NFS<br />

Since NFS trusts the information it receives from the network, it is vital to ensure that only the<br />

machines allowed to use it can connect to the various required RPC servers. The firewall must<br />

also block IP spoofing so as to prevent an outside machine from acting as an inside one, and access<br />

to the appropriate ports must be restricted to the machines meant to access the NFS shares.<br />

BACK TO BASICS<br />

RPC<br />

RPC (Remote Procedure Call) is a Unix standard for remote services. NFS is<br />

one such service.<br />

276 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!