A network connection lets your computer communicate with the outside world, but it can also permit attackers in the outside world to reach into your computer and do damage. Therefore:
Decide whether the convenience of each Internet service is outweighed by its danger.
Know all of the services that your computer makes available on the network and remove or disable those that you think are too dangerous.
Pay specific attention to trap doors and Trojan horses that could compromise your internal network. For example, decide whether or not your users should be allowed to have .rhosts files. If you decide that they should not have such files, delete the files, rename the files, or modify your system software to disable the feature.
Educate your users to be suspicious of strangers on the network.
Bringing Up an Internet Server Machine Step by Step
Although every site is unique, you may find the following step-by-step list helpful in bringing up new servers as securely as possible. A much more detailed checlist is available from CERT at http://www.cert.org/tech_tips/unix_security_checklist2.0.html.
Remember: network servers are the portals through which the outside world accesses the information stored on your computer. By their design, many servers must run with root privileges. A bug or an intentional back door built into a server can therefore compromise the security of an entire computer, opening the system to any user of the network who is aware of the flaw. Even a relatively innocuous program can be the downfall of an entire computer. Flaws may remain in programs distributed by vendors for many years, only to be uncovered some time in the future.
Furthermore, many Unix network servers rely on IP numbers or hostnames to authenticate incoming network connections. This approach is fundamentally flawed, as neither the IP protocol nor DNS were designed to be resistant to attack. There have been many reports of computers that have fallen victim to successful IP spoofing attacks or DNS compromise.
Given these factors, you may wish to adopt one or more of the following strategies to protect your servers and data:
Disable all services that you are not sure you need, and put wrappers around the rest to log connections and restrict connectivity.
Use encryption to protect your data; if the data is stolen, it will do your attacker no good. Furthermore, making alterations in your data that you will not notice will be difficult, if not impossible.
Use DNSSEC to provide for DNS security.
Avoid using passwords and host-based authentication. Instead, rely on tokens, one-time passwords, and cryptographically secure communications.
Use a firewall to isolate your internal network from the outside world. Also use host-based firewalls on machines to isolate them from one another as well as to provide a second layer of protection.
Put servers on separate, highly secure machines to isolate failures and reduce exposure.
Create a second internal network for the most confidential information.
Disconnect your internal network from the outside world. Set up separate network workstations to allow people to access the Web, email, and other Internet services.