Download Users Manual - Physics, Computer Science and Engineering

Transcript
Chapter 11. Security Under GNU/Linux
If you must use NFS, make sure you export to only those computers that you really need to. Never export
your entire root directory; export only directories you need to export.
See the NFS HOWTO for more information on NFS, available at LDP (http://www.ibiblio.org/mdw/HOWTO/
NFS-HOWTO/)
11.8.10. NIS (Network Information Service)
Network Information Service (formerly YP) is a means of distributing information to a group of computers.
The NIS master holds the information tables and converts them into NIS map files. These maps are then
served over the network, allowing NIS client computers to get login, password, home directory and shell
information (all the information in a standard /etc/passwd file). This allows users to change their password
once and have it take effect on all the computers in the NIS domain.
NIS is not at all secure. It was never meant to be. It was meant to be handy and useful. Anyone that can guess
the name of your NIS domain (anywhere on the net) can get a copy of your passwd file, and use crack and
John the Ripper against your users’ passwords. Also, it is possible to spoof NIS and do all sorts of nasty
tricks. If you must use NIS, make sure you are aware of the dangers.
There is a much more secure replacement for NIS, called NIS+ . Check out the NIS HOWTO for more information:
NIS-HOWTO (http://www.ibiblio.org/mdw/HOWTO/NIS-HOWTO/)
11.8.11. Firewalls
Firewalls are a means of controlling what information is allowed into and out of your local network. Typically
the firewall host is connected to the Internet and your local LAN, and the only access from your LAN to the
Internet is through the firewall. This way the firewall can control what passes back and forth from the Internet
and your LAN.
There are a number of types of firewalls and methods of setting them up. GNU/Linux computers make pretty
good firewalls. Firewall code can be built right into 2.0 and higher kernels. The user-space tools ipchains for
2.2 kernels, and iptables for 2.4 kernels, allows you to change, on the fly, the types of network traffic you
allow. You can also log particular types of network traffic.
Firewalls are a very useful and important technique in securing your network. However, never think that because you have a firewall, you don’t need to secure the computers behind it. This is a fatal mistake. Check
out the very good Firewall-HOWTO at your latest metalab archive for more information on firewalls and
GNU/Linux . Firewall-HOWTO (http://www.ibiblio.org/mdw/HOWTO/Firewall-HOWTO.html)
If you have no experience with firewalls, and plan to set up one for more than just a simple security policy, the
Firewalls book by O’Reilly and Associates or other online firewall document is mandatory reading. Check out
O’Reilly site (http://www.ora.com) for more information. The National Institute of Standards and Technology
have put together an excellent document on firewalls. Although dated 1995, it is still quite good. You can find
it at nist.gov (http://cs-www.ncsl.nist.gov/publications/nistpubs/800-10/main.html). Also of interest
includes:
•
The Freefire Project -- a list of freely-available firewall tools, available at freefire (http://sites.inka.de/
sites/lina/freefire-l/index_en.html)
•
Mason -- the automated firewall builder for GNU/Linux . This is a firewall script that learns as you do the things
you need to do on your network! More info at: mason (http://www.pobox.com/~wstearns/mason/)
11.8.12. IP Chains – GNU/Linux Kernel 2.2.x Firewalling
GNU/Linux IP Firewalling Chains is an update to the 2.0 GNU/Linux firewalling code for the 2.2 kernel. It has
many more features than previous implementations, including:
•
More flexible packet manipulations
•
More complex accounting
162