Author: sparks
Update of /cvs/fedora/web/html/docs/security-guide/en_US
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8959
Added Files:
Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html
Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html
Security_Guide-Encryption-Data_in_Motion.html
Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html
We_Need_Feedback.html chap-Security_Guide-Encryption.html
chap-Security_Guide-General_Principles_of_Information_Security.html
chap-Security_Guide-References.html
chap-Security_Guide-Secure_Installation.html
chap-Security_Guide-Securing_Your_Network.html
chap-Security_Guide-Security_Overview.html
chap-Security_Guide-Software_Maintenance.html index.html
pref-Security_Guide-Preface.html
sect-Security_Guide-Additional_Resources-Related_Books.html
sect-Security_Guide-Additional_Resources-Related_Documentation.html
sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html
sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html
sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html
sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html
sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html
sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html
sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html
sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html
sect-Security_Guide-Attackers_and_Vulnerabilities.html
sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html
sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html
sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html
sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html
sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html
sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html
sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html
sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html
sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html
sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html
sect-Security_Guide-Common_Exploits_and_Attacks.html
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html
sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html
sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html
sect-Security_Guide-Evaluating_the_Tools-Nessus.html
sect-Security_Guide-Evaluating_the_Tools-Nikto.html
sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html
sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html
sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html
sect-Security_Guide-Firewalls-Additional_Resources.html
sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html
sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html
sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html
sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html
sect-Security_Guide-Firewalls-IPv6.html
sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html
sect-Security_Guide-Firewalls-Using_IPTables.html
sect-Security_Guide-Firewalls.html
sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html
sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html
sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html
sect-Security_Guide-IPTables-Additional_Resources.html
sect-Security_Guide-IPTables-Command_Options_for_IPTables.html
sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html
sect-Security_Guide-IPTables-IPTables_Control_Scripts.html
sect-Security_Guide-IPTables-IPTables_and_IPv6.html
sect-Security_Guide-IPTables-Saving_IPTables_Rules.html
sect-Security_Guide-IPTables.html
sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html
sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html
sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html
sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html
sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html
sect-Security_Guide-Kerberos-Additional_Resources.html
sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html
sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html
sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html
sect-Security_Guide-Kerberos-How_Kerberos_Works.html
sect-Security_Guide-Kerberos-Kerberos_Terminology.html
sect-Security_Guide-Kerberos-Kerberos_and_PAM.html
sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html
sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html
sect-Security_Guide-Kerberos.html
sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html
sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html
sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html
sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html
sect-Security_Guide-LUKS_Disk_Encryption.html
sect-Security_Guide-Option_Fields-Access_Control.html
sect-Security_Guide-Option_Fields-Expansions.html
sect-Security_Guide-Option_Fields-Shell_Commands.html
sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html
sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html
sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html
sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html
sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html
sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html
sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html
sect-Security_Guide-Securing_FTP-Anonymous_Access.html
sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html
sect-Security_Guide-Securing_FTP-User_Accounts.html
sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html
sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html
sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html
sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html
sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html
sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html
sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html
sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html
sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html
sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html
sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html
sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html
sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html
sect-Security_Guide-Security_Updates.html
sect-Security_Guide-Server_Security-Securing_FTP.html
sect-Security_Guide-Server_Security-Securing_NFS.html
sect-Security_Guide-Server_Security-Securing_NIS.html
sect-Security_Guide-Server_Security-Securing_Portmap.html
sect-Security_Guide-Server_Security-Securing_Sendmail.html
sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html
sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html
sect-Security_Guide-Server_Security.html
sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html
sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html
sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html
sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html
sect-Security_Guide-Single_Sign_on_SSO.html
sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html
sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html
sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html
sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html
sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html
sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html
sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html
sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html
sect-Security_Guide-TCP_Wrappers_and_xinetd.html
sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html
sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html
sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html
sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html
sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html
sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html
sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html
sect-Security_Guide-Virtual_Private_Networks_VPNs.html
sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html
sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html
sect-Security_Guide-Vulnerability_Assessment.html
sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html
sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html
Log Message:
Initial build in html.
--- NEW FILE Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Shell</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"
title="3.5. Virtual Private Networks"/><link rel="next"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li cl
ass="previous"><a accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="Security_Guide-Encryption-Data_in_Motion-Secure_Shell">3.6. Secure
Shell</h2></div></div></div><div class="para">
Secure Shell (SSH) also provides encrypted tunnels between computers but only using a
single port. <a
href="http://www.redhatmagazine.com/2007/11/27/advanced-ssh-configur...
forwarding can be done over an SSH tunnel</a> and traffic will be encrypted as it
passes over that tunnel but using port forwarding isn't as fluid as a VPN.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"><strong>Prev</strong>3.5. Virtual
Private Networks</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption.html"><strong>Next</strong>3.7. LUKS
Disk Encryption</a></li></ul></body></html>
--- NEW FILE Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Private Networks</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="Security_Guide-Encryption-Data_in_Motion.html" title="3.4. Data in
Motion"/><link rel="next"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"
title="3.6. Secure Shell"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a
accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks">3.5. Virtual
Private Networks</h2></div></div></div><div
class="para">
Virtual Private Networks (VPN) provide encrypted tunnels between computers or networks
of computers across all ports. With a VPN in place, all network traffic from the client is
forwarded to the server through the encrypted tunnel. This means that the client is
logically on the same network as the server it is connected to via the VPN. VPNs are very
common and are simple to use and setup.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion.html"><strong>Prev</strong>3.4. Data
in Motion</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"><strong>Next</strong>3.6. Secure
Shell</a></li></ul></body></html>
--- NEW FILE Security_Guide-Encryption-Data_in_Motion.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... in
Motion</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"
title="3.3. File Based Encryption"/><link rel="next"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"
title="3.5. Virtual Private Networks"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation Site"/
</a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="Security_Guide-Encryption-Data_in_Motion">3.4. Data in
Motion</h2></div></div></div><div class="para">
Data in motion is data that is being transmitted over a network. The biggest
threats to data in motion are interception and alteration. Your user name and password
should never be transmitted over a network without protection as it could be intercepted
and used by someone else to impersonate you or gain access to sensitive information. Other
private information such as bank account information should also be protected when
transmitted across a network. If the network session was encrypted then you would not have
to worry as much about the data being compromised while it is being transmitted.
</div><div class="para">
Data in motion is particularly vulnerable to attackers because the attacker does not
have to be near the computer in which the data is being stored rather they only have to be
somewhere along the path. Encryption tunnels can protect data along the path of
communications.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"><strong>Prev</strong>3.3. File
Based Encryption</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html"><strong>Next</strong>3.5. Virtual
Private Networks</a></li></ul></body></html>
--- NEW FILE Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... Based
Encryption</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"
title="3.2. Full Disk Encryption"/><link rel="next"
href="Security_Guide-Encryption-Data_in_Motion.html" title="3.4. Data in
Motion"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docna
v"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption">3.3. File
Based Encryption</h2></div></div></div><div
class="para">
GnuPG (GPG) is an open source version of PGP that allows you to sign and/or encrypt a
file or an email message. This is useful to maintain integrity of the message or file and
also protects the confidentiality of the information contained within the file or email.
In the case of email, GPG provides dual protection. Not only can it provide Data at Rest
protection but also Data In Motion protection once the message has been sent across the
network.
</div><div class="para">
File based encryption is intended to protect a file after it has left your computer,
such as when you send a CD through the mail. Some file based encryption solutions will
leave remnants of the encrypted files that an attacker who has physical access to your
computer can recover under some circumstances. To protect the contents of those files from
attackers who may have access to your computer, use file based encryption combined with
another solution such as full disk encryption.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"><strong>Prev</strong>3.2. Full
Disk Encryption</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Data_in_Motion.html"><strong>Next</strong>3.4. Data
in Motion</a></li></ul></body></html>
--- NEW FILE We_Need_Feedback.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Need Feedback!</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="pref-Security_Guide-Preface.html" title="Preface"/><link
rel="prev" href="pref-Security_Guide-Preface.html"
title="Preface"/><link rel="next"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="pref-Security_Guide-Preface.html"><str
ong>Prev</strong></a></li><li class="next"><a
accesskey="n"
href="chap-Security_Guide-Security_Overview.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="We_Need_Feedback">2. We Need
Feedback!</h2></div></div></div><a id="d0e359"
class="indexterm"/><div class="para">
More information about the Linux Security Guide project can be found at <a
href="https://fedorahosted.org/securityguide">https://fedora...
</div><div class="para">
To provide feedback for the Security Guide, please file a bug in <a
href="https://bugzilla.redhat.com/">https://bugzilla.redhat....;.
</div><div class="itemizedlist"><ul><li><div
class="para">
Product = <span class="emphasis"><em>Fedora Hosted
Projects</em></span>
</div></li><li><div class="para">
Component = <span
class="emphasis"><em>Security_Guide</em></span>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="pref-Security_Guide-Preface.html"><strong>Prev</strong>Preface</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Security_Overview.html"><strong>Next</strong>Chapter 1. Security
Overview</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-Encryption.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"
title="2.9.7.2. Useful IP Tables Websites"/><link rel="next"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"
title="3.2. Full Disk Encryption"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul cla
ss="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-Encryption">Chapter 3. Encryption</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-Encryption.html#sect-Security_Guide-Encryption-Data_at_Rest">3.1.
Data at Rest</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html">3.2.
Full Disk Encryption</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html">3.3.
File Based Encryption</a></span></dt><dt><span
class="sectio
n"><a href="Security_Guide-Encryption-Data_in_Motion.html">3.4.
Data in Motion</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html">3.5.
Virtual Private Networks</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html">3.6. Secure
Shell</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption.html">3.7. LUKS Disk
Encryption</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption.html#sect-Security_Guide-LUKS_Disk_Encryption-LUKS_Implementation_in_Fedora">3.7.1.
LUKS Implementation in Fedora</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html">3.7.2.
Manually Encrypting Directories</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Ste
p_by_Step_Instructions.html">3.7.3. Step-by-Step
Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html">3.7.4.
What you have just accomplished.</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html">3.7.5.
Links of
Interest</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html">3.8.
7-Zip Encrypted
Archives</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html#sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation">3.8.1.
7-Zip Installation in Fedora</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html">3.8.2.
Step-by-Step Installation Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html">3.8.3.
Step-by-Step Usage Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html">3.8.4.
Things of
note</a></span></dt></dl></dd></dl></div><div
class="para">
There are two main types of data that must be protected: data at rest and data in
motion. These different types of data are protected in similar ways using similar
technology but the implementations can be completely different. No single protective
implementation can prevent all possible methods of compromise as the same information may
be at rest and in motion at different points in time.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Encryption-Data_at_Rest">3.1. Data at
Rest</h2></div></div></div><div class="para">
Data at rest is data that is stored on a hard drive, tape, CD, DVD, disk, or other
media. This information's biggest threat comes from being physically stolen. Laptops
in airports, CDs going through the mail, and backup tapes that get left in the wrong
places are all examples of events where data can be compromised through theft. If the data
was encrypted on the media then you wouldn't have to worry as much about the data
being compromised.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"><strong>Prev</strong>2.9.7.2. Useful
IP Tables Websites</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html"><strong>Next</strong>3.2. Full
Disk Encryption</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-General_Principles_of_Information_Security.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Principles of Information Security</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"
title="3.8.4. Things of note"/><link rel="next"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"
title="4.2. Tips, Guides, and Tools"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="D
ocumentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-General_Principles_of_Information_Security">Chapter 4. General
Principles of Information Security</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-General_Principles_of_Information_Security.html#sect-Security_Guide-General_Principles_of_Information_Security-General_Principles">4.1.
General Principles</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html">4.2.
Tips, Guides, and
Tools</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html">4.3.
NSA Documents</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html">4.4.
DISA IASE Documents</a></span></dt></dl></div><div
class="para">
The United States' <a href="www.nsa.gov">National Security
Agency</a> (NSA) provides hardening guides and hardening tips for many different
operating systems to help government agencies, businesses, and individuals help secure
their system against attacks. In addition to specific settings to change, a set of general
principles have been developed to give you a high level view of information security.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-General_Principles_of_Information_Security-General_Principles">4.1. General
Principles</h2></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
Encrypt all data transmitted over the network. Encrypting authentication information
(such as passwords) is particularly important.
</div></li><li><div class="para">
Minimize the amount of software installed and running in order to minimize
vulnerability.
</div></li><li><div class="para">
Use security-enhancing software and tools whenever available (e.g. SELinux and
IPTables).
</div></li><li><div class="para">
Run each network service on a separate server whenever possible. This minimizes the
risk that a compromise of one service could lead to a compromise of others.
</div></li><li><div class="para">
Maintain user accounts. Create a good password policy and enforce its use. Delete
unused user accounts.
</div></li><li><div class="para">
Review system and application logs on a routine basis. Send logs to a dedicated log
server. This prevents intruders from easily avoiding detection by modifying the local
logs.
</div></li><li><div class="para">
Never login directly as root, unless absolutely necessary. Administrators should use
sudo to execute commands as root when required. The accounts capable of using sudo are
specified in /etc/sudoers, which is edited with the visudo utility. By default, relavent
logs are written to /var/log/secure.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"><strong>Prev</strong>3.8.4. Things
of note</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"><strong>Next</strong>4.2. Tips,
Guides, and Tools</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-References.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html"
title="6.4. Install Signed Packages from Well Known
Repositories"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Software_Mainte
nance-Install_Signed_Packages_from_Well_Known_Repositories.html"><strong>Prev</strong></a></li><li
class="next"/></ul><div class="chapter"
lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-References">Chapter 7. References</h2></div></div></div><a
id="d0e16800" class="indexterm"/><a id="d0e16803"
class="indexterm"/><a id="d0e16808"
class="indexterm"/><a id="d0e16813"
class="indexterm"/><a id="d0e16818"
class="indexterm"/><a id="d0e16823"
class="indexterm"/><a id="d0e16828"
class="indexterm"/><a id="d0e16833"
class="indexterm"/><a id="d0e16840"
class="indexterm"/><a id="d0e16847"
class="indexterm"/><a id="d0e16854"
class="indexterm"/><div class="para">
The following references are pointers to additional information that is relevant to
SELinux and Fedora but beyond the scope of this guide. Note that due to the rapid
development of SELinux, some of this material may only apply to specific releases of
Fedora.
</div><div class="variablelist"
id="vari-Security_Guide-References-Books"><h6>Books</h6><dl><dt><span
class="term">SELinux by Example</span></dt><dd><div
class="para">
Mayer, MacMillan, and Caplan
</div><div class="para">
Prentice Hall, 2007
</div></dd></dl></div><div class="variablelist"
id="vari-Security_Guide-References-Tutorials_and_Help"><h6>Tutorials
and Help</h6><dl><dt><span class="term">Understanding
and Customizing the Apache HTTP SELinux Policy</span></dt><dd><div
class="para">
<a
href="http://fedora.redhat.com/docs/selinux-apache-fc3/">htt...
</div></dd><dt><span class="term">Tutorials and
talks from Russell Coker</span></dt><dd><div
class="para">
<a
href="http://www.coker.com.au/selinux/talks/ibmtu-2004/">http://www.coker.com.au/selinux/talks/ibmtu-2004/</a>
</div></dd><dt><span class="term">Generic Writing
SELinux policy HOWTO</span></dt><dd><div class="para">
<a
href="https://sourceforge.net/docman/display_doc.php?docid=21959[amp
]group_id=21266">https://sourceforge.net/docman/display_doc.php?docid=21959[amp
]group_id=21266</a>
</div></dd><dt><span class="term">Red Hat
Knowledgebase</span></dt><dd><div class="para">
<a
href="http://kbase.redhat.com/">http://kbase.redhat.com/<...
</div></dd></dl></div><div class="variablelist"
id="vari-Security_Guide-References-General_Information"><h6>General
Information</h6><dl><dt><span class="term">NSA SELinux
main website</span></dt><dd><div class="para">
<a
href="http://www.nsa.gov/selinux/">http://www.nsa.gov/selinu...
</div></dd><dt><span class="term">NSA SELinux
FAQ</span></dt><dd><div class="para">
<a
href="http://www.nsa.gov/selinux/info/faq.cfm">http://www.ns...
</div></dd><dt><span class="term">Fedora SELinux FAQ
</span></dt><dd><div class="para">
<a
href="http://fedora.redhat.com/docs/selinux-faq-fc3/">http:/...
</div></dd><dt><span class="term">SELinux NSA's
Open Source Security Enhanced Linux</span></dt><dd><div
class="para">
<a
href="http://www.oreilly.com/catalog/selinux/">http://www.or...
</div></dd></dl></div><div class="variablelist"
id="vari-Security_Guide-References-Technology"><h6>Technology</h6><dl><dt><span
class="term">An Overview of Object Classes and
Permissions</span></dt><dd><div class="para">
<a
href="http://www.tresys.com/selinux/obj_perms_help.html">htt...
</div></dd><dt><span class="term">Integrating
Flexible Support for Security Policies into the Linux Operating System (a history of Flask
implementation in Linux)</span></dt><dd><div
class="para">
<a
href="http://www.nsa.gov/selinux/papers/slinux-abs.cfm">http...
</div></dd><dt><span class="term">Implementing
SELinux as a Linux Security Module</span></dt><dd><div
class="para">
<a
href="http://www.nsa.gov/selinux/papers/module-abs.cfm">http...
</div></dd><dt><span class="term">A Security Policy
Configuration for the Security-Enhanced Linux</span></dt><dd><div
class="para">
<a
href="http://www.nsa.gov/selinux/papers/policy-abs.cfm">http...
</div></dd></dl></div><div class="variablelist"
id="vari-Security_Guide-References-Community"><h6>Community</h6><dl><dt><span
class="term">SELinux community page</span></dt><dd><div
class="para">
<a
href="http://selinux.sourceforge.net">http://selinux.sourceforge.net</a>
</div></dd><dt><span
class="term">IRC</span></dt><dd><div
class="para">
irc.freenode.net, #rhel-selinux
</div></dd></dl></div><div class="variablelist"
id="vari-Security_Guide-References-History"><h6>History</h6><dl><dt><span
class="term">Quick history of Flask</span></dt><dd><div
class="para">
<a
href="http://www.cs.utah.edu/flux/fluke/html/flask.html">htt...
</div></dd><dt><span class="term">Full background on
Fluke</span></dt><dd><div class="para">
<a
href="http://www.cs.utah.edu/flux/fluke/html/index.html">htt...
</div></dd></dl></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html"><strong>Prev</strong>6.4. Install
Signed Packages from Well Known Repo...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-Secure_Installation.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Installation</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"
title="4.4. DISA IASE Documents"/><link rel="next"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"
title="5.2. Utilize LUKS Partition
Encryption"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentat
ion Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-Secure_Installation">Chapter 5. Secure
Installation</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-Secure_Installation.html#sect-Security_Guide-Secure_Installation-Disk_Partitions">5.1.
Disk Partitions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html">5.2.
Utilize LUKS Partition
Encryption</a></span></dt></dl></div><div
class="para">
Security begins with the first time you put that CD or DVD into your disk drive to
install Fedora. Configuring your system securely from the beginning makes it easier to
implement additional security settings later.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Secure_Installation-Disk_Partitions">5.1. Disk
Partitions</h2></div></div></div><div
class="para">
The NSA recommends creating separate partitions for /boot, /, /home, /tmp, and
/var/tmp. The reasons for each are different and we will address each partition.
</div><div class="para">
/boot - This partition is the first partition that is read by the system during boot
up. The boot loader and kernel images that are used to boot your system into Fedora are
stored in this partition. This partition should not be encrypted. If this partition is
included in / and that partition is encrypted or otherwise becomes unavailable then your
system will not be able to boot.
</div><div class="para">
/home - When user data (/home) is stored in / instead of in a separate partition, the
partition can fill up causing the operating system to become unstable. Also, when
upgrading your system to the next version of Fedora it is a lot easier when you can keep
your data in the /home partition as it will not be overwritten during installation. If the
root partition (/) becomes corrupt your data could be lost forever. By using a separate
partition there is slightly more protection against data loss. You can also target this
partition for frequent backups.
</div><div class="para">
/tmp and /var/tmp - Both the /tmp and the /var/tmp directories are used to store data
that doesn't need to be stored for a long period of time. However if a lot of data
floods one of these directories it can consume all of your storage space. If this happens
and these directories are stored within / then your system could become unstable and
crash. For this reason, moving these directories into their own partitions is a good
idea.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"><strong>Prev</strong>4.4. DISA
IASE Documents</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"><strong>Next</strong>5.2. Utilize
LUKS Partition Encryption</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-Securing_Your_Network.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Your Network</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-Security_Updates.html" title="1.5. Security
Updates"/><link rel="next"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-S
ecurity_Updates.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-Securing_Your_Network">Chapter 2. Securing Your
Network</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security">2.1.
Workstation
Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Evaluating_Workstation_Security">2.1.1.
Evaluating Workstation Security</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-BIOS_and_Boot_Loader_Security">2.1.2.
BIOS and Boot Loader Security</a></span></dt><dt><span
class="sect
ion"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Password_Security">2.1.3.
Password Security</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Administrative_Controls">2.1.4.
Administrative Controls</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Available_Network_Services">2.1.5.
Available Network Services</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Personal_Firewalls">2.1.6.
Personal Firewalls</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Security_Enhanced_Communication_Tools">2.1.7.
Security Enhanced Communication
Tools</a></span></dt></dl></dd><dt><span
class="s
ection"><a href="sect-Security_Guide-Server_Security.html">2.2.
Server Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security.html#sect-Security_Guide-Server_Security-Securing_Services_With_TCP_Wrappers_and_xinetd">2.2.1.
Securing Services With TCP Wrappers and
xinetd</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Securing_Portmap.html">2.2.2.
Securing Portmap</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Securing_NIS.html">2.2.3. Securing
NIS</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_NFS.html">2.2.4. Securing
NFS</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html">2.2.5.
Securing the Apache HTTP Server</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Securing_FTP.html">2.2.6. Securing
FTP</
a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html">2.2.7.
Securing Sendmail</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html">2.2.8.
Verifying Which Ports Are
Listening</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO.html">2.3. Single Sign-on
(SSO)</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO.html#sect-Security_Guide-Single_Sign_on_SSO-Introduction">2.3.1.
Introduction</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html">2.3.2.
Getting Started with your new Smart
Card</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html">2.3.3.
How Smart Card Enrollment Works</a></span></dt><dt><span cla
ss="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html">2.3.4.
How Smart Card Login Works</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html">2.3.5.
Configuring Firefox to use Kerberos for
SSO</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html">2.4.
Pluggable Authentication Modules
(PAM)</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html#sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Advantages_of_PAM">2.4.1.
Advantages of PAM</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html">2.4.2.
PAM Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Conf
iguration_File_Format.html">2.4.3. PAM Configuration File
Format</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html">2.4.4.
Sample PAM Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html">2.4.5.
Creating PAM Modules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html">2.4.6.
PAM and Administrative Credential
Caching</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html">2.4.7.
PAM and Device Ownership</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html">2.4.8.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="se
ction"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html">2.5. TCP Wrappers and
xinetd</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html#sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers">2.5.1.
TCP Wrappers</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html">2.5.2.
TCP Wrappers Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html">2.5.3.
xinetd</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html">2.5.4.
xinetd Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html">2.5.5.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos.html">2.6. Kerbe
ros</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos.html#sect-Security_Guide-Kerberos-What_is_Kerberos">2.6.1.
What is Kerberos?</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html">2.6.2. Kerberos
Terminology</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html">2.6.3. How
Kerberos Works</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html">2.6.4. Kerberos and
PAM</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html">2.6.5.
Configuring a Kerberos 5 Server</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html">2.6.6.
Configuring a Kerberos 5 Client</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html">2.6.7. Dom
ain-to-Realm Mapping</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html">2.6.8.
Setting Up Secondary KDCs</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html">2.6.9.
Setting Up Cross Realm Authentication</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Additional_Resources.html">2.6.10.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html">2.7. Virtual
Private Networks
(VPNs)</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html#sect-Security_Guide-Virtual_Private_Networks_VPNs-How_Does_a_VPN_Work">2.7.1.
How Does a VPN Work?</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html">2.7.2.
VPNs and Fedora</a></span></d
t><dt><span class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html">2.7.3.
IPsec</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html">2.7.4.
Creating an IPsec Connection</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html">2.7.5.
IPsec Installation</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html">2.7.6.
IPsec Host-to-Host Configuration</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html">2.7.7.
IPsec Network-to-Network Configuration</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html">2.7.8.
Starting and Stopping an IPsec
Connection</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls.html">2.8.
Firewalls</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls.html#sect-Security_Guide-Firewalls-Netfilter_and_IPTables">2.8.1.
Netfilter and IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html">2.8.2.
Basic Firewall Configuration</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Using_IPTables.html">2.8.3. Using
IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html">2.8.4.
Common IPTables Filtering</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html">2.8.5.
FORWARD and NAT Rules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html">2.8
.6. Malicious Software and Spoofed IP
Addresses</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html">2.8.7.
IPTables and Connection Tracking</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-IPv6.html">2.8.8.
IPv6</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Additional_Resources.html">2.8.9.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-IPTables.html">2.9.
IPTables</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-IPTables.html#sect-Security_Guide-IPTables-Packet_Filtering">2.9.1.
Packet Filtering</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html">2.9.2.
Differences Between IPTables and
IPChains</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Command_Options_f
or_IPTables.html">2.9.3. Command Options for
IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html">2.9.4. Saving
IPTables Rules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html">2.9.5.
IPTables Control Scripts</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html">2.9.6. IPTables
and IPv6</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Additional_Resources.html">2.9.7.
Additional
Resources</a></span></dt></dl></dd></dl></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Workstation_Security">2.1. Workstation
Security</h2></div></div></div><a id="d0e1757"
class="indexterm"/><div class="para">
Securing a Linux environment begins with the workstation. Whether locking down a
personal machine or securing an enterprise system, sound security policy begins with the
individual computer. A computer network is only as secure as its weakest node.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Evaluating_Workstation_Security">2.1.1. Evaluating
Workstation Security</h3></div></div></div><a
id="d0e1765" class="indexterm"/><a id="d0e1772"
class="indexterm"/><a id="d0e1779"
class="indexterm"/><a id="d0e1786"
class="indexterm"/><a id="d0e1793"
class="indexterm"/><a id="d0e1800"
class="indexterm"/><div class="para">
When evaluating the security of a Fedora workstation, consider the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>BIOS and Boot Loader
Security</em></span> — Can an unauthorized user physically access the machine
and boot into single user or rescue mode without a password?
</div></li><li><div class="para">
<span class="emphasis"><em>Password
Security</em></span> — How secure are the user account passwords on the
machine?
</div></li><li><div class="para">
<span class="emphasis"><em>Administrative
Controls</em></span> — Who has an account on the system and how much
administrative control do they have?
</div></li><li><div class="para">
<span class="emphasis"><em>Available Network
Services</em></span> — What services are listening for requests from the
network and should they be running at all?
</div></li><li><div class="para">
<span class="emphasis"><em>Personal
Firewalls</em></span> — What type of firewall, if any, is necessary?
</div></li><li><div class="para">
<span class="emphasis"><em>Security Enhanced Communication
Tools</em></span> — Which tools should be used to communicate between
workstations and which should be avoided?
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-BIOS_and_Boot_Loader_Security">2.1.2. BIOS
and Boot Loader Security</h3></div></div></div><a
id="d0e1849" class="indexterm"/><a id="d0e1854"
class="indexterm"/><a id="d0e1859"
class="indexterm"/><div class="para">
Password protection for the BIOS (or BIOS equivalent) and the boot loader can prevent
unauthorized users who have physical access to systems from booting using removable media
or obtaining root privileges through single user mode. The security measures you should
take to protect against such attacks depends both on the sensitivity of the information on
the workstation and the location of the machine.
</div><div class="para">
For example, if a machine is used in a trade show and contains no sensitive
information, then it may not be critical to prevent such attacks. However, if an
employee's laptop with private, unencrypted SSH keys for the corporate network is left
unattended at that same trade show, it could lead to a major security breach with
ramifications for the entire company.
</div><div class="para">
If the workstation is located in a place where only authorized or trusted people have
access, however, then securing the BIOS or the boot loader may not be necessary.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-BIOS_and_Boot_Loader_Security-BIOS_Passwords">2.1.2.1. BIOS
Passwords</h4></div></div></div><a id="d0e1873"
class="indexterm"/><div class="para">
The two primary reasons for password protecting the BIOS of a computer
are<sup>[<a id="d0e1882" href="#ftn.d0e1882"
class="footnote">5</a>]</sup>:
</div><div class="orderedlist"><ol><li><div
class="para">
<span class="emphasis"><em>Preventing Changes to BIOS
Settings</em></span> — If an intruder has access to the BIOS, they can set it
to boot from a diskette or CD-ROM. This makes it possible for them to enter rescue mode or
single user mode, which in turn allows them to start arbitrary processes on the system or
copy sensitive data.
</div></li><li><div class="para">
<span class="emphasis"><em>Preventing System
Booting</em></span> — Some BIOSes allow password protection of the boot
process. When activated, an attacker is forced to enter a password before the BIOS
launches the boot loader.
</div></li></ol></div><div class="para">
Because the methods for setting a BIOS password vary between computer manufacturers,
consult the computer's manual for specific instructions.
</div><div class="para">
If you forget the BIOS password, it can either be reset with jumpers on the
motherboard or by disconnecting the CMOS battery. For this reason, it is good practice to
lock the computer case if possible. However, consult the manual for the computer or
motherboard before attempting to disconnect the CMOS battery.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-BIOS_Passwords-Securing_Non_x86_Platforms">2.1.2.1.1. Securing
Non-x86 Platforms</h5></div></div></div><a
id="d0e1906" class="indexterm"/><a id="d0e1913"
class="indexterm"/><div class="para">
Other architectures use different programs to perform low-level tasks roughly
equivalent to those of the BIOS on x86 systems. For instance, <span
class="trademark">Intel</span>® <span
class="trademark">Itanium</span>™ computers use the <em
class="firstterm">Extensible Firmware Interface</em> (<em
class="firstterm">EFI</em>) shell.
</div><div class="para">
For instructions on password protecting BIOS-like programs on other architectures,
refer to the manufacturer's instructions.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-BIOS_and_Boot_Loader_Security-Boot_Loader_Passwords">2.1.2.2. Boot
Loader Passwords</h4></div></div></div><a
id="d0e1939" class="indexterm"/><a id="d0e1944"
class="indexterm"/><div class="para">
The primary reasons for password protecting a Linux boot loader are as follows:
</div><div class="orderedlist"><ol><li><div
class="para">
<span class="emphasis"><em>Preventing Access to Single User
Mode</em></span> — If attackers can boot the system into single user mode,
they are logged in automatically as root without being prompted for the root password.
</div></li><li><div class="para">
<span class="emphasis"><em>Preventing Access to the GRUB
Console</em></span> — If the machine uses GRUB as its boot loader, an attacker
can use the GRUB editor interface to change its configuration or to gather information
using the <code class="command">cat</code> command.
</div></li><li><div class="para">
<span class="emphasis"><em>Preventing Access to Insecure
Operating Systems</em></span> — If it is a dual-boot system, an attacker can
select an operating system at boot time (for example, DOS), which ignores access controls
and file permissions.
</div></li></ol></div><div class="para">
Fedora ships with the GRUB boot loader on the x86 platform. For a detailed look at
GRUB, refer to the Red Hat Installation Guide.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Boot_Loader_Passwords-Password_Protecting_GRUB">2.1.2.2.1. Password
Protecting GRUB</h5></div></div></div><a id="d0e1980"
class="indexterm"/><div class="para">
You can configure GRUB to address the first two issues listed in <a
class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-BIOS_and_Boot_Loader_Security-Boot_Loader_Passwords"
title="2.1.2.2. Boot Loader Passwords">Section 2.1.2.2, “Boot Loader
Passwords”</a> by adding a password directive to its configuration file. To do this,
first choose a strong password, open a shell, log in as root, and then type the following
command:
</div><pre class="screen"><code
class="command">/sbin/grub-md5-crypt</code>
</pre><div class="para">
When prompted, type the GRUB password and press <span
class="keycap"><strong>Enter</strong></span>. This returns
an MD5 hash of the password.
</div><div class="para">
Next, edit the GRUB configuration file <code
class="filename">/boot/grub/grub.conf</code>. Open the file and below
the <code class="command">timeout</code> line in the main section of
the document, add the following line:
</div><pre class="screen"><code
class="command">password --md5 <em
class="replaceable"><code><password-hash></code></em></code>
</pre><div class="para">
Replace <em
class="replaceable"><code><password-hash></code></em>
with the value returned by <code
class="command">/sbin/grub-md5-crypt</code><sup>[<a
id="d0e2021" href="#ftn.d0e2021"
class="footnote">6</a>]</sup>.
</div><div class="para">
The next time the system boots, the GRUB menu prevents access to the editor or
command interface without first pressing <span
class="keycap"><strong>p</strong></span> followed by the
GRUB password.
</div><div class="para">
Unfortunately, this solution does not prevent an attacker from booting into an
insecure operating system in a dual-boot environment. For this, a different part of the
<code class="filename">/boot/grub/grub.conf</code> file must be
edited.
</div><div class="para">
Look for the <code class="computeroutput">title</code> line of
the operating system that you want to secure, and add a line with the <code
class="command">lock</code> directive immediately beneath it.
</div><div class="para">
For a DOS system, the stanza should begin similar to the following:
</div><pre class="screen"><code
class="computeroutput">title DOS lock</code>
</pre><div class="warning"><h2>Warning</h2><div
class="para">
A <code class="computeroutput">password</code> line must be
present in the main section of the <code
class="filename">/boot/grub/grub.conf</code> file for this method to
work properly. Otherwise, an attacker can access the GRUB editor interface and remove the
lock line.
</div></div><div class="para">
To create a different password for a particular kernel or operating system, add a
<code class="command">lock</code> line to the stanza, followed by a
password line.
</div><div class="para">
Each stanza protected with a unique password should begin with lines similar to the
following example:
</div><pre class="screen"><code
class="computeroutput">title DOS lock password --md5 <em
class="replaceable"><code><password-hash></code></em></code>
</pre></div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Password_Security">2.1.3. Password
Security</h3></div></div></div><a id="d0e2076"
class="indexterm"/><div class="para">
Passwords are the primary method that Fedora uses to verify a user's identity. This
is why password security is so important for protection of the user, the workstation, and
the network.
</div><div class="para">
For security purposes, the installation program configures the system to use <em
class="firstterm">Message-Digest Algorithm</em> (<span
class="emphasis"><em>MD5</em></span>) and shadow passwords.
It is highly recommended that you do not alter these settings.
</div><div class="para">
If MD5 passwords are deselected during installation, the older <em
class="firstterm">Data Encryption Standard</em> (<em
class="firstterm"><acronym
class="acronym">DES</acronym></em>) format is used. This format
limits passwords to eight alphanumeric characters (disallowing punctuation and other
special characters), and provides a modest 56-bit level of encryption.
</div><div class="para">
If shadow passwords are deselected during installation, all passwords are stored as a
one-way hash in the world-readable <code
class="filename">/etc/passwd</code> file, which makes the system
vulnerable to offline password cracking attacks. If an intruder can gain access to the
machine as a regular user, he can copy the <code
class="filename">/etc/passwd</code> file to his own machine and run any
number of password cracking programs against it. If there is an insecure password in the
file, it is only a matter of time before the password cracker discovers it.
</div><div class="para">
Shadow passwords eliminate this type of attack by storing the password hashes in the
file <code class="filename">/etc/shadow</code>, which is readable
only by the root user.
</div><div class="para">
This forces a potential attacker to attempt password cracking remotely by logging into
a network service on the machine, such as SSH or FTP. This sort of brute-force attack is
much slower and leaves an obvious trail as hundreds of failed login attempts are written
to system files. Of course, if the cracker starts an attack in the middle of the night on
a system with weak passwords, the cracker may have gained access before dawn and edited
the log files to cover his tracks.
</div><div class="para">
In addition to format and storage considerations is the issue of content. The single
most important thing a user can do to protect his account against a password cracking
attack is create a strong password.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Password_Security-Creating_Strong_Passwords">2.1.3.1. Creating
Strong Passwords</h4></div></div></div><a
id="d0e2118" class="indexterm"/><div class="para">
When creating a secure password, it is a good idea to follow these guidelines:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Do Not Use Only Words or
Numbers</em></span> — Never use only numbers or words in a password.
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
8675309
</div></li><li><div class="para">
juan
</div></li><li><div class="para">
hackme
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Use Recognizable
Words</em></span> — Words such as proper names, dictionary words, or even
terms from television shows or novels should be avoided, even if they are bookended with
numbers.
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
john1
</div></li><li><div class="para">
DS-9
</div></li><li><div class="para">
mentat123
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Use Words in Foreign
Languages</em></span> — Password cracking programs often check against word
lists that encompass dictionaries of many languages. Relying on foreign languages for
secure passwords is not secure.
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
cheguevara
</div></li><li><div class="para">
bienvenido1
</div></li><li><div class="para">
1dumbKopf
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Use Hacker
Terminology</em></span> — If you think you are elite because you use hacker
terminology — also called l337 (LEET) speak — in your password, think again. Many word
lists include LEET speak.
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
H4X0R
</div></li><li><div class="para">
1337
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Use Personal
Information</em></span> — Avoid using any personal information in your
passwords. If the attacker knows your identity, the task of deducing your password becomes
easier. The following is a list of the types of information to avoid when creating a
password:
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
Your name
</div></li><li><div class="para">
The names of pets
</div></li><li><div class="para">
The names of family members
</div></li><li><div class="para">
Any birth dates
</div></li><li><div class="para">
Your phone number or zip code
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Invert Recognizable
Words</em></span> — Good password checkers always reverse common words, so
inverting a bad password does not make it any more secure.
</div><div class="para">
Some insecure examples include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
R0X4H
</div></li><li><div class="para">
nauj
</div></li><li><div class="para">
9-DS
</div></li></ul></div></li><li><div
class="para">
<span class="emphasis"><em>Do Not Write Down Your
Password</em></span> — Never store a password on paper. It is much safer to
memorize it.
</div></li><li><div class="para">
<span class="emphasis"><em>Do Not Use the Same Password For
All Machines</em></span> — It is important to make separate passwords for each
machine. This way if one system is compromised, all of your machines are not immediately
at risk.
</div></li></ul></div><div class="para">
The following guidelines will help you to create a strong password:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Make the Password at Least Eight
Characters Long</em></span> — The longer the password, the better. If using
MD5 passwords, it should be 15 characters or longer. With DES passwords, use the maximum
length (eight characters).
</div></li><li><div class="para">
<span class="emphasis"><em>Mix Upper and Lower Case
Letters</em></span> — Fedora is case sensitive, so mix cases to enhance the
strength of the password.
</div></li><li><div class="para">
<span class="emphasis"><em>Mix Letters and
Numbers</em></span> — Adding numbers to passwords, especially when added to
the middle (not just at the beginning or the end), can enhance password strength.
</div></li><li><div class="para">
<span class="emphasis"><em>Include Non-Alphanumeric
Characters</em></span> — Special characters such as &, $, and >
can greatly improve the strength of a password (this is not possible if using DES
passwords).
</div></li><li><div class="para">
<span class="emphasis"><em>Pick a Password You Can
Remember</em></span> — The best password in the world does little good if you
cannot remember it; use acronyms or other mnemonic devices to aid in memorizing
passwords.
</div></li></ul></div><div class="para">
With all these rules, it may seem difficult to create a password that meets all of the
criteria for good passwords while avoiding the traits of a bad one. Fortunately, there are
some steps you can take to generate an easily-remembered, secure password.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Creating_Strong_Passwords-Secure_Password_Creation_Methodology">2.1.3.1.1. Secure
Password Creation Methodology</h5></div></div></div><a
id="d0e2287" class="indexterm"/><div class="para">
There are many methods that people use to create secure passwords. One of the more
popular methods involves acronyms. For example:
</div><div class="itemizedlist"><ul><li><div
class="para">
Think of an easily-remembered phrase, such as:
</div><div class="para">
"over the river and through the woods, to grandmother's house we
go."
</div></li><li><div class="para">
Next, turn it into an acronym (including the punctuation).
</div><div class="para">
<strong
class="userinput"><code>otrattw,tghwg.</code></strong>
</div></li><li><div class="para">
Add complexity by substituting numbers and symbols for letters in the acronym. For
example, substitute <strong
class="userinput"><code>7</code></strong> for <strong
class="userinput"><code>t</code></strong> and the at symbol
(<strong class="userinput"><code>@</code></strong>) for
<strong class="userinput"><code>a</code></strong>:
</div><div class="para">
<strong
class="userinput"><code>o7r(a)77w,7ghwg.</code></strong>
</div></li><li><div class="para">
Add more complexity by capitalizing at least one letter, such as <strong
class="userinput"><code>H</code></strong>.
</div><div class="para">
<strong
class="userinput"><code>o7r(a)77w,7gHwg.</code></strong>
</div></li><li><div class="para">
<span class="emphasis"><em>Finally, do not use the example
password above for any systems, ever</em></span>.
</div></li></ul></div><div class="para">
While creating secure passwords is imperative, managing them properly is also
important, especially for system administrators within larger organizations. The following
section details good practices for creating and managing user passwords within an
organization.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Password_Security-Creating_User_Passwords_Within_an_Organization">2.1.3.2. Creating
User Passwords Within an Organization</h4></div></div></div><a
id="d0e2350" class="indexterm"/><a id="d0e2355"
class="indexterm"/><div class="para">
If an organization has a large number of users, the system administrators have two
basic options available to force the use of good passwords. They can create passwords for
the user, or they can let users create their own passwords, while verifying the passwords
are of acceptable quality.
</div><div class="para">
Creating the passwords for the users ensures that the passwords are good, but it
becomes a daunting task as the organization grows. It also increases the risk of users
writing their passwords down.
</div><div class="para">
For these reasons, most system administrators prefer to have the users create their
own passwords, but actively verify that the passwords are good and, in some cases, force
users to change their passwords periodically through password aging.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Creating_User_Passwords_Within_an_Organization-Forcing_Strong_Passwords">2.1.3.2.1. Forcing
Strong Passwords</h5></div></div></div><a
id="d0e2369" class="indexterm"/><a id="d0e2374"
class="indexterm"/><a id="d0e2379"
class="indexterm"/><div class="para">
To protect the network from intrusion it is a good idea for system administrators to
verify that the passwords used within an organization are strong ones. When users are
asked to create or change passwords, they can use the command line application <code
class="command">passwd</code>, which is <em
class="firstterm">Pluggable Authentication Manager</em> (<em
class="firstterm">PAM</em>) aware and therefore checks to see if the
password is too short or otherwise easy to crack. This check is performed using the
<code class="filename">pam_cracklib.so</code> PAM module. Since PAM
is customizable, it is possible to add more password integrity checkers, such as <code
class="filename">pam_passwdqc</code> (available from <a
href="http://www.openwall.com/passwdqc/">http://www.openwall...>)
or to write a new module. For a list of available PAM modules, refer to <a
href="http://www.kernel.org/pub/linux/libs/pam/modules.html">...
ules.html</a>. For more information about PAM, refer to <a
class="xref"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)">Section 2.4, “Pluggable
Authentication Modules (PAM)”</a>.
</div><div class="para">
The password check that is performed at the time of their creation does not discover
bad passwords as effectively as running a password cracking program against the
passwords.
</div><div class="para">
Many password cracking programs are available that run under Fedora, although none
ship with the operating system. Below is a brief list of some of the more popular password
cracking programs:
</div><div class="note"><h2>Note</h2><div
class="para">
None of these tools are supplied with Fedora and are therefore not supported by
Fedora. in any way.
</div></div><a id="d0e2418"
class="indexterm"/><a id="d0e2423"
class="indexterm"/><a id="d0e2431"
class="indexterm"/><a id="d0e2439"
class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<span class="emphasis"><em><span
class="application"><strong>John The
Ripper</strong></span></em></span> — A fast and flexible password
cracking program. It allows the use of multiple word lists and is capable of brute-force
password cracking. It is available online at <a
href="http://www.openwall.com/john/">http://www.openwall.com...;.
</div></li><li><div class="para">
<span class="emphasis"><em><span
class="application"><strong>Crack</strong></span></em></span>
— Perhaps the most well known password cracking software, <span
class="application"><strong>Crack</strong></span> is also
very fast, though not as easy to use as <span
class="application"><strong>John The
Ripper</strong></span>. It can be found online at <a
href="http://www.crypticide.com/users/alecm/">http://www.cry...;.
</div></li><li><div class="para">
<span class="emphasis"><em><span
class="application"><strong>Slurpie</strong></span></em></span>
— <span
class="application"><strong>Slurpie</strong></span> is
similar to <span class="application"><strong>John The
Ripper</strong></span> and <span
class="application"><strong>Crack</strong></span>, but it
is designed to run on multiple computers simultaneously, creating a distributed password
cracking attack. It can be found along with a number of other distributed attack security
evaluation tools online at <a
href="http://www.ussrback.com/distributed.htm">http://www.us...;.
</div></li></ul></div><div
class="warning"><h2>Warning</h2><div
class="para">
Always get authorization in writing before attempting to crack passwords within an
organization.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Creating_User_Passwords_Within_an_Organization-Password_Aging">2.1.3.2.2. Password
Aging</h5></div></div></div><a id="d0e2501"
class="indexterm"/><a id="d0e2506"
class="indexterm"/><div class="para">
Password aging is another technique used by system administrators to defend against
bad passwords within an organization. Password aging means that after a specified period
(usually 90 days), the user is prompted to create a new password. The theory behind this
is that if a user is forced to change his password periodically, a cracked password is
only useful to an intruder for a limited amount of time. The downside to password aging,
however, is that users are more likely to write their passwords down.
</div><div class="para">
There are two primary programs used to specify password aging under Fedora: the
<code class="command">chage</code> command or the graphical <span
class="application"><strong>User Manager</strong></span>
(<code class="command">system-config-users</code>) application.
</div><div class="para">
The <code class="option">-M</code> option of the <code
class="command">chage</code> command specifies the maximum number of
days the password is valid. For example, to set a user's password to expire in 90
days, use the following command:
</div><pre class="screen"><code
class="command">chage -M 90 <em
class="replaceable"><code><username></code></em></code>
</pre><div class="para">
In the above command, replace <em
class="replaceable"><code><username></code></em>
with the name of the user. To disable password expiration, it is traditional to use a
value of <code class="command">99999</code> after the <code
class="option">-M</code> option (this equates to a little over 273
years).
</div><div class="para">
You can also use the <code class="command">chage</code> command
in interactive mode to modify multiple password aging and account details. Use the
following command to enter interactive mode:
</div><pre class="screen"><code
class="command">chage <em
class="replaceable"><code><username></code></em></code>
</pre><div class="para">
The following is a sample interactive session using this command:
</div><pre class="screen"><code
class="computeroutput"> [root@interch-dev1 ~]# chage davido Changing the
aging information for davido Enter the new value, or press ENTER for the default Minimum
Password Age [0]: 10 Maximum Password Age [99999]: 90 Last Password Change (YYYY-MM-DD)
[2006-08-18]: Password Expiration Warning [7]: Password Inactive [-1]: Account Expiration
Date (YYYY-MM-DD) [1969-12-31]: [root@interch-dev1 ~]# </code>
</pre><div class="para">
Refer to the man page for chage for more information on the available options.
</div><div class="para">
You can also use the graphical <span
class="application"><strong>User Manager</strong></span>
application to create password aging policies, as follows. Note: you need Administrator
privileges to perform this procedure.
</div><div class="procedure"><ol
class="1"><li><div class="para">
Click the <span
class="guimenu"><strong>System</strong></span> menu on the
Panel, point to <span
class="guisubmenu"><strong>Administration</strong></span>
and then click <span class="guimenuitem"><strong>Users and
Groups</strong></span> to display the User Manager. Alternatively, type the
command <code class="command">system-config-users</code> at a shell
prompt.
</div></li><li><div class="para">
Click the <span
class="guilabel"><strong>Users</strong></span> tab, and
select the required user in the list of users.
</div></li><li><div class="para">
Click <span
class="guibutton"><strong>Properties</strong></span> on the
toolbar to display the User Properties dialog box (or choose <span
class="guimenuitem"><strong>Properties</strong></span> on
the <span class="guimenu"><strong>File</strong></span>
menu).
</div></li><li><div class="para">
Click the <span class="guilabel"><strong>Password
Info</strong></span> tab, and select the check box for <span
class="guilabel"><strong>Enable password
expiration</strong></span>.
</div></li><li><div class="para">
Enter the required value in the <span
class="guilabel"><strong>Days before change
required</strong></span> field, and click <span
class="guibutton"><strong>OK</strong></span>.
</div></li></ol></div><div class="figure"
id="figu-Security_Guide-Password_Aging-Specifying_password_aging_options"><div
class="figure-contents"><div class="mediaobject"><img
src="images/user_pass_info.png" alt="Specifying password aging
options"/><div class="longdesc"><div
class="para">
<span class="guilabel"><strong>Password
Info</strong></span> pane illustration.
</div></div></div></div><h6>Figure 2.1. Specifying
password aging options</h6></div><br
class="figure-break"/></div></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Administrative_Controls">2.1.4. Administrative
Controls</h3></div></div></div><div class="para">
When administering a home machine, the user must perform some tasks as the root user or
by acquiring effective root privileges via a <em
class="firstterm">setuid</em> program, such as <code
class="command">sudo</code> or <code
class="command">su</code>. A setuid program is one that operates with
the user ID (<span class="emphasis"><em>UID</em></span>)
of the program's owner rather than the user operating the program. Such programs are
denoted by an <code class="computeroutput">s</code> in the owner
section of a long format listing, as in the following example:
</div><pre class="screen"><code
class="computeroutput">-rwsr-xr-x 1 root root 47324 May 1 08:09
/bin/su</code>
</pre><div class="note"><h2>Note</h2><div
class="para">
The <code class="computeroutput">s</code> may be upper case or
lower case. If it appears as upper case, it means that the underlying permission bit has
not been set.
</div></div><div class="para">
For the system administrators of an organization, however, choices must be made as to
how much administrative access users within the organization should have to their machine.
Through a PAM module called <code
class="filename">pam_console.so</code>, some activities normally
reserved only for the root user, such as rebooting and mounting removable media are
allowed for the first user that logs in at the physical console (refer to <a
class="xref"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)">Section 2.4, “Pluggable
Authentication Modules (PAM)”</a> for more information about the <code
class="filename">pam_console.so</code> module.) However, other
important system administration tasks, such as altering network settings, configuring a
new mouse, or mounting network devices, are not possible without administrative
privileges. As a result, system administrators must decide how much access the users
on their network should receive.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Administrative_Controls-Allowing_Root_Access">2.1.4.1. Allowing
Root Access</h4></div></div></div><a id="d0e2680"
class="indexterm"/><a id="d0e2683"
class="indexterm"/><a id="d0e2688"
class="indexterm"/><div class="para">
If the users within an organization are trusted and computer-literate, then allowing
them root access may not be an issue. Allowing root access by users means that minor
activities, like adding devices or configuring network interfaces, can be handled by the
individual users, leaving system administrators free to deal with network security and
other important issues.
</div><div class="para">
On the other hand, giving root access to individual users can lead to the following
issues:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Machine
Misconfiguration</em></span> — Users with root access can misconfigure their
machines and require assistance to resolve issues. Even worse, they might open up security
holes without knowing it.
</div></li><li><div class="para">
<span class="emphasis"><em>Running Insecure
Services</em></span> — Users with root access might run insecure servers on
their machine, such as FTP or Telnet, potentially putting usernames and passwords at risk.
These services transmit this information over the network in plain text.
</div></li><li><div class="para">
<span class="emphasis"><em>Running Email Attachments As
Root</em></span> — Although rare, email viruses that affect Linux do exist.
The only time they are a threat, however, is when they are run by the root user.
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Administrative_Controls-Disallowing_Root_Access">2.1.4.2. Disallowing
Root Access</h4></div></div></div><a id="d0e2719"
class="indexterm"/><div class="para">
If an administrator is uncomfortable allowing users to log in as root for these or
other reasons, the root password should be kept secret, and access to runlevel one or
single user mode should be disallowed through boot loader password protection (refer to
<a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-BIOS_and_Boot_Loader_Security-Boot_Loader_Passwords"
title="2.1.2.2. Boot Loader Passwords">Section 2.1.2.2, “Boot Loader
Passwords”</a> for more information on this topic.)
</div><div class="para">
<a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#tabl-Security_Guide-Disallowing_Root_Access-Methods_of_Disabling_the_Root_Account"
title="Table 2.1. Methods of Disabling the Root Account">Table 2.1, “Methods
of Disabling the Root Account”</a> describes ways that an administrator can further
ensure that root logins are disallowed:
</div><a id="d0e2732" class="indexterm"/><div
class="table"
id="tabl-Security_Guide-Disallowing_Root_Access-Methods_of_Disabling_the_Root_Account"><div
class="table-contents"><table summary="Methods of Disabling the Root
Account" border="1"><colgroup><col
width="20*"/><col width="50*"/><col
width="50*"/><col
width="50*"/></colgroup><thead><tr><th>
Method
</th><th>
Description
</th><th>
Effects
</th><th>
Does Not Affect
</th></tr></thead><tbody><tr><td>
Changing the root shell.
</td><td>
Edit the <code class="filename">/etc/passwd</code> file and
change the shell from <code class="command">/bin/bash</code> to
<code class="command">/sbin/nologin</code>.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Prevents access to the root shell and logs any such
attempts. </td></tr><tr><td> The following programs are prevented
from accessing the root account: </td></tr><tr><td> · <code
class="command">login</code></td></tr><tr><td>
· <code
class="command">gdm</code></td></tr><tr><td> ·
<code
class="command">kdm</code></td></tr><tr><td> ·
<code
class="command">xdm</code></td></tr><tr><td> ·
<code
class="command">su</code></td></tr><tr><td> ·
<code
class="command">ssh</code></td></tr><tr><td> ·
<code
class="command">scp</code></td></tr><tr><td> ·
<code
class="command">sftp</code></td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Programs that do not require a shell, such as FTP
clients, mail clients, and many setuid programs.
</td></tr><tr><td> The following programs are <span
class="emphasis"><em>not</em></span> prevented from
accessing the root account: </td></tr><tr><td> · <code
class="command">sudo</code></td></tr><tr><td> ·
FTP clients </td></tr><tr><td> · Email clients
</td></tr></table>
</td></tr><tr><td>
Disabling root access via any console device (tty).
</td><td>
An empty <code class="filename">/etc/securetty</code> file
prevents root login on any devices attached to the computer.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Prevents access to the root account via the console or
the network. The following programs are prevented from accessing the root account:
</td></tr><tr><td> · <code
class="command">login</code></td></tr><tr><td>
· <code
class="command">gdm</code></td></tr><tr><td> ·
<code
class="command">kdm</code></td></tr><tr><td> ·
<code
class="command">xdm</code></td></tr><tr><td> ·
Other network services that open a tty </td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Programs that do not log in as root, but perform
administrative tasks through setuid or other mechanisms.
</td></tr><tr><td> The following programs are <span
class="emphasis"><em>not</em></span> prevented from
accessing the root account: </td></tr><tr><td> · <code
class="command">su</code></td></tr><tr><td> ·
<code
class="command">sudo</code></td></tr><tr><td> ·
<code
class="command">ssh</code></td></tr><tr><td> ·
<code
class="command">scp</code></td></tr><tr><td> ·
<code
class="command">sftp</code></td></tr></table>
</td></tr><tr><td>
Disabling root SSH logins.
</td><td>
Edit the <code class="filename">/etc/ssh/sshd_config</code>
file and set the <code class="command">PermitRootLogin</code>
parameter to <code class="command">no</code>.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Prevents root access via the OpenSSH suite of tools.
The following programs are prevented from accessing the root account:
</td></tr><tr><td> · <code
class="command">ssh</code></td></tr><tr><td> ·
<code
class="command">scp</code></td></tr><tr><td> ·
<code
class="command">sftp</code></td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> This only prevents root access to the OpenSSH suite of
tools. </td></tr></table>
</td></tr><tr><td>
Use PAM to limit root access to services.
</td><td>
Edit the file for the target service in the <code
class="filename">/etc/pam.d/</code> directory. Make sure the <code
class="filename">pam_listfile.so</code> is required for
authentication.<sup>[<a id="d0e2941" href="#ftn.d0e2941"
class="footnote">a</a>]</sup>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Prevents root access to network services that are PAM
aware. </td></tr><tr><td> The following services are prevented
from accessing the root account: </td></tr><tr><td> · FTP clients
</td></tr><tr><td> · Email clients
</td></tr><tr><td> · <code
class="command">login</code></td></tr><tr><td>
· <code
class="command">gdm</code></td></tr><tr><td> ·
<code
class="command">kdm</code></td></tr><tr><td> ·
<code
class="command">xdm</code></td></tr><tr><td> ·
<code
class="command">ssh</code></td></tr><tr><td> ·
<code
class="command">scp</code></td></tr><tr><td> ·
<code
class="command">sftp</code></td></tr><tr><td> ·
Any PAM aware services </td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Programs and services that are not PAM aware.
</td></tr></table>
</td></tr></tbody><tbody
class="footnotes"><tr><td colspan="4"><div
class="footnote"><p><sup>[<a id="ftn.d0e2941"
href="#d0e2941" class="para">a</a>] </sup>
Refer to <a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Disallowing_Root_Access-Disabling_Root_Using_PAM"
title="2.1.4.2.4. Disabling Root Using PAM">Section 2.1.4.2.4, “Disabling
Root Using PAM”</a> for details.
</p></div></td></tr></tbody></table></div><h6>Table 2.1. Methods
of Disabling the Root Account</h6></div><br
class="table-break"/><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Disallowing_Root_Access-Disabling_the_Root_Shell">2.1.4.2.1. Disabling
the Root Shell</h5></div></div></div><div
class="para">
To prevent users from logging in directly as root, the system administrator can set
the root account's shell to <code
class="command">/sbin/nologin</code> in the <code
class="filename">/etc/passwd</code> file. This prevents access to the
root account through commands that require a shell, such as the <code
class="command">su</code> and the <code
class="command">ssh</code> commands.
</div><div
class="important"><h2>Important</h2><div
class="para">
Programs that do not require access to the shell, such as email clients or the
<code class="command">sudo</code> command, can still access the root
account.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Disallowing_Root_Access-Disabling_Root_Logins">2.1.4.2.2. Disabling
Root Logins</h5></div></div></div><a id="d0e3023"
class="indexterm"/><div class="para">
To further limit access to the root account, administrators can disable root logins
at the console by editing the <code
class="filename">/etc/securetty</code> file. This file lists all
devices the root user is allowed to log into. If the file does not exist at all, the root
user can log in through any communication device on the system, whether via the console or
a raw network interface. This is dangerous, because a user can log in to his machine as
root via Telnet, which transmits the password in plain text over the network. By default,
Fedora's <code class="filename">/etc/securetty</code> file only
allows the root user to log in at the console physically attached to the machine. To
prevent root from logging in, remove the contents of this file by typing the following
command:
</div><pre class="screen"><code
class="command">echo > /etc/securetty</code>
</pre><div class="warning"><h2>Warning</h2><div
class="para">
A blank <code class="filename">/etc/securetty</code> file does
<span class="emphasis"><em>not</em></span> prevent the
root user from logging in remotely using the OpenSSH suite of tools because the console is
not opened until after authentication.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Disallowing_Root_Access-Disabling_Root_SSH_Logins">2.1.4.2.3. Disabling
Root SSH Logins</h5></div></div></div><a id="d0e3056"
class="indexterm"/><div class="para">
To prevent root logins via the SSH protocol, edit the SSH daemon's configuration
file (<code class="filename">/etc/ssh/sshd_config</code>). Change
the line that reads:
</div><pre class="screen"><code
class="computeroutput"># PermitRootLogin yes</code>
</pre><div class="para">
to read as follows:
</div><pre class="screen"><code
class="computeroutput"> PermitRootLogin no</code>
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Disallowing_Root_Access-Disabling_Root_Using_PAM">2.1.4.2.4. Disabling
Root Using PAM</h5></div></div></div><a id="d0e3081"
class="indexterm"/><div class="para">
PAM, through the <code
class="filename">/lib/security/pam_listfile.so</code> module, allows
great flexibility in denying specific accounts. The administrator can use this module to
reference a list of users who are not allowed to log in. Below is an example of how the
module is used for the <code class="command">vsftpd</code> FTP
server in the <code class="filename">/etc/pam.d/vsftpd</code> PAM
configuration file (the <code class="computeroutput">\</code>
character at the end of the first line in the following example is <span
class="emphasis"><em>not</em></span> necessary if the
directive is on one line):
</div><pre class="screen"><code
class="computeroutput">auth required /lib/security/pam_listfile.so item=user
\ sense=deny file=/etc/vsftpd.ftpusers onerr=succeed</code>
</pre><div class="para">
This instructs PAM to consult the <code
class="filename">/etc/vsftpd.ftpusers</code> file and deny access to
the service for any listed user. The administrator can change the name of this file, and
can keep separate lists for each service or use one central list to deny access to
multiple services.
</div><div class="para">
If the administrator wants to deny access to multiple services, a similar line can be
added to the PAM configuration files, such as <code
class="filename">/etc/pam.d/pop</code> and <code
class="filename">/etc/pam.d/imap</code> for mail clients, or <code
class="filename">/etc/pam.d/ssh</code> for SSH clients.
</div><div class="para">
For more information about PAM, refer to <a class="xref"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)">Section 2.4, “Pluggable
Authentication Modules (PAM)”</a>.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Administrative_Controls-Limiting_Root_Access">2.1.4.3. Limiting
Root Access</h4></div></div></div><a id="d0e3132"
class="indexterm"/><div class="para">
Rather than completely denying access to the root user, the administrator may want to
allow access only via setuid programs, such as <code
class="command">su</code> or <code
class="command">sudo</code>.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Limiting_Root_Access-The_su_Command">2.1.4.3.1. The
<code class="command">su</code>
Command</h5></div></div></div><a id="d0e3151"
class="indexterm"/><a id="d0e3160"
class="indexterm"/><div class="para">
When a user executes the <code class="command">su</code>
command, they are prompted for the root password and, after authentication, is given a
root shell prompt.
</div><div class="para">
Once logged in via the <code class="command">su</code> command,
the user <span class="emphasis"><em>is</em></span> the
root user and has absolute administrative access to the system<sup>[<a
id="d0e3179" href="#ftn.d0e3179"
class="footnote">7</a>]</sup>. In addition, once a user has
become root, it is possible for them to use the <code
class="command">su</code> command to change to any other user on the
system without being prompted for a password.
</div><div class="para">
Because this program is so powerful, administrators within an organization may wish
to limit who has access to the command.
</div><div class="para">
One of the simplest ways to do this is to add users to the special administrative
group called <em class="firstterm">wheel</em>. To do this, type the
following command as root:
</div><pre class="screen"><code
class="command">usermod -G wheel <em
class="replaceable"><code><username></code></em></code>
</pre><div class="para">
In the previous command, replace <em
class="replaceable"><code><username></code></em>
with the username you want to add to the <code
class="command">wheel</code> group.
</div><a id="d0e3207" class="indexterm"/><div
class="para">
You can also use the <span class="application"><strong>User
Manager</strong></span> to modify group memberships, as follows. Note: you
need Administrator privileges to perform this procedure.
</div><div class="procedure"><ol
class="1"><li><div class="para">
Click the <span
class="guimenu"><strong>System</strong></span> menu on the
Panel, point to <span
class="guisubmenu"><strong>Administration</strong></span>
and then click <span class="guimenuitem"><strong>Users and
Groups</strong></span> to display the User Manager. Alternatively, type the
command <code class="command">system-config-users</code> at a shell
prompt.
</div></li><li><div class="para">
Click the <span
class="guilabel"><strong>Users</strong></span> tab, and
select the required user in the list of users.
</div></li><li><div class="para">
Click <span
class="guibutton"><strong>Properties</strong></span> on the
toolbar to display the User Properties dialog box (or choose <span
class="guimenuitem"><strong>Properties</strong></span> on
the <span class="guimenu"><strong>File</strong></span>
menu).
</div></li><li><div class="para">
Click the <span
class="guilabel"><strong>Groups</strong></span> tab, select
the check box for the wheel group, and then click <span
class="guibutton"><strong>OK</strong></span>. Refer to
<a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#figu-Security_Guide-The_su_Command-Adding_users_to_the_wheel_group."
title="Figure 2.2. Adding users to the "wheel"
group.">Figure 2.2, “Adding users to the "wheel" group.”</a>.
</div></li><li><div class="para">
Open the PAM configuration file for <code
class="command">su</code> (<code
class="filename">/etc/pam.d/su</code>) in a text editor and remove the
comment <span class="keycap"><strong>#</strong></span>
from the following line:
</div><pre class="screen">auth required
/lib/security/$ISA/pam_wheel.so use_uid
</pre><div class="para">
This change means that only members of the administrative group <code
class="computeroutput">wheel</code> can use this program.
</div></li></ol></div><div class="figure"
id="figu-Security_Guide-The_su_Command-Adding_users_to_the_wheel_group."><div
class="figure-contents"><div class="mediaobject"><img
src="images/user_pass_groups.png" alt="Adding users to the
"wheel" group."/><div class="longdesc"><div
class="para">
<span
class="guilabel"><strong>Groups</strong></span> pane
illustration
</div></div></div></div><h6>Figure 2.2. Adding users
to the "wheel" group.</h6></div><br
class="figure-break"/><div
class="note"><h2>Note</h2><div class="para">
The root user is part of the <code
class="computeroutput">wheel</code> group by default.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Limiting_Root_Access-The_sudo_Command">2.1.4.3.2. The
<code class="command">sudo</code>
Command</h5></div></div></div><a id="d0e3311"
class="indexterm"/><a id="d0e3320"
class="indexterm"/><div class="para">
The <code class="command">sudo</code> command offers another
approach to giving users administrative access. When trusted users precede an
administrative command with <code class="command">sudo</code>, they
are prompted for <span class="emphasis"><em>their
own</em></span> password. Then, when they have been authenticated and assuming
that the command is permitted, the administrative command is executed as if they were the
root user.
</div><div class="para">
The basic format of the <code class="command">sudo</code>
command is as follows:
</div><pre class="screen"><code
class="command">sudo <em
class="replaceable"><code><command></code></em></code>
</pre><div class="para">
In the above example, <em
class="replaceable"><code><command></code></em>
would be replaced by a command normally reserved for the root user, such as <code
class="command">mount</code>.
</div><div
class="important"><h2>Important</h2><div
class="para">
Users of the <code class="command">sudo</code> command should
take extra care to log out before walking away from their machines since sudoers can use
the command again without being asked for a password within a five minute period. This
setting can be altered via the configuration file, <code
class="filename">/etc/sudoers</code>.
</div></div><div class="para">
The <code class="command">sudo</code> command allows for a high
degree of flexibility. For instance, only users listed in the <code
class="filename">/etc/sudoers</code> configuration file are allowed to
use the <code class="command">sudo</code> command and the command is
executed in <span class="emphasis"><em>the
user's</em></span> shell, not a root shell. This means the root shell can
be completely disabled, as shown in <a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Disallowing_Root_Access-Disabling_the_Root_Shell"
title="2.1.4.2.1. Disabling the Root Shell">Section 2.1.4.2.1, “Disabling the
Root Shell”</a>.
</div><div class="para">
The <code class="command">sudo</code> command also provides a
comprehensive audit trail. Each successful authentication is logged to the file <code
class="filename">/var/log/messages</code> and the command issued along
with the issuer's user name is logged to the file <code
class="filename">/var/log/secure</code>.
</div><div class="para">
Another advantage of the <code class="command">sudo</code>
command is that an administrator can allow different users access to specific commands
based on their needs.
</div><div class="para">
Administrators wanting to edit the <code
class="command">sudo</code> configuration file, <code
class="filename">/etc/sudoers</code>, should use the <code
class="command">visudo</code> command.
</div><div class="para">
To give someone full administrative privileges, type <code
class="command">visudo</code> and add a line similar to the following
in the user privilege specification section:
</div><pre class="screen"><code
class="command">juan ALL=(ALL) ALL</code>
</pre><div class="para">
This example states that the user, <code
class="computeroutput">juan</code>, can use <code
class="command">sudo</code> from any host and execute any command.
</div><div class="para">
The example below illustrates the granularity possible when configuring <code
class="command">sudo</code>:
</div><pre class="screen"><code
class="command">%users localhost=/sbin/shutdown -h now</code>
</pre><div class="para">
This example states that any user can issue the command <code
class="command">/sbin/shutdown -h now</code> as long as it is issued
from the console.
</div><div class="para">
The man page for <code class="filename">sudoers</code> has a
detailed listing of options for this file.
</div></div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Available_Network_Services">2.1.5. Available
Network Services</h3></div></div></div><a
id="d0e3449" class="indexterm"/><div class="para">
While user access to administrative controls is an important issue for system
administrators within an organization, monitoring which network services are active is of
paramount importance to anyone who administers and operates a Linux system.
</div><div class="para">
Many services under Fedora behave as network servers. If a network service is running
on a machine, then a server application (called a <em
class="firstterm">daemon</em>), is listening for connections on one or
more network ports. Each of these servers should be treated as a potential avenue of
attack.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Available_Network_Services-Risks_To_Services">2.1.5.1. Risks
To Services</h4></div></div></div><a id="d0e3462"
class="indexterm"/><a id="d0e3467"
class="indexterm"/><a id="d0e3474"
class="indexterm"/><a id="d0e3481"
class="indexterm"/><div class="para">
Network services can pose many risks for Linux systems. Below is a list of some of the
primary issues:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Denial of Service Attacks
(DoS)</em></span> — By flooding a service with requests, a denial of service
attack can render a system unusable as it tries to log and answer each request.
</div></li><li><div class="para">
<span class="emphasis"><em>Script Vulnerability
Attacks</em></span> — If a server is using scripts to execute server-side
actions, as Web servers commonly do, a cracker can attack improperly written scripts.
These script vulnerability attacks can lead to a buffer overflow condition or allow the
attacker to alter files on the system.
</div></li><li><div class="para">
<span class="emphasis"><em>Buffer Overflow
Attacks</em></span> — Services that connect to ports numbered 0 through 1023
must run as an administrative user. If the application has an exploitable buffer overflow,
an attacker could gain access to the system as the user running the daemon. Because
exploitable buffer overflows exist, crackers use automated tools to identify systems with
vulnerabilities, and once they have gained access, they use automated rootkits to maintain
their access to the system.
</div></li></ul></div><a id="d0e3509"
class="indexterm"/><div
class="note"><h2>Note</h2><div class="para">
The threat of buffer overflow vulnerabilities is mitigated in Fedora by <em
class="firstterm">ExecShield</em>, an executable memory segmentation
and protection technology supported by x86-compatible uni- and multi-processor kernels.
ExecShield reduces the risk of buffer overflow by separating virtual memory into
executable and non-executable segments. Any program code that tries to execute outside of
the executable segment (such as malicious code injected from a buffer overflow exploit)
triggers a segmentation fault and terminates.
</div><div class="para">
Execshield also includes support for <em class="firstterm">No
eXecute</em> (<acronym class="acronym">NX</acronym>)
technology on AMD64 platforms and <em class="firstterm">eXecute
Disable</em> (<acronym class="acronym">XD</acronym>)
technology on Itanium and <span class="trademark">Intel</span>® 64
systems. These technologies work in conjunction with ExecShield to prevent malicious code
from running in the executable portion of virtual memory with a granularity of 4KB of
executable code, lowering the risk of attack from stealthy buffer overflow exploits.
</div></div><div
class="tip"><h2>Tip</h2><div class="para">
To limit exposure to attacks over the network, all services that are unused should be
turned off.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Available_Network_Services-Identifying_and_Configuring_Services">2.1.5.2. Identifying
and Configuring Services</h4></div></div></div><a
id="d0e3549" class="indexterm"/><a id="d0e3554"
class="indexterm"/><a id="d0e3558"
class="indexterm"/><a id="d0e3562"
class="indexterm"/><a id="d0e3566"
class="indexterm"/><a id="d0e3570"
class="indexterm"/><a id="d0e3574"
class="indexterm"/><div class="para">
To enhance security, most network services installed with Fedora are turned off by
default. There are, however, some notable exceptions:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">cupsd</code> — The default print server
for Fedora.
</div></li><li><div class="para">
<code class="command">lpd</code> — An alternative print
server.
</div></li><li><div class="para">
<code class="command">xinetd</code> — A super server that
controls connections to a range of subordinate servers, such as <code
class="command">gssftp</code> and <code
class="command">telnet</code>.
</div></li><li><div class="para">
<code class="command">sendmail</code> — The Sendmail <em
class="firstterm">Mail Transport Agent</em> (<abbr
class="abbrev">MTA</abbr>) is enabled by default, but only listens for
connections from the <span class="interface">localhost</span>.
</div></li><li><div class="para">
<code class="command">sshd</code> — The OpenSSH server, which
is a secure replacement for Telnet.
</div></li></ul></div><div class="para">
When determining whether to leave these services running, it is best to use common
sense and err on the side of caution. For example, if a printer is not available, do not
leave <code class="command">cupsd</code> running. The same is true
for <code class="command">portmap</code>. If you do not mount NFSv3
volumes or use NIS (the <code class="command">ypbind</code>
service), then <code class="command">portmap</code> should be
disabled.
</div><a id="d0e3640" class="indexterm"/><div
class="figure"
id="figu-Security_Guide-Identifying_and_Configuring_Services-Services_Configuration_Tool"><div
class="figure-contents"><div class="mediaobject"><img
src="images/serv-config.png" alt="Services Configuration
Tool"/><div class="longdesc"><div class="para">
<span class="application"><strong>Services Configuration
Tool</strong></span> illustration
</div></div></div></div><h6>Figure 2.3. <span
class="application">Services Configuration
Tool</span></h6></div><br class="figure-break"/><div
class="para">
If unsure of the purpose for a particular service, the <span
class="application"><strong>Services Configuration
Tool</strong></span> has a description field, illustrated in <a
class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#figu-Security_Guide-Identifying_and_Configuring_Services-Services_Configuration_Tool"
title="Figure 2.3. Services Configuration Tool">Figure 2.3, “Services
Configuration Tool”</a>, that provides additional information.
</div><div class="para">
Checking which network services are available to start at boot time is only part of
the story. You should also check which ports are open and listening. Refer to <a
class="xref"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"
title="2.2.8. Verifying Which Ports Are Listening">Section 2.2.8, “Verifying
Which Ports Are Listening”</a> for more information.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Available_Network_Services-Insecure_Services">2.1.5.3. Insecure
Services</h4></div></div></div><a id="d0e3671"
class="indexterm"/><div class="para">
Potentially, any network service is insecure. This is why turning off unused services
is so important. Exploits for services are routinely revealed and patched, making it very
important to regularly update packages associated with any network service. Refer to <a
class="xref" href="sect-Security_Guide-Security_Updates.html"
title="1.5. Security Updates">Section 1.5, “Security Updates”</a> for
more information.
</div><div class="para">
Some network protocols are inherently more insecure than others. These include any
services that:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Transmit Usernames and Passwords
Over a Network Unencrypted</em></span> — Many older protocols, such as Telnet
and FTP, do not encrypt the authentication session and should be avoided whenever
possible.
</div></li><li><div class="para">
<span class="emphasis"><em>Transmit Sensitive Data Over a
Network Unencrypted</em></span> — Many protocols transmit data over the
network unencrypted. These protocols include Telnet, FTP, HTTP, and SMTP. Many network
file systems, such as NFS and SMB, also transmit information over the network unencrypted.
It is the user's responsibility when using these protocols to limit what type of data
is transmitted.
</div><div class="para">
Remote memory dump services, like <code
class="command">netdump</code>, transmit the contents of memory over
the network unencrypted. Memory dumps can contain passwords or, even worse, database
entries and other sensitive information.
</div><div class="para">
Other services like <code class="command">finger</code> and
<code class="command">rwhod</code> reveal information about users of
the system.
</div></li></ul></div><div class="para">
Examples of inherently insecure services include <code
class="command">rlogin</code>, <code
class="command">rsh</code>, <code
class="command">telnet</code>, and <code
class="command">vsftpd</code>.
</div><a id="d0e3720" class="indexterm"/><a
id="d0e3725" class="indexterm"/><a id="d0e3730"
class="indexterm"/><div class="para">
All remote login and shell programs (<code
class="command">rlogin</code>, <code
class="command">rsh</code>, and <code
class="command">telnet</code>) should be avoided in favor of SSH. Refer
to <a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Security_Enhanced_Communication_Tools"
title="2.1.7. Security Enhanced Communication Tools">Section 2.1.7, “Security
Enhanced Communication Tools”</a> for more information about <code
class="command">sshd</code>.
</div><div class="para">
FTP is not as inherently dangerous to the security of the system as remote shells, but
FTP servers must be carefully configured and monitored to avoid problems. Refer to <a
class="xref"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP">Section 2.2.6, “Securing FTP”</a> for more
information about securing FTP servers.
</div><div class="para">
Services that should be carefully implemented and behind a firewall include:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">finger</code>
</div></li><li><div class="para">
<code class="command">authd</code> (this was called <code
class="command">identd</code> in previous Fedora releases.)
</div></li><li><div class="para">
<code class="command">netdump</code>
</div></li><li><div class="para">
<code class="command">netdump-server</code>
</div></li><li><div class="para">
<code class="command">nfs</code>
</div></li><li><div class="para">
<code class="command">rwhod</code>
</div></li><li><div class="para">
<code class="command">sendmail</code>
</div></li><li><div class="para">
<code class="command">smb</code> (Samba)
</div></li><li><div class="para">
<code class="command">yppasswdd</code>
</div></li><li><div class="para">
<code class="command">ypserv</code>
</div></li><li><div class="para">
<code class="command">ypxfrd</code>
</div></li></ul></div><div class="para">
More information on securing network services is available in <a
class="xref" href="sect-Security_Guide-Server_Security.html"
title="2.2. Server Security">Section 2.2, “Server Security”</a>.
</div><div class="para">
The next section discusses tools available to set up a simple firewall.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Personal_Firewalls">2.1.6. Personal
Firewalls</h3></div></div></div><a id="d0e3836"
class="indexterm"/><div class="para">
After the <span
class="emphasis"><em>necessary</em></span> network services
are configured, it is important to implement a firewall.
</div><div class="important"><h2>Important</h2><div
class="para">
You should configure the necessary services and implement a firewall <span
class="emphasis"><em>before</em></span> connecting to the
Internet or any other network that you do not trust.
</div></div><div class="para">
Firewalls prevent network packets from accessing the system's network interface. If
a request is made to a port that is blocked by a firewall, the request is ignored. If a
service is listening on one of these blocked ports, it does not receive the packets and is
effectively disabled. For this reason, care should be taken when configuring a firewall to
block access to ports not in use, while not blocking access to ports used by configured
services.
</div><div class="para">
For most users, the best tool for configuring a simple firewall is the graphical
firewall configuration tool which ships with Fedora: the <span
class="application"><strong>Security Level Configuration
Tool</strong></span> (<code
class="command">system-config-securitylevel</code>). This tool creates
broad <code class="command">iptables</code> rules for a
general-purpose firewall using a control panel interface.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration">Section 2.8.2, “Basic Firewall
Configuration”</a> for more information about using this application and its
available options.
</div><div class="para">
For advanced users and server administrators, manually configuring a firewall with
<code class="command">iptables</code> is probably a better option.
Refer to <a class="xref" href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls">Section 2.8, “Firewalls”</a> for more
information. Refer to <a class="xref"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables">Section 2.9, “IPTables”</a> for a comprehensive
guide to the <code class="command">iptables</code> command.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Workstation_Security-Security_Enhanced_Communication_Tools">2.1.7. Security
Enhanced Communication Tools</h3></div></div></div><a
id="d0e3886" class="indexterm"/><a id="d0e3891"
class="indexterm"/><a id="d0e3898"
class="indexterm"/><div class="para">
As the size and popularity of the Internet has grown, so has the threat of
communication interception. Over the years, tools have been developed to encrypt
communications as they are transferred over the network.
</div><div class="para">
Fedora ships with two basic tools that use high-level, public-key-cryptography-based
encryption algorithms to protect information as it travels over the network.
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>OpenSSH</em></span> — A
free implementation of the SSH protocol for encrypting network communication.
</div></li><li><div class="para">
<span class="emphasis"><em>Gnu Privacy Guard
(GPG)</em></span> — A free implementation of the PGP (Pretty Good Privacy)
encryption application for encrypting data.
</div></li></ul></div><a id="d0e3922"
class="indexterm"/><a id="d0e3925"
class="indexterm"/><a id="d0e3931"
class="indexterm"/><a id="d0e3937"
class="indexterm"/><div class="para">
OpenSSH is a safer way to access a remote machine and replaces older, unencrypted
services like <code class="command">telnet</code> and <code
class="command">rsh</code>. OpenSSH includes a network service called
<code class="command">sshd</code> and three command line client
applications:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">ssh</code> — A secure remote console
access client.
</div></li><li><div class="para">
<code class="command">scp</code> — A secure remote copy
command.
</div></li><li><div class="para">
<code class="command">sftp</code> — A secure pseudo-ftp client
that allows interactive file transfer sessions.
</div></li></ul></div><div
class="important"><h2>Important</h2><div
class="para">
Although the <code class="command">sshd</code> service is
inherently secure, the service <span
class="emphasis"><em>must</em></span> be kept up-to-date to
prevent security threats. Refer to <a class="xref"
href="sect-Security_Guide-Security_Updates.html" title="1.5. Security
Updates">Section 1.5, “Security Updates”</a> for more information.
</div></div><div class="para">
GPG is one way to ensure private email communication. It can be used both to email
sensitive data over public networks and to protect sensitive data on hard drives.
</div></div></div><div
class="footnotes"><br/><hr/><div
class="footnote"><p><sup>[<a id="ftn.d0e1882"
href="#d0e1882" class="para">5</a>] </sup>
Since system BIOSes differ between manufacturers, some may not support password
protection of either type, while others may support one type but not the other.
</p></div><div class="footnote"><p><sup>[<a
id="ftn.d0e2021" href="#d0e2021"
class="para">6</a>] </sup>
GRUB also accepts unencrypted passwords, but it is recommended that an MD5 hash be
used for added security.
</p></div><div
class="footnote"><p><sup>[<a id="ftn.d0e3179"
href="#d0e3179" class="para">7</a>] </sup>
This access is still subject to the restrictions imposed by SELinux, if it is
enabled.
</p></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Security_Updates.html"><strong>Prev</strong>1.5. Security
Updates</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security.html"><strong>Next</strong>2.2. Server
Security</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-Security_Overview.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Overview</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="We_Need_Feedback.html" title="2. We Need Feedback!"/><link
rel="next" href="sect-Security_Guide-Vulnerability_Assessment.html"
title="1.2. Vulnerability Assessment"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="We_Need_Feedback.html"><stro
ng>Prev</strong></a></li><li class="next"><a
accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-Security_Overview">Chapter 1. Security
Overview</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security">1.1.
Introduction to
Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security-What_is_Computer_Security">1.1.1.
What is Computer Security?</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security-Security_Controls">1.1.2.
Security Controls</a></span></dt><dt><span
class="section"><a href="chap-Security_Guide-Security_Overview.html#
sect-Security_Guide-Introduction_to_Security-Conclusion">1.1.3.
Conclusion</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment.html">1.2. Vulnerability
Assessment</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment.html#sect-Security_Guide-Vulnerability_Assessment-Thinking_Like_the_Enemy">1.2.1.
Thinking Like the Enemy</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html">1.2.2.
Defining Assessment and Testing</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html">1.2.3.
Evaluating the
Tools</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html">1.3. Attackers
and
Vulnerabilities</a></span></dt><dd><dl><dt><span
class="section"><a href="sect-Security_Guide-Attackers_and
_Vulnerabilities.html#sect-Security_Guide-Attackers_and_Vulnerabilities-A_Quick_History_of_Hackers">1.3.1.
A Quick History of Hackers</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html">1.3.2.
Threats to Network Security</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html">1.3.3.
Threats to Server Security</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html">1.3.4.
Threats to Workstation and Home PC
Security</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Common_Exploits_and_Attacks.html">1.4. Common
Exploits and Attacks</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Security_Updates.html">1.5. Security
Updates</a></span></dt><dd><dl><dt><span
class="section"><a href
="sect-Security_Guide-Security_Updates.html#sect-Security_Guide-Security_Updates-Updating_Packages">1.5.1.
Updating
Packages</a></span></dt></dl></dd></dl></div><a
id="d0e390" class="indexterm"/><a id="d0e393"
class="indexterm"/><div class="para">
Because of the increased reliance on powerful, networked computers to help run
businesses and keep track of our personal information, industries have been formed around
the practice of network and computer security. Enterprises have solicited the knowledge
and skills of security experts to properly audit systems and tailor solutions to fit the
operating requirements of the organization. Because most organizations are dynamic in
nature, with workers accessing company IT resources locally and remotely, the need for
secure computing environments has become more pronounced.
</div><div class="para">
Unfortunately, most organizations (as well as individual users) regard security as an
afterthought, a process that is overlooked in favor of increased power, productivity, and
budgetary concerns. Proper security implementation is often enacted <em
class="firstterm">postmortem</em> — after an unauthorized intrusion has
already occurred. Security experts agree that the right measures taken prior to connecting
a site to an untrusted network, such as the Internet, is an effective means of thwarting
most attempts at intrusion.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Introduction_to_Security">1.1. Introduction to
Security</h2></div></div></div><a id="d0e406"
class="indexterm"/><a id="d0e409"
class="indexterm"/><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Introduction_to_Security-What_is_Computer_Security">1.1.1. What
is Computer Security?</h3></div></div></div><a
id="d0e415" class="indexterm"/><div class="para">
Computer security is a general term that covers a wide area of computing and
information processing. Industries that depend on computer systems and networks to conduct
daily business transactions and access crucial information regard their data as an
important part of their overall assets. Several terms and metrics have entered our daily
business vocabulary, such as total cost of ownership (TCO) and quality of service (QoS).
In these metrics, industries calculate aspects such as data integrity and
high-availability as part of their planning and process management costs. In some
industries, such as electronic commerce, the availability and trustworthiness of data can
be the difference between success and failure.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-What_is_Computer_Security-How_did_Computer_Security_Come_about">1.1.1.1. How
did Computer Security Come about?</h4></div></div></div><a
id="d0e425" class="indexterm"/><div class="para">
Information security has evolved over the years due to the increasing reliance on
public networks not to disclose personal, financial, and other restricted information.
There are numerous instances such as the Mitnick and the Vladimir Levin cases that
prompted organizations across all industries to rethink the way they handle information
transmission and disclosure. The popularity of the Internet was one of the most important
developments that prompted an intensified effort in data security.
</div><div class="para">
An ever-growing number of people are using their personal computers to gain access to
the resources that the Internet has to offer. From research and information retrieval to
electronic mail and commerce transaction, the Internet has been regarded as one of the
most important developments of the 20th century.
</div><div class="para">
The Internet and its earlier protocols, however, were developed as a <em
class="firstterm">trust-based</em> system. That is, the Internet
Protocol was not designed to be secure in itself. There are no approved security standards
built into the TCP/IP communications stack, leaving it open to potentially malicious users
and processes across the network. Modern developments have made Internet communication
more secure, but there are still several incidents that gain national attention and alert
us to the fact that nothing is completely safe.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-What_is_Computer_Security-Security_Today">1.1.1.2. Security
Today</h4></div></div></div><a id="d0e442"
class="indexterm"/><a id="d0e447"
class="indexterm"/><a id="d0e452"
class="indexterm"/><a id="d0e457"
class="indexterm"/><div class="para">
In February of 2000, a Distributed Denial of Service (DDoS) attack was unleashed on
several of the most heavily-trafficked sites on the Internet. The attack rendered
yahoo.com,
cnn.com,
amazon.com,
fbi.gov, and several other sites completely unreachable to
normal users, as it tied up routers for several hours with large-byte ICMP packet
transfers, also called a <em class="firstterm">ping flood</em>. The
attack was brought on by unknown assailants using specially created, widely available
programs that scanned vulnerable network servers, installed client applications called
<em class="firstterm">trojans</em> on the servers, and timed an
attack with every infected server flooding the victim sites and rendering them
unavailable. Many blame the attack on fundamental flaws in the way routers and the
protocols used are structured to accept all incoming data, no matter where or for what
purpose the packets are sent.
</div><div class="para">
Currently, an estimated 945 million people use or have used the Internet worldwide
(Computer Industry Almanac, 2004). At the same time:
</div><div class="itemizedlist"><ul><li><div
class="para">
On any given day, there are approximately 225 major incidences of security breach
reported to the CERT Coordination Center at Carnegie Mellon University.<sup>[<a
id="d0e476" href="#ftn.d0e476"
class="footnote">1</a>]</sup>
</div></li><li><div class="para">
In 2003, the number of CERT reported incidences jumped to 137,529 from 82,094 in
2002 and from 52,658 in 2001.<sup>[<a id="d0e486"
href="#ftn.d0e486" class="footnote">2</a>]</sup>
</div></li><li><div class="para">
The worldwide economic impact of the three most dangerous Internet Viruses of the
last three years was estimated at US$13.2 Billion.<sup>[<a id="d0e496"
href="#ftn.d0e496" class="footnote">3</a>]</sup>
</div></li></ul></div><div class="para">
Computer security has become a quantifiable and justifiable expense for all IT
budgets. Organizations that require data integrity and high availability elicit the skills
of system administrators, developers, and engineers to ensure 24x7 reliability of their
systems, services, and information. Falling victim to malicious users, processes, or
coordinated attacks is a direct threat to the success of the organization.
</div><div class="para">
Unfortunately, system and network security can be a difficult proposition, requiring
an intricate knowledge of how an organization regards, uses, manipulates, and transmits
its information. Understanding the way an organization (and the people that make up the
organization) conducts business is paramount to implementing a proper security plan.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-What_is_Computer_Security-Standardizing_Security">1.1.1.3. Standardizing
Security</h4></div></div></div><div class="para">
Enterprises in every industry rely on regulations and rules that are set by standards
making bodies such as the American Medical Association (AMA) or the Institute of
Electrical and Electronics Engineers (IEEE). The same ideals hold true for information
security. Many security consultants and vendors agree upon the standard security model
known as CIA, or <em class="firstterm">Confidentiality, Integrity, and
Availability</em>. This three-tiered model is a generally accepted component to
assessing risks of sensitive information and establishing security policy. The following
describes the CIA model in further detail:
</div><div class="itemizedlist"><ul><li><div
class="para">
Confidentiality — Sensitive information must be available only to a set of
pre-defined individuals. Unauthorized transmission and usage of information should be
restricted. For example, confidentiality of information ensures that a customer's
personal or financial information is not obtained by an unauthorized individual for
malicious purposes such as identity theft or credit fraud.
</div></li><li><div class="para">
Integrity — Information should not be altered in ways that render it incomplete or
incorrect. Unauthorized users should be restricted from the ability to modify or destroy
sensitive information.
</div></li><li><div class="para">
Availability — Information should be accessible to authorized users any time that it
is needed. Availability is a warranty that information can be obtained with an agreed-upon
frequency and timeliness. This is often measured in terms of percentages and agreed to
formally in Service Level Agreements (SLAs) used by network service providers and their
enterprise clients.
</div></li></ul></div></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Introduction_to_Security-Security_Controls">1.1.2. Security
Controls</h3></div></div></div><a id="d0e528"
class="indexterm"/><a id="d0e535"
class="indexterm"/><div class="para">
Computer security is often divided into three distinct master categories, commonly
referred to as <em class="wordasword">controls</em>:
</div><div class="itemizedlist"><ul><li><div
class="para">
Physical
</div></li><li><div class="para">
Technical
</div></li><li><div class="para">
Administrative
</div></li></ul></div><div class="para">
These three broad categories define the main objectives of proper security
implementation. Within these controls are sub-categories that further detail the controls
and how to implement them.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Security_Controls-Physical_Controls">1.1.2.1. Physical
Controls</h4></div></div></div><a id="d0e558"
class="indexterm"/><div class="para">
Physical control is the implementation of security measures in a defined structure
used to deter or prevent unauthorized access to sensitive material. Examples of physical
controls are:
</div><div class="itemizedlist"><ul><li><div
class="para">
Closed-circuit surveillance cameras
</div></li><li><div class="para">
Motion or thermal alarm systems
</div></li><li><div class="para">
Security guards
</div></li><li><div class="para">
Picture IDs
</div></li><li><div class="para">
Locked and dead-bolted steel doors
</div></li><li><div class="para">
Biometrics (includes fingerprint, voice, face, iris, handwriting, and other
automated methods used to recognize individuals)
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Security_Controls-Technical_Controls">1.1.2.2. Technical
Controls</h4></div></div></div><a id="d0e587"
class="indexterm"/><div class="para">
Technical controls use technology as a basis for controlling the access and usage of
sensitive data throughout a physical structure and over a network. Technical controls are
far-reaching in scope and encompass such technologies as:
</div><div class="itemizedlist"><ul><li><div
class="para">
Encryption
</div></li><li><div class="para">
Smart cards
</div></li><li><div class="para">
Network authentication
</div></li><li><div class="para">
Access control lists (ACLs)
</div></li><li><div class="para">
File integrity auditing software
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Security_Controls-Administrative_Controls">1.1.2.3. Administrative
Controls</h4></div></div></div><a id="d0e613"
class="indexterm"/><div class="para">
Administrative controls define the human factors of security. It involves all levels
of personnel within an organization and determines which users have access to what
resources and information by such means as:
</div><div class="itemizedlist"><ul><li><div
class="para">
Training and awareness
</div></li><li><div class="para">
Disaster preparedness and recovery plans
</div></li><li><div class="para">
Personnel recruitment and separation strategies
</div></li><li><div class="para">
Personnel registration and accounting
</div></li></ul></div></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Introduction_to_Security-Conclusion">1.1.3. Conclusion</h3></div></div></div><a
id="d0e636" class="indexterm"/><div class="para">
Now that you have learned about the origins, reasons, and aspects of security, you can
determine the appropriate course of action with regard to Fedora. It is important to know
what factors and conditions make up security in order to plan and implement a proper
strategy. With this information in mind, the process can be formalized and the path
becomes clearer as you delve deeper into the specifics of the security process.
</div></div></div><div
class="footnotes"><br/><hr/><div
class="footnote"><p><sup>[<a id="ftn.d0e476"
href="#d0e476" class="para">1</a>] </sup>
Source: <a
href="http://www.cert.org">http://www.cert.org</a>
</p></div><div
class="footnote"><p><sup>[<a id="ftn.d0e486"
href="#d0e486" class="para">2</a>] </sup>
Source: <a
href="http://www.cert.org/stats/">http://www.cert.org/stats/...
</p></div><div
class="footnote"><p><sup>[<a id="ftn.d0e496"
href="#d0e496" class="para">3</a>] </sup>
Source: <a
href="http://www.newsfactor.com/perl/story/16407.html">http:...
</p></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="We_Need_Feedback.html"><strong>Prev</strong>2. We Need
Feedback!</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment.html"><strong>Next</strong>1.2. Vulnerability
Assessment</a></li></ul></body></html>
--- NEW FILE chap-Security_Guide-Software_Maintenance.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Maintenance</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"
title="5.2. Utilize LUKS Partition Encryption"/><link rel="next"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"
title="6.2. Plan and Configure Security
Updates"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt=
"Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"><strong>Next</strong></a></li></ul><div
class="chapter" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="chap-Security_Guide-Software_Maintenance">Chapter 6. Software
Maintenance</h2></div></div></div><div
class="toc"><dl><dt><span class="section"><a
href="chap-Security_Guide-Software_Maintenance.html#sect-Security_Guide-Software_Maintenance-Install_Minimal_Software">6.1.
Install Minimal Software</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html">6.2.
Plan and Configure Security Updates</a></span></dt><dt><span
class="section"><a href="sect-Security_Guid
e-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html">6.3.
Adjusting Automatic Updates</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html">6.4.
Install Signed Packages from Well Known
Repositories</a></span></dt></dl></div><div
class="para">
Software maintenance is extremely important to maintaining a secure system. It is vital
to patch software as soon as it becomes available in order to prevent attackers from using
known holes to infiltrate your system.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Software_Maintenance-Install_Minimal_Software">6.1. Install
Minimal Software</h2></div></div></div><div
class="para">
It is best practice to install only the packages you will use because each piece of
software on your computer could possibly contain a vulnerability. If you are installing
from the DVD media take the opportunity to select exactly what packages you want to
install during the installation. When you find you need another package, you can always
add it to the system later.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html"><strong>Prev</strong>5.2. Utilize
LUKS Partition Encryption</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"><strong>Next</strong>6.2. Plan
and Configure Security Updates</a></li></ul></body></html>
--- NEW FILE index.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Security Guide</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><meta
name="description" content="The Linux Security Guide is designed to assist
users of Linux in learning the processes and practices of securing workstations and
servers against local and remote intrusion, exploitation, and malicious activity. The
Linux Security Guide details the planning and the tools involved in creating a secured
computing environment for the data center, workplace, and home. With proper administrative
knowledge, vigilance, and tools, systems running Linux can be both fully functional and
secured from most common intrusion and exploit methods."/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="next"
href="pref-Security_Guide-Preface.html" title="Pref
ace"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"/><li class="next"><a
accesskey="n"
href="pref-Security_Guide-Preface.html"><strong>Next</strong></a></li></ul><div
class="book" lang="en-US"><div
class="titlepage"><div><div
class="producttitle"><span
class="productname">fedora</span> <span
class="productnumber">10</span></div><div><h1
id="d0e1" class="title">Linux Security
Guide</h1></div><div><h2 class="subtitle">A Guide to
Securing Linux</h2></div><p class="edition">Edition
1.0</p><div><h3 class="corpauthor">
<span class="inlinemediaobject"><object
type="image/svg+xml"
data="Common_Content/images/title_logo.svg"/></span>
</h3></div><div><div class="authorgroup"><div
class="author"><h3 class="author"><span
class="firstname">Johnray</span> <span
class="surname">Fuller</span></h3><div
class="affiliation"><span class="orgname">Red
Hat</span></div><code class="email"><a
class="email"
href="mailto:jrfuller@redhat.com">jrfuller@redhat.com</a></code></div><div
class="author"><h3 class="author"><span
class="firstname">John</span> <span
class="surname">Ha</span></h3><div
class="affiliation"><span class="orgname">Red
Hat</span></div><code class="email"><a
class="email"
href="mailto:jha@redhat.com">jha@redhat.com</a></code></div><div
class="author"><h3 class="author"><span
class="firstname">David</span> <span
class="surname">O'Brien</span></h3><div
class="affiliation"><span class="orgname">Red
Hat</span></div><code class="email"><a
class="email"
href="mailto:daobrien@redhat.com">daobrien@redhat.com</a></code></div><div
class="author"><h3 class="author"><span
class="firstname">Eric</span> <span class="
surname">Christensen</span></h3><div
class="affiliation"><span class="orgname">Fedora
Project</span> <span class="orgdiv">Documentation
Team</span></div><code class="email"><a
class="email"
href="mailto:sparks@fedoraproject.org">sparks@fedoraproject.org</a></code></div></div></div><hr/><div><div
id="d0e27" class="legalnotice"><h1
class="legalnotice">Legal Notice</h1><div
class="para">
Copyright <span class="trademark"/>© 2008 Red Hat, Inc. This material
may only be distributed subject to the terms and conditions set forth in the Open
Publication License, V1.0, (the latest version is presently available at <a
href="http://www.opencontent.org/openpub/">http://www.openco...>).
</div><div class="para">
Fedora and the Fedora Infinity Design logo are trademarks or registered trademarks of
Red Hat, Inc., in the U.S. and other countries.
</div><div class="para">
Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat
Inc. in the United States and other countries.
</div><div class="para">
All other trademarks and copyrights referred to are the property of their respective
owners.
</div><div class="para">
Documentation, as with software itself, may be subject to export control. Read about
Fedora Project export controls at <a
href="http://fedoraproject.org/wiki/Legal/Export">http://fed...;.
</div></div></div><div><div
class="abstract"><h6>Abstract</h6><div
class="para">The Linux Security Guide is designed to assist users of Linux
in
learning the processes and practices of securing workstations and
servers against local and remote intrusion, exploitation, and
malicious activity. The Linux Security Guide details the planning
and the tools involved in creating a secured computing environment
for the data center, workplace, and home. With proper
administrative knowledge, vigilance, and tools, systems running
Linux can be both fully functional and secured from most common
intrusion and exploit
methods.</div></div></div></div><hr/></div><div
class="toc"><dl><dt><span class="preface"><a
href="pref-Security_Guide-Preface.html">Preface</a></span></dt><dd><dl><dt><span
class="section"><a
href="pref-Security_Guide-Preface.html#d0e91">1. Document
Conventions</a></span></dt><dd><dl><dt><span
class="section"><a
href="pref-Security_Guide-Preface.html#d0e101">1.1. Typographic
Conventions</a></span></dt><dt><span
class="section"><a
href="pref-Security_Guide-Preface.html#d0e317">1.2. Pull-quote
Conventions</a></span></dt><dt><span
class="section"><a
href="pref-Security_Guide-Preface.html#d0e336">1.3. Notes and
Warnings</a></span></dt></dl></dd><dt><span
class="section"><a href="We_Need_Feedback.html">2. We Need
Feedback!</a></span></dt></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-Security_Overview.html">1. Security
Overview</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security
_Guide-Introduction_to_Security">1.1. Introduction to
Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security-What_is_Computer_Security">1.1.1.
What is Computer Security?</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security-Security_Controls">1.1.2.
Security Controls</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-Introduction_to_Security-Conclusion">1.1.3.
Conclusion</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment.html">1.2. Vulnerability
Assessment</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment.html#sect-Security_Guide-Vulnerability_Assessment-Thinking_Like_the_Enemy">1.2.1.
Thinking Like the Enemy</a></span></dt><dt>
<span class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html">1.2.2.
Defining Assessment and Testing</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html">1.2.3.
Evaluating the
Tools</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html">1.3. Attackers
and
Vulnerabilities</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html#sect-Security_Guide-Attackers_and_Vulnerabilities-A_Quick_History_of_Hackers">1.3.1.
A Quick History of Hackers</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html">1.3.2.
Threats to Network Security</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html">1.3.3.
T
hreats to Server Security</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html">1.3.4.
Threats to Workstation and Home PC
Security</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Common_Exploits_and_Attacks.html">1.4. Common
Exploits and Attacks</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Security_Updates.html">1.5. Security
Updates</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Security_Updates.html#sect-Security_Guide-Security_Updates-Updating_Packages">1.5.1.
Updating
Packages</a></span></dt></dl></dd></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-Securing_Your_Network.html">2. Securing Your
Network</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security">2.1.
Workstation Security</a>
</span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Evaluating_Workstation_Security">2.1.1.
Evaluating Workstation Security</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-BIOS_and_Boot_Loader_Security">2.1.2.
BIOS and Boot Loader Security</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Password_Security">2.1.3.
Password Security</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Administrative_Controls">2.1.4.
Administrative Controls</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Available_Network_Services">2.1.5.
Available Network S
ervices</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Personal_Firewalls">2.1.6.
Personal Firewalls</a></span></dt><dt><span
class="section"><a
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Security_Enhanced_Communication_Tools">2.1.7.
Security Enhanced Communication
Tools</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security.html">2.2. Server
Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security.html#sect-Security_Guide-Server_Security-Securing_Services_With_TCP_Wrappers_and_xinetd">2.2.1.
Securing Services With TCP Wrappers and
xinetd</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Securing_Portmap.html">2.2.2.
Securing Portmap</a></span></dt><dt><span
class="section"><a href="sect-Security_Guide-Server_Secur
ity-Securing_NIS.html">2.2.3. Securing
NIS</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_NFS.html">2.2.4. Securing
NFS</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html">2.2.5.
Securing the Apache HTTP Server</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Securing_FTP.html">2.2.6. Securing
FTP</a></span></dt><dt><span class="section"><a
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html">2.2.7.
Securing Sendmail</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html">2.2.8.
Verifying Which Ports Are
Listening</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO.html">2.3. Single Sign-on
(SSO)</a></span></dt><dd><dl><dt><span
class="section"><a href="sect-Security_Guide-Single_Sign_on_SSO
.html#sect-Security_Guide-Single_Sign_on_SSO-Introduction">2.3.1.
Introduction</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html">2.3.2.
Getting Started with your new Smart
Card</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html">2.3.3.
How Smart Card Enrollment Works</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html">2.3.4.
How Smart Card Login Works</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html">2.3.5.
Configuring Firefox to use Kerberos for
SSO</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html">2.4.
Pluggable Authentication Modules
(PAM)</a></span></dt><dd><dl><dt><span
class="section
"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html#sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Advantages_of_PAM">2.4.1.
Advantages of PAM</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html">2.4.2.
PAM Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html">2.4.3.
PAM Configuration File Format</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html">2.4.4.
Sample PAM Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html">2.4.5.
Creating PAM Modules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administ
rative_Credential_Caching.html">2.4.6. PAM and Administrative Credential
Caching</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html">2.4.7.
PAM and Device Ownership</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html">2.4.8.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html">2.5. TCP Wrappers and
xinetd</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html#sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers">2.5.1.
TCP Wrappers</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html">2.5.2.
TCP Wrappers Configuration Files</a></span></dt><dt><span
class="section"><a href="sect-Security_Guide-TCP_Wrapp
ers_and_xinetd-xinetd.html">2.5.3.
xinetd</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html">2.5.4.
xinetd Configuration Files</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html">2.5.5.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos.html">2.6.
Kerberos</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos.html#sect-Security_Guide-Kerberos-What_is_Kerberos">2.6.1.
What is Kerberos?</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html">2.6.2. Kerberos
Terminology</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html">2.6.3. How
Kerberos Works</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html
">2.6.4. Kerberos and PAM</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html">2.6.5.
Configuring a Kerberos 5 Server</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html">2.6.6.
Configuring a Kerberos 5 Client</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html">2.6.7.
Domain-to-Realm Mapping</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html">2.6.8.
Setting Up Secondary KDCs</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html">2.6.9.
Setting Up Cross Realm Authentication</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Kerberos-Additional_Resources.html">2.6.10.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a href="sect
-Security_Guide-Virtual_Private_Networks_VPNs.html">2.7. Virtual Private Networks
(VPNs)</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html#sect-Security_Guide-Virtual_Private_Networks_VPNs-How_Does_a_VPN_Work">2.7.1.
How Does a VPN Work?</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html">2.7.2.
VPNs and Fedora</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html">2.7.3.
IPsec</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html">2.7.4.
Creating an IPsec Connection</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html">2.7.5.
IPsec Installation</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPN
s-IPsec_Host_to_Host_Configuration.html">2.7.6. IPsec Host-to-Host
Configuration</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html">2.7.7.
IPsec Network-to-Network Configuration</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html">2.7.8.
Starting and Stopping an IPsec
Connection</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls.html">2.8.
Firewalls</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls.html#sect-Security_Guide-Firewalls-Netfilter_and_IPTables">2.8.1.
Netfilter and IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html">2.8.2.
Basic Firewall Configuration</a></span></dt><dt><span
class="section"><a href="sect-Security_Guide-Firewalls-U
sing_IPTables.html">2.8.3. Using
IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html">2.8.4.
Common IPTables Filtering</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html">2.8.5.
FORWARD and NAT Rules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html">2.8.6.
Malicious Software and Spoofed IP
Addresses</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html">2.8.7.
IPTables and Connection Tracking</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-IPv6.html">2.8.8.
IPv6</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Firewalls-Additional_Resources.html">2.8.9.
Additional
Resources</a></span></dt></dl></dd><dt><span
class="section"><a href="sect-Security_Guide-IPTable
s.html">2.9.
IPTables</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-IPTables.html#sect-Security_Guide-IPTables-Packet_Filtering">2.9.1.
Packet Filtering</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html">2.9.2.
Differences Between IPTables and
IPChains</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html">2.9.3.
Command Options for IPTables</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html">2.9.4. Saving
IPTables Rules</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html">2.9.5.
IPTables Control Scripts</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html">2.9.6. IPTables
and IPv6</a></span></dt><dt><span
class="section"><a href="sect-Security_Guide-IP
Tables-Additional_Resources.html">2.9.7. Additional
Resources</a></span></dt></dl></dd></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-Encryption.html">3.
Encryption</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Encryption.html#sect-Security_Guide-Encryption-Data_at_Rest">3.1.
Data at Rest</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html">3.2.
Full Disk Encryption</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html">3.3.
File Based Encryption</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Data_in_Motion.html">3.4. Data in
Motion</a></span></dt><dt><span
class="section"><a
href="Security_Guide-Encryption-Data_in_Motion-Virtual_Private_Networks.html">3.5.
Virtual Private Networks</a></span></dt><dt><span
class="section"><a href="Security_Guide-En
cryption-Data_in_Motion-Secure_Shell.html">3.6. Secure
Shell</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption.html">3.7. LUKS Disk
Encryption</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption.html#sect-Security_Guide-LUKS_Disk_Encryption-LUKS_Implementation_in_Fedora">3.7.1.
LUKS Implementation in Fedora</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html">3.7.2.
Manually Encrypting Directories</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html">3.7.3.
Step-by-Step Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html">3.7.4.
What you have just accomplished.</a></span></dt><dt><span
class="sec
tion"><a
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html">3.7.5.
Links of
Interest</a></span></dt></dl></dd><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html">3.8.
7-Zip Encrypted
Archives</a></span></dt><dd><dl><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html#sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation">3.8.1.
7-Zip Installation in Fedora</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html">3.8.2.
Step-by-Step Installation Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html">3.8.3.
Step-by-Step Usage Instructions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html">3.8.4.
Things of note</a><
/span></dt></dl></dd></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-General_Principles_of_Information_Security.html">4.
General Principles of Information
Security</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-General_Principles_of_Information_Security.html#sect-Security_Guide-General_Principles_of_Information_Security-General_Principles">4.1.
General Principles</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html">4.2.
Tips, Guides, and Tools</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html">4.3.
NSA Documents</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html">4.4.
DISA IASE
Documents</a></span></dt></dl></dd><dt><span
class="chapter"><a href="chap-Security_Guide-Secure_In
stallation.html">5. Secure
Installation</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Secure_Installation.html#sect-Security_Guide-Secure_Installation-Disk_Partitions">5.1.
Disk Partitions</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html">5.2.
Utilize LUKS Partition
Encryption</a></span></dt></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-Software_Maintenance.html">6. Software
Maintenance</a></span></dt><dd><dl><dt><span
class="section"><a
href="chap-Security_Guide-Software_Maintenance.html#sect-Security_Guide-Software_Maintenance-Install_Minimal_Software">6.1.
Install Minimal Software</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html">6.2.
Plan and Configure Security Updates</a></span></dt><dt><span
class="section"><a href="sect-Security_Guide-Software_Maintenance-Pl
an_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html">6.3.
Adjusting Automatic Updates</a></span></dt><dt><span
class="section"><a
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html">6.4.
Install Signed Packages from Well Known
Repositories</a></span></dt></dl></dd><dt><span
class="chapter"><a
href="chap-Security_Guide-References.html">7.
References</a></span></dt></dl></div></div><ul
class="docnav"><li class="previous"/><li
class="next"><a accesskey="n"
href="pref-Security_Guide-Preface.html"><strong>Next</strong>Preface</a></li></ul></body></html>
--- NEW FILE pref-Security_Guide-Preface.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up" href="index.html" title="Linux
Security Guide"/><link rel="prev" href="index.html"
title="Linux Security Guide"/><link rel="next"
href="We_Need_Feedback.html" title="2. We Need
Feedback!"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="index.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n" href="We_Need_Feedback.h
tml"><strong>Next</strong></a></li></ul><div
class="preface" lang="en-US"><div
class="titlepage"><div><div><h1
id="pref-Security_Guide-Preface"
class="title">Preface</h1></div></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="d0e91">1. Document
Conventions</h2></div></div></div><div
class="para">
This manual uses several conventions to highlight certain words and phrases and draw
attention to specific pieces of information.
</div><div class="para">
In PDF and paper editions, this manual uses typefaces drawn from the <a
href="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</a>
set. The Liberation Fonts set is also used in HTML editions if the set is installed on
your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat
Enterprise Linux 5 and later includes the Liberation Fonts set by default.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="d0e101">1.1. Typographic
Conventions</h3></div></div></div><div
class="para">
Four typographic conventions are used to call attention to specific words and phrases.
These conventions, and the circumstances they apply to, are as follows.
</div><div class="para">
<code class="literal">Mono-spaced Bold</code>
</div><div class="para">
Used to highlight system input, including shell commands, file names and paths. Also
used to highlight key caps and key-combinations. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
To see the contents of the file <code
class="filename">my_next_bestselling_novel</code> in your current
working directory, enter the <code class="command">cat
my_next_bestselling_novel</code> command at the shell prompt and press <span
class="keycap"><strong>Enter</strong></span> to execute the
command.
</div></blockquote></div><div class="para">
The above includes a file name, a shell command and a key cap, all presented in
Mono-spaced Bold and all distinguishable thanks to context.
</div><div class="para">
Key-combinations can be distinguished from key caps by the hyphen connecting each part
of a key-combination. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
Press <span
class="keycap"><strong>Enter</strong></span> to execute the
command.
</div><div class="para">
Press <span
class="keycap"><strong>Ctrl</strong></span>+<span
class="keycap"><strong>Alt</strong></span>+<span
class="keycap"><strong>F1</strong></span> to switch to the
first virtual terminal. Press <span
class="keycap"><strong>Ctrl</strong></span>+<span
class="keycap"><strong>Alt</strong></span>+<span
class="keycap"><strong>F7</strong></span> to return to your
X-Windows session.
</div></blockquote></div><div class="para">
The first sentence highlights the particular key cap to press. The second highlights
two sets of three key caps, each set pressed simultaneously.
</div><div class="para">
If source code is discussed, class names, methods, functions, variable names and
returned values mentioned within a paragraph will be presented as above, in <code
class="literal">Mono-spaced Bold</code>. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
File-related classes include <code
class="classname">filesystem</code> for file systems, <code
class="classname">file</code> for files, and <code
class="classname">dir</code> for directories. Each class has its own
associated set of permissions.
</div></blockquote></div><div class="para">
<span class="application"><strong>Proportional
Bold</strong></span>
</div><div class="para">
This denotes words or phrases encountered on a system, including application names;
dialogue box text; labelled buttons; check-box and radio button labels; menu titles and
sub-menu titles. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
Choose <span class="guimenu"><strong>System > Preferences
> Mouse</strong></span> from the main menu bar to launch <span
class="application"><strong>Mouse
Preferences</strong></span>. In the <span
class="guilabel"><strong>Buttons</strong></span> tab, click
the <span class="guilabel"><strong>Left-handed
mouse</strong></span> check box and click <span
class="guibutton"><strong>Close</strong></span> to switch
the primary mouse button from the left to the right (making the mouse suitable for use in
the left hand).
</div><div class="para">
To insert a special character into a <span
class="application"><strong>gedit</strong></span> file,
choose <span class="guimenu"><strong>Applications >
Accessories > Character Map</strong></span> from the main menu bar.
Next, choose <span class="guimenu"><strong>Search >
Find…</strong></span> from the <span
class="application"><strong>Character Map</strong></span>
menu bar, type the name of the character in the <span
class="guilabel"><strong>Search</strong></span> field and
click <span
class="guibutton"><strong>Next</strong></span>. The
character you sought will be highlighted in the <span
class="guilabel"><strong>Character Table</strong></span>.
Double-click this highlighted character to place it in the <span
class="guilabel"><strong>Text to copy</strong></span> field
and then click the <span
class="guibutton"><strong>Copy</strong></span> button. Now
switch back to your document and choose <span
class="guimenu"><strong>Edit > Paste</strong></span>
from the <
span class="application"><strong>gedit</strong></span>
menu bar.
</div></blockquote></div><div class="para">
The above text includes application names; system-wide menu names and items;
application-specific menu names; and buttons and text found within a GUI interface, all
presented in Proportional Bold and all distinguishable by context.
</div><div class="para">
Note the <span
class="guimenu"><strong>></strong></span> shorthand
used to indicate traversal through a menu and its sub-menus. This is to avoid the
difficult-to-follow 'Select <span
class="guimenuitem"><strong>Mouse</strong></span> from the
<span
class="guimenu"><strong>Preferences</strong></span>
sub-menu in the <span
class="guimenu"><strong>System</strong></span> menu of the
main menu bar' approach.
</div><div class="para">
<code class="command"><em
class="replaceable"><code>Mono-spaced Bold
Italic</code></em></code> or <span
class="application"><strong><em
class="replaceable"><code>Proportional Bold
Italic</code></em></strong></span>
</div><div class="para">
Whether Mono-spaced Bold or Proportional Bold, the addition of Italics indicates
replaceable or variable text. Italics denotes text you do not input literally or displayed
text that changes depending on circumstance. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
To connect to a remote machine using ssh, type <code
class="command">ssh <em
class="replaceable"><code>username</code></em>@<em
class="replaceable"><code>domain.name</code></em></code>
at a shell prompt. If the remote machine is <code
class="filename">example.com</code> and your username on that machine
is john, type <code class="command">ssh john(a)example.com</code>.
</div><div class="para">
The <code class="command">mount -o remount <em
class="replaceable"><code>file-system</code></em></code>
command remounts the named file system. For example, to remount the <code
class="filename">/home</code> file system, the command is <code
class="command">mount -o remount /home</code>.
</div><div class="para">
To see the version of a currently installed package, use the <code
class="command">rpm -q <em
class="replaceable"><code>package</code></em></code>
command. It will return a result as follows: <code class="command"><em
class="replaceable"><code>package-version-release</code></em></code>.
</div></blockquote></div><div class="para">
Note the words in bold italics above — username, domain.name, file-system, package,
version and release. Each word is a placeholder, either for text you enter when issuing a
command or for text displayed by the system.
</div><div class="para">
Aside from standard usage for presenting the title of a work, italics denotes the first
use of a new and important term. For example:
</div><div class="blockquote"><blockquote
class="blockquote"><div class="para">
When the Apache HTTP Server accepts requests, it dispatches child processes or threads
to handle them. This group of child processes or threads is known as a <em
class="firstterm">server-pool</em>. Under Apache HTTP Server 2.0, the
responsibility for creating and maintaining these server-pools has been abstracted to a
group of modules called <em class="firstterm">Multi-Processing
Modules</em> (<em class="firstterm">MPMs</em>). Unlike other
modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
</div></blockquote></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="d0e317">1.2. Pull-quote
Conventions</h3></div></div></div><div
class="para">
Two, commonly multi-line, data types are set off visually from the surrounding text.
</div><div class="para">
Output sent to a terminal is set in <code
class="computeroutput">Mono-spaced Roman</code> and presented thus:
</div><pre class="screen">
books Desktop documentation drafts mss photos stuff svn
books_tests Desktop1 downloads images notes scripts svgs
</pre><div class="para">
Source-code listings are also set in <code
class="computeroutput">Mono-spaced Roman</code> but are presented and
highlighted as follows:
</div><pre class="programlisting">
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " +
echo.echo("Hello"));
}
}
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="d0e336">1.3. Notes and
Warnings</h3></div></div></div><div class="para">
Finally, we use three visual styles to draw attention to information that might
otherwise be overlooked.
</div><div class="note"><h2>Note</h2><div
class="para">
A note is a tip or shortcut or alternative approach to the task at hand. Ignoring a
note should have no negative consequences, but you might miss out on a trick that makes
your life easier.
</div></div><div
class="important"><h2>Important</h2><div
class="para">
Important boxes detail things that are easily missed: configuration changes that only
apply to the current session, or services that need restarting before an update will
apply. Ignoring Important boxes won't cause data loss but may cause irritation and
frustration.
</div></div><div
class="warning"><h2>Warning</h2><div
class="para">
A Warning should not be ignored. Ignoring warnings will most likely cause data loss.
</div></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="index.html"><strong>Prev</strong>Linux Security
Guide</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="We_Need_Feedback.html"><strong>Next</strong>2. We Need
Feedback!</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Related_Books.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Books</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"
title="2.5.5. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"
title="2.5.5.2. Useful TCP Wrappers Websites"/><link rel="next"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/><
/a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Related_Books">2.5.5.3. Related
Books</h4></div></div></div><a id="d0e9152"
class="indexterm"/><a id="d0e9159"
class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<em class="citetitle">Hacking Linux Exposed</em> by Brian
Hatch, James Lee, and George Kurtz; Osbourne/McGraw-Hill — An excellent security resource
with information about TCP Wrappers and <code
class="systemitem">xinetd</code>.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"><strong>Prev</strong>2.5.5.2. Useful
TCP Wrappers Websites</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos.html"><strong>Next</strong>2.6. Kerberos</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Related_Documentation.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Documentation</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"
title="2.8.9. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"
title="2.8.9.2. Useful Firewall Websites"/><link rel="next"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul cla
ss="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Related_Documentation">2.8.9.3. Related
Documentation</h4></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
<em class="citetitle">Red Hat Linux Firewalls</em>, by Bill
McCarty; Red Hat Press — a comprehensive reference to building network and server
firewalls using open source packet filtering technology such as Netfilter and <code
class="command">iptables</code>. It includes topics that cover
analyzing firewall logs, developing firewall rules, and customizing your firewall using
various graphical tools.
</div></li><li><div class="para">
<em class="citetitle">Linux Firewalls</em>, by Robert Ziegler;
New Riders Press — contains a wealth of information on building firewalls using both 2.2
kernel <code class="command">ipchains</code> as well as Netfilter
and <code class="command">iptables</code>. Additional security
topics such as remote access issues and intrusion detection systems are also covered.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"><strong>Prev</strong>2.8.9.2. Useful
Firewall Websites</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables.html"><strong>Next</strong>2.9. IPTables</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Firewall Websites</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"
title="2.8.9. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"
title="2.8.9. Additional Resources"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"
title="2.8.9.3. Related Documentation"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Doc
umentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites">2.8.9.2. Useful
Firewall Websites</h4></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
<a
href="http://www.netfilter.org/">http://www.netfilter.org/&l... — The
official homepage of the Netfilter and <code
class="command">iptables</code> project.
</div></li><li><div class="para">
<a
href="http://www.tldp.org/">http://www.tldp.org/</a> — The
Linux Documentation Project contains several useful guides relating to firewall creation
and administration.
</div></li><li><div class="para">
<a
href="http://www.iana.org/assignments/port-numbers">http://w...
— The official list of registered and common service ports as assigned by the Internet
Assigned Numbers Authority.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"><strong>Prev</strong>2.8.9. Additional
Resources</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"><strong>Next</strong>2.8.9.3. Related
Documentation</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IP Tables Websites</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Additional_Resources.html"
title="2.9.7. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-IPTables-Additional_Resources.html"
title="2.9.7. Additional Resources"/><link rel="next"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docn
av"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-Additional_Resources.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Encryption.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites">2.9.7.2. Useful
IP Tables Websites</h4></div></div></div><a
id="d0e16278" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<a
href="http://www.netfilter.org/">http://www.netfilter.org/&l... — The
home of the netfilter/iptables project. Contains assorted information about <code
class="command">iptables</code>, including a FAQ addressing specific
problems and various helpful guides by Rusty Russell, the Linux IP firewall maintainer.
The HOWTO documents on the site cover subjects such as basic networking concepts, kernel
packet filtering, and NAT configurations.
</div></li><li><div class="para">
<a
href="http://www.linuxnewbie.org/nhf/Security/IPtables_Basics.html&q...
— An introduction to the way packets move through the Linux kernel, plus an introduction
to constructing basic <code class="command">iptables</code>
commands.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables-Additional_Resources.html"><strong>Prev</strong>2.9.7. Additional
Resources</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Encryption.html"><strong>Next</strong>Chapter 3. Encryption</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Kerberos Websites</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"
title="2.6.10. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"
title="2.6.10. Additional Resources"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documenta
tion Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites">2.6.10.2. Useful
Kerberos Websites</h4></div></div></div><a
id="d0e10870" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<a
href="http://web.mit.edu/kerberos/www/">http://web.mit.edu/k...
— <em class="citetitle">Kerberos: The Network Authentication
Protocol</em> webpage from MIT.
</div></li><li><div class="para">
<a
href="http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html"...
— The Kerberos Frequently Asked Questions (FAQ).
</div></li><li><div class="para">
<a
href="ftp://athena-dist.mit.edu/pub/kerberos/doc/usenix.PS">...
— The PostScript version of <em class="citetitle">Kerberos: An
Authentication Service for Open Network Systems</em> by Jennifer G. Steiner,
Clifford Neuman, and Jeffrey I. Schiller. This document is the original paper describing
Kerberos.
</div></li><li><div class="para">
<a
href="http://web.mit.edu/kerberos/www/dialogue.html">http://...
— <em class="citetitle">Designing an Authentication System: a Dialogue in
Four Scenes</em> originally by Bill Bryant in 1988, modified by Theodore Ts'o in
1997. This document is a conversation between two developers who are thinking through the
creation of a Kerberos-style authentication system. The conversational style of the
discussion make this a good starting place for people who are completely unfamiliar with
Kerberos.
</div></li><li><div class="para">
<a
href="http://www.ornl.gov/~jar/HowToKerb.html">http://www.or...
— <em class="citetitle">How to Kerberize your site</em> is a good
reference for kerberizing a network.
</div></li><li><div class="para">
<a
href="http://www.networkcomputing.com/netdesign/kerb1.html">...
— <em class="citetitle">Kerberos Network Design Manual</em> is a
thorough overview of the Kerberos system.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"><strong>Prev</strong>2.6.10. Additional
Resources</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"><strong>Next</strong>2.7. Virtual
Private Networks (VPNs)</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
PAM Websites</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"
title="2.4.8. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"
title="2.4.8. Additional Resources"/><link rel="next"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/imag
es/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites">2.4.8.2. Useful
PAM Websites</h4></div></div></div><a id="d0e7125"
class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<a
href="http://www.kernel.org/pub/linux/libs/pam/">http://www....
— The primary distribution website for the Linux-PAM project, containing information on
various PAM modules, a FAQ, and additional PAM documentation.
</div><div class="note"><h2>Note</h2><div
class="para">
The documentation in the above website is for the last released upstream version of
PAM and might not be 100% accurate for the PAM version included in Fedora.
</div></div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"><strong>Prev</strong>2.4.8. Additional
Resources</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html"><strong>Next</strong>2.5. TCP
Wrappers and xinetd</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
TCP Wrappers Websites</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"
title="2.5.5. Additional Resources"/><link rel="prev"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"
title="2.5.5. Additional Resources"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"
title="2.5.5.3. Related Books"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_rig
ht.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites">2.5.5.2. Useful
TCP Wrappers Websites</h4></div></div></div><a
id="d0e9115" class="indexterm"/><a id="d0e9122"
class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<a
href="http://www.xinetd.org">http://www.xinetd.org/</a> —
The home of <code class="systemitem">xinetd</code>, containing
sample configuration files, a full listing of features, and an informative FAQ.
</div></li><li><div class="para">
<a
href="http://www.macsecurity.org/resources/xinetd/tutorial.shtml&quo...
— A thorough tutorial that discusses many different ways to optimize default <code
class="systemitem">xinetd</code> configuration files to meet specific
security goals.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"><strong>Prev</strong>2.5.5. Additional
Resources</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"><strong>Next</strong>2.5.5.3. Related
Books</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Control Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"
title="2.5.4.3. Altering xinetd Configuration Files"/><link
rel="prev"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"
title="2.5.4.3. Altering xinetd Configuration Files"/><link
rel="next"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"
title="2.5.4.3.3. Binding and Redirection
Options"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png"
alt="Product Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options">2.5.4.3.2. Access
Control Options</h5></div></div></div><a id="d0e8648"
class="indexterm"/><a id="d0e8656"
class="indexterm"/><div class="para">
Users of <code class="systemitem">xinetd</code> services can
choose to use the TCP Wrappers hosts access rules, provide access control via the <code
class="systemitem">xinetd</code> configuration files, or a mixture of
both. Refer to <a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"
title="2.5.2. TCP Wrappers Configuration Files">Section 2.5.2, “TCP Wrappers
Configuration Files”</a> for more information about TCP Wrappers hosts access
control files.
</div><div class="para">
This section discusses using <code
class="systemitem">xinetd</code> to control access to services.
</div><div class="note"><h2>Note</h2><div
class="para">
Unlike TCP Wrappers, changes to access control only take effect if the <code
class="systemitem">xinetd</code> administrator restarts the <code
class="systemitem">xinetd</code> service.
</div><div class="para">
Also, unlike TCP Wrappers, access control through <code
class="systemitem">xinetd</code> only affects services controlled by
<code class="systemitem">xinetd</code>.
</div></div><div class="para">
The <code class="systemitem">xinetd</code> hosts access control
differs from the method used by TCP Wrappers. While TCP Wrappers places all of the access
configuration within two files, <code
class="filename">/etc/hosts.allow</code> and <code
class="filename">/etc/hosts.deny</code>, <code
class="systemitem">xinetd</code>'s access control is found in each
service's configuration file in the <code
class="filename">/etc/xinetd.d/</code> directory.
</div><div class="para">
The following hosts access options are supported by <code
class="systemitem">xinetd</code>:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">only_from</code> — Allows only the
specified hosts to use the service.
</div></li><li><div class="para">
<code class="option">no_access</code> — Blocks listed hosts
from using the service.
</div></li><li><div class="para">
<code class="option">access_times</code> — Specifies the time
range when a particular service may be used. The time range must be stated in 24-hour
format notation, HH:MM-HH:MM.
</div></li></ul></div><div class="para">
The <code class="option">only_from</code> and <code
class="option">no_access</code> options can use a list of IP addresses
or host names, or can specify an entire network. Like TCP Wrappers, combining <code
class="systemitem">xinetd</code> access control with the enhanced
logging configuration can increase security by blocking requests from banned hosts while
verbosely recording each connection attempt.
</div><div class="para">
For example, the following <code
class="filename">/etc/xinetd.d/telnet</code> file can be used to block
Telnet access from a particular network group and restrict the overall time range that
even allowed users can log in:
</div><pre class="screen">service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/telnetd
log_on_failure += USERID
no_access = 172.16.45.0/24
log_on_success += PID HOST EXIT
access_times = 09:45-16:15
}
</pre><div class="para">
In this example, when a client system from the <code
class="systemitem">10.0.1.0/24</code> network, such as <code
class="systemitem">10.0.1.2</code>, tries to access the Telnet service,
it receives the following message:
</div><pre class="screen">Connection closed by foreign host.
</pre><div class="para">
In addition, their login attempts are logged in <code
class="filename">/var/log/messages</code> as follows:
</div><pre class="screen">Sep 7 14:58:33 localhost
xinetd[5285]: FAIL: telnet address from=172.16.45.107
Sep 7 14:58:33 localhost xinetd[5283]: START: telnet pid=5285 from=172.16.45.107
Sep 7 14:58:33 localhost xinetd[5283]: EXIT: telnet status=0 pid=5285 duration=0(sec)
</pre><div class="para">
When using TCP Wrappers in conjunction with <code
class="systemitem">xinetd</code> access controls, it is important to
understand the relationship between the two access control mechanisms.
</div><div class="para">
The following is the sequence of events followed by <code
class="systemitem">xinetd</code> when a client requests a connection:
</div><div class="orderedlist"><ol><li><div
class="para">
The <code class="systemitem">xinetd</code> daemon accesses
the TCP Wrappers hosts access rules using a <code
class="filename">libwrap.a</code> library call. If a deny rule matches
the client, the connection is dropped. If an allow rule matches the client, the connection
is passed to <code class="systemitem">xinetd</code>.
</div></li><li><div class="para">
The <code class="systemitem">xinetd</code> daemon checks its
own access control rules both for the <code
class="systemitem">xinetd</code> service and the requested service. If
a deny rule matches the client, the connection is dropped. Otherwise, <code
class="systemitem">xinetd</code> starts an instance of the requested
service and passes control of the connection to that service.
</div></li></ol></div><div
class="important"><h2>Important</h2><div
class="para">
Care should be taken when using TCP Wrappers access controls in conjunction with
<code class="systemitem">xinetd</code> access controls.
Misconfiguration can cause undesirable effects.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"><strong>Prev</strong>2.5.4.3. Altering
xinetd Configuration Files</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"><strong>Next</strong>2.5.4.3.3. Binding
and Redirection Options</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Redirection Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"
title="2.5.4.3. Altering xinetd Configuration Files"/><link
rel="prev"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"
title="2.5.4.3.2. Access Control Options"/><link rel="next"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"
title="2.5.4.3.4. Resource Management
Options"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product S
ite"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options">2.5.4.3.3. Binding
and Redirection Options</h5></div></div></div><a
id="d0e8818" class="indexterm"/><a id="d0e8826"
class="indexterm"/><div class="para">
The service configuration files for <code
class="systemitem">xinetd</code> support binding the service to an IP
address and redirecting incoming requests for that service to another IP address,
hostname, or port.
</div><div class="para">
Binding is controlled with the <code class="option">bind</code>
option in the service-specific configuration files and links the service to one IP address
on the system. When this is configured, the <code
class="option">bind</code> option only allows requests to the correct
IP address to access the service. You can use this method to bind different services to
different network interfaces based on requirements.
</div><div class="para">
This is particularly useful for systems with multiple network adapters or with
multiple IP addresses. On such a system, insecure services (for example, Telnet), can be
configured to listen only on the interface connected to a private network and not to the
interface connected to the Internet.
</div><div class="para">
The <code class="option">redirect</code> option accepts an IP
address or hostname followed by a port number. It configures the service to redirect any
requests for this service to the specified host and port number. This feature can be used
to point to another port number on the same system, redirect the request to a different IP
address on the same machine, shift the request to a totally different system and port
number, or any combination of these options. A user connecting to a certain service on a
system may therefore be rerouted to another system without disruption.
</div><div class="para">
The <code class="systemitem">xinetd</code> daemon is able to
accomplish this redirection by spawning a process that stays alive for the duration of the
connection between the requesting client machine and the host actually providing the
service, transferring data between the two systems.
</div><div class="para">
The advantages of the <code class="option">bind</code> and
<code class="option">redirect</code> options are most clearly
evident when they are used together. By binding a service to a particular IP address on a
system and then redirecting requests for this service to a second machine that only the
first machine can see, an internal system can be used to provide services for a totally
different network. Alternatively, these options can be used to limit the exposure of a
particular service on a multi-homed machine to a known IP address, as well as redirect any
requests for that service to another machine especially configured for that purpose.
</div><div class="para">
For example, consider a system that is used as a firewall with this setting for its
Telnet service:
</div><pre class="screen">service telnet
{
socket_type = stream
wait = no
server = /usr/kerberos/sbin/telnetd
log_on_success += DURATION USERID
log_on_failure += USERID
bind = 123.123.123.123
redirect = 10.0.1.13 23
}
</pre><div class="para">
The <code class="option">bind</code> and <code
class="option">redirect</code> options in this file ensure that the
Telnet service on the machine is bound to the external IP address (<code
class="systemitem">123.123.123.123</code>), the one facing the
Internet. In addition, any requests for Telnet service sent to <code
class="systemitem">123.123.123.123</code> are redirected via a second
network adapter to an internal IP address (<code
class="systemitem">10.0.1.13</code>) that only the firewall and
internal systems can access. The firewall then sends the communication between the two
systems, and the connecting system thinks it is connected to <code
class="systemitem">123.123.123.123</code> when it is actually connected
to a different machine.
</div><div class="para">
This feature is particularly useful for users with broadband connections and only one
fixed IP address. When using Network Address Translation (NAT), the systems behind the
gateway machine, which are using internal-only IP addresses, are not available from
outside the gateway system. However, when certain services controlled by <code
class="systemitem">xinetd</code> are configured with the <code
class="option">bind</code> and <code
class="option">redirect</code> options, the gateway machine can act as
a proxy between outside systems and a particular internal machine configured to provide
the service. In addition, the various <code
class="systemitem">xinetd</code> access control and logging options are
also available for additional protection.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"><strong>Prev</strong>2.5.4.3.2. Access
Control Options</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"><strong>Next</strong>2.5.4.3.4. Resource
Management Options</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Management Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"
title="2.5.4.3. Altering xinetd Configuration Files"/><link
rel="prev"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"
title="2.5.4.3.3. Binding and Redirection Options"/><link
rel="next"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"
title="2.5.5. Additional Resources"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a cla
ss="right" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options">2.5.4.3.4. Resource
Management Options</h5></div></div></div><a
id="d0e8908" class="indexterm"/><a id="d0e8916"
class="indexterm"/><a id="d0e8922"
class="indexterm"/><a id="d0e8927"
class="indexterm"/><div class="para">
The <code class="systemitem">xinetd</code> daemon can add a
basic level of protection from Denial of Service (DoS) attacks. The following is a list of
directives which can aid in limiting the effectiveness of such attacks:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">per_source</code> — Defines the maximum
number of instances for a service per source IP address. It accepts only integers as an
argument and can be used in both <code
class="filename">xinetd.conf</code> and in the service-specific
configuration files in the <code class="filename">xinetd.d/</code>
directory.
</div></li><li><div class="para">
<code class="option">cps</code> — Defines the maximum number
of connections per second. This directive takes two integer arguments separated by white
space. The first argument is the maximum number of connections allowed to the service per
second. The second argument is the number of seconds that <code
class="systemitem">xinetd</code> must wait before re-enabling the
service. It accepts only integers as arguments and can be used in either the <code
class="filename">xinetd.conf</code> file or the service-specific
configuration files in the <code class="filename">xinetd.d/</code>
directory.
</div></li><li><div class="para">
<code class="option">max_load</code> — Defines the CPU usage
or load average threshold for a service. It accepts a floating point number argument.
</div><div class="para">
The load average is a rough measure of how many processes are active at a given
time. See the <code class="command">uptime</code>, <code
class="command">who</code>, and <code
class="command">procinfo</code> commands for more information about
load average.
</div></li></ul></div><div class="para">
There are more resource management options available for <code
class="systemitem">xinetd</code>. Refer to the <code
class="filename">xinetd.conf</code> man page for more information.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Binding_and_Redirection_Options.html"><strong>Prev</strong>2.5.4.3.3. Binding
and Redirection Options</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"><strong>Next</strong>2.5.5. Additional
Resources</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
to Network Security</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"
title="1.3. Attackers and Vulnerabilities"/><link rel="prev"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"
title="1.3. Attackers and Vulnerabilities"/><link rel="next"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"
title="1.3.3. Threats to Server Security"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/im
ages/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security">1.3.2. Threats
to Network Security</h3></div></div></div><a
id="d0e1033" class="indexterm"/><div class="para">
Bad practices when configuring the following aspects of a network can increase the risk
of attack.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Network_Security-Insecure_Architectures">1.3.2.1. Insecure
Architectures</h4></div></div></div><a id="d0e1043"
class="indexterm"/><div class="para">
A misconfigured network is a primary entry point for unauthorized users. Leaving a
trust-based, open local network vulnerable to the highly-insecure Internet is much like
leaving a door ajar in a crime-ridden neighborhood — nothing may happen for an arbitrary
amount of time, but <span
class="emphasis"><em>eventually</em></span> someone
exploits the opportunity.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Insecure_Architectures-Broadcast_Networks">1.3.2.1.1. Broadcast
Networks</h5></div></div></div><div class="para">
System administrators often fail to realize the importance of networking hardware in
their security schemes. Simple hardware such as hubs and routers rely on the broadcast or
non-switched principle; that is, whenever a node transmits data across the network to a
recipient node, the hub or router sends a broadcast of the data packets until the
recipient node receives and processes the data. This method is the most vulnerable to
address resolution protocol (<em class="firstterm">arp</em>) or
media access control (<em class="firstterm">MAC</em>) address
spoofing by both outside intruders and unauthorized users on local hosts.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Insecure_Architectures-Centralized_Servers">1.3.2.1.2. Centralized
Servers</h5></div></div></div><div class="para">
Another potential networking pitfall is the use of centralized computing. A common
cost-cutting measure for many businesses is to consolidate all services to a single
powerful machine. This can be convenient as it is easier to manage and costs considerably
less than multiple-server configurations. However, a centralized server introduces a
single point of failure on the network. If the central server is compromised, it may
render the network completely useless or worse, prone to data manipulation or theft. In
these situations, a central server becomes an open door which allows access to the entire
network.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"><strong>Prev</strong>1.3. Attackers
and Vulnerabilities</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"><strong>Next</strong>1.3.3. Threats
to Server Security</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
to Server Security</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"
title="1.3. Attackers and Vulnerabilities"/><link rel="prev"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"
title="1.3.2. Threats to Network Security"/><link rel="next"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"
title="1.3.3.2. Unpatched Services"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_
Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security">1.3.3. Threats
to Server Security</h3></div></div></div><a
id="d0e1074" class="indexterm"/><div class="para">
Server security is as important as network security because servers often hold a great
deal of an organization's vital information. If a server is compromised, all of its
contents may become available for the cracker to steal or manipulate at will. The
following sections detail some of the main issues.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Server_Security-Unused_Services_and_Open_Ports">1.3.3.1. Unused
Services and Open Ports</h4></div></div></div><a
id="d0e1084" class="indexterm"/><div class="para">
A full installation of Fedora contains 1000+ application and library packages.
However, most server administrators do not opt to install every single package in the
distribution, preferring instead to install a base installation of packages, including
several server applications.
</div><div class="para">
A common occurrence among system administrators is to install the operating system
without paying attention to what programs are actually being installed. This can be
problematic because unneeded services may be installed, configured with the default
settings, and possibly turned on. This can cause unwanted services, such as Telnet, DHCP,
or DNS, to run on a server or workstation without the administrator realizing it, which in
turn can cause unwanted traffic to the server, or even, a potential pathway into the
system for crackers. Refer To <a class="xref"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security">Section 2.2, “Server Security”</a> for information on closing
ports and disabling unused services.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"><strong>Prev</strong>1.3.2. Threats
to Network Security</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"><strong>Next</strong>1.3.3.2. Unpatched
Services</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
to Workstation and Home PC Security</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"
title="1.3. Attackers and Vulnerabilities"/><link rel="prev"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"
title="1.3.3.4. Inherently Insecure Services"/><link rel="next"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"
title="1.3.4.2. Vulnerable Client
Applications"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="ri
ght" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security">1.3.4. Threats
to Workstation and Home PC Security</h3></div></div></div><a
id="d0e1172" class="indexterm"/><div class="para">
Workstations and home PCs may not be as prone to attack as networks or servers, but
since they often contain sensitive data, such as credit card information, they are
targeted by system crackers. Workstations can also be co-opted without the user's
knowledge and used by attackers as "slave" machines in coordinated attacks. For
these reasons, knowing the vulnerabilities of a workstation can save users the headache of
reinstalling the operating system, or worse, recovering from data theft.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Bad_Passwords">1.3.4.1. Bad
Passwords</h4></div></div></div><a id="d0e1182"
class="indexterm"/><div class="para">
Bad passwords are one of the easiest ways for an attacker to gain access to a system.
For more on how to avoid common pitfalls when creating a password, refer to <a
class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security-Password_Security"
title="2.1.3. Password Security">Section 2.1.3, “Password
Security”</a>.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"><strong>Prev</strong>1.3.3.4. Inherently
Insecure Services</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"><strong>Next</strong>1.3.4.2. Vulnerable
Client Applications</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Attackers_and_Vulnerabilities.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Vulnerabilities</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/><link rel="prev"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"
title="1.2.3.5. Anticipating Your Future Needs"/><link
rel="next"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"
title="1.3.2. Threats to Network Security"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Commo
n_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Attackers_and_Vulnerabilities">1.3. Attackers and
Vulnerabilities</h2></div></div></div><a id="d0e933"
class="indexterm"/><div class="para">
To plan and implement a good security strategy, first be aware of some of the issues
which determined, motivated attackers exploit to compromise systems. But before detailing
these issues, the terminology used when identifying an attacker must be defined.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Attackers_and_Vulnerabilities-A_Quick_History_of_Hackers">1.3.1. A
Quick History of Hackers</h3></div></div></div><a
id="d0e941" class="indexterm"/><a id="d0e946"
class="indexterm"/><div class="para">
The modern meaning of the term <em class="firstterm">hacker</em>
has origins dating back to the 1960s and the Massachusetts Institute of Technology (MIT)
Tech Model Railroad Club, which designed train sets of large scale and intricate detail.
Hacker was a name used for club members who discovered a clever trick or workaround for a
problem.
</div><div class="para">
The term hacker has since come to describe everything from computer buffs to gifted
programmers. A common trait among most hackers is a willingness to explore in detail how
computer systems and networks function with little or no outside motivation. Open source
software developers often consider themselves and their colleagues to be hackers, and use
the word as a term of respect.
</div><a id="d0e958" class="indexterm"/><div
class="para">
Typically, hackers follow a form of the <em class="firstterm">hacker
ethic</em> which dictates that the quest for information and expertise is essential,
and that sharing this knowledge is the hackers duty to the community. During this quest
for knowledge, some hackers enjoy the academic challenges of circumventing security
controls on computer systems. For this reason, the press often uses the term hacker to
describe those who illicitly access systems and networks with unscrupulous, malicious, or
criminal intent. The more accurate term for this type of computer hacker is <em
class="firstterm">cracker</em> — a term created by hackers in the
mid-1980s to differentiate the two communities.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-A_Quick_History_of_Hackers-Shades_of_Gray">1.3.1.1. Shades
of Gray</h4></div></div></div><a id="d0e972"
class="indexterm"/><a id="d0e977"
class="indexterm"/><a id="d0e982"
class="indexterm"/><a id="d0e989"
class="indexterm"/><a id="d0e994"
class="indexterm"/><a id="d0e999"
class="indexterm"/><a id="d0e1004"
class="indexterm"/><div class="para">
Within the community of individuals who find and exploit vulnerabilities in systems
and networks are several distinct groups. These groups are often described by the shade of
hat that they "wear" when performing their security investigations and this
shade is indicative of their intent.
</div><div class="para">
The <em class="firstterm">white hat hacker</em> is one who tests
networks and systems to examine their performance and determine how vulnerable they are to
intrusion. Usually, white hat hackers crack their own systems or the systems of a client
who has specifically employed them for the purposes of security auditing. Academic
researchers and professional security consultants are two examples of white hat hackers.
</div><div class="para">
A <em class="firstterm">black hat hacker</em> is synonymous with
a cracker. In general, crackers are less focused on programming and the academic side of
breaking into systems. They often rely on available cracking programs and exploit well
known vulnerabilities in systems to uncover sensitive information for personal gain or to
inflict damage on the target system or network.
</div><div class="para">
The <em class="firstterm">gray hat hacker</em>, on the other
hand, has the skills and intent of a white hat hacker in most situations but uses his
knowledge for less than noble purposes on occasion. A gray hat hacker can be thought of as
a white hat hacker who wears a black hat at times to accomplish his own agenda.
</div><div class="para">
Gray hat hackers typically subscribe to another form of the hacker ethic, which says
it is acceptable to break into systems as long as the hacker does not commit theft or
breach confidentiality. Some would argue, however, that the act of breaking into a system
is in itself unethical.
</div><div class="para">
Regardless of the intent of the intruder, it is important to know the weaknesses a
cracker may likely attempt to exploit. The remainder of the chapter focuses on these
issues.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"><strong>Prev</strong>1.2.3.5. Anticipating
Your Future Needs</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Network_Security.html"><strong>Next</strong>1.3.2. Threats
to Network Security</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the IPTables Service</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="prev"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"
title="2.8.2.5. Saving the Settings"/><link rel="next"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"
title="2.8.3. Using IPTables"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_righ
t.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service">2.8.2.6. Activating
the IPTables Service</h4></div></div></div><a
id="d0e13140" class="indexterm"/><a id="d0e13148"
class="indexterm"/><div class="para">
The firewall rules are only active if the <code
class="command">iptables</code> service is running. To manually start
the service, use the following command:
</div><pre class="screen">[root@myServer ~] # service iptables
restart
</pre><div class="para">
To ensure that <code class="command">iptables</code> starts when
the system is booted, use the following command:
</div><pre class="screen">[root@myServer ~] # chkconfig --level
345 iptables on
</pre><div class="para">
The <code class="command">ipchains</code> service is not
included in Fedora. However, if <code
class="command">ipchains</code> is installed (for example, an upgrade
was performed and the system had <code
class="command">ipchains</code> previously installed), the <code
class="command">ipchains</code> and <code
class="command">iptables</code> services should not be activated
simultaneously. To make sure the <code
class="command">ipchains</code> service is disabled and configured not
to start at boot time, use the following two commands:
</div><pre class="screen">[root@myServer ~] # service ipchains
stop
[root@myServer ~] # chkconfig --level 345 ipchains off
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"><strong>Prev</strong>2.8.2.5. Saving
the Settings</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"><strong>Next</strong>2.8.3. Using
IPTables</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Disabling the Firewall</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="prev"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="next"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"
title="2.8.2.3. Trusted Services"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common
_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall">2.8.2.2. Enabling
and Disabling the Firewall</h4></div></div></div><a
id="d0e12938" class="indexterm"/><div
class="para">
Select one of the following options for the firewall:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span
class="guilabel"><strong>Disabled</strong></span> —
Disabling the firewall provides complete access to your system and does no security
checking. This should only be selected if you are running on a trusted network (not the
Internet) or need to configure a custom firewall using the iptables command line tool.
</div><div class="warning"><h2>Warning</h2><div
class="para">
Firewall configurations and any customized firewall rules are stored in the
<code class="filename">/etc/sysconfig/iptables</code> file. If you
choose <span
class="guilabel"><strong>Disabled</strong></span> and click
<span class="guibutton"><strong>OK</strong></span>,
these configurations and firewall rules will be lost.
</div></div></li><li><div class="para">
<span
class="guilabel"><strong>Enabled</strong></span> — This
option configures the system to reject incoming connections that are not in response to
outbound requests, such as DNS replies or DHCP requests. If access to services running on
this machine is needed, you can choose to allow specific services through the firewall.
</div><div class="para">
If you are connecting your system to the Internet, but do not plan to run a server,
this is the safest choice.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"><strong>Prev</strong>2.8.2. Basic
Firewall Configuration</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"><strong>Next</strong>2.8.2.3. Trusted
Services</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Ports</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="prev"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"
title="2.8.2.3. Trusted Services"/><link rel="next"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"
title="2.8.2.5. Saving the Settings"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image
_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports">2.8.2.4. Other
Ports</h4></div></div></div><a id="d0e13065"
class="indexterm"/><div class="para">
The <span class="application"><strong>Security Level
Configuration Tool</strong></span> includes an <span
class="guilabel"><strong>Other ports</strong></span>
section for specifying custom IP ports as being trusted by <code
class="command">iptables</code>. For example, to allow IRC and Internet
printing protocol (IPP) to pass through the firewall, add the following to the <span
class="guilabel"><strong>Other ports</strong></span>
section:
</div><div class="para">
<code class="computeroutput">194:tcp,631:tcp</code>
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html"><strong>Prev</strong>2.8.2.3. Trusted
Services</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html"><strong>Next</strong>2.8.2.5. Saving
the Settings</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the Settings</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="prev"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"
title="2.8.2.4. Other Ports"/><link rel="next"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"
title="2.8.2.6. Activating the IPTables
Service"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Commo
n_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-Saving_the_Settings">2.8.2.5. Saving
the Settings</h4></div></div></div><a id="d0e13093"
class="indexterm"/><div class="para">
Click <span
class="guibutton"><strong>OK</strong></span> to save the
changes and enable or disable the firewall. If <span
class="guilabel"><strong>Enable firewall</strong></span>
was selected, the options selected are translated to <code
class="command">iptables</code> commands and written to the <code
class="filename">/etc/sysconfig/iptables</code> file. The <code
class="command">iptables</code> service is also started so that the
firewall is activated immediately after saving the selected options. If <span
class="guilabel"><strong>Disable firewall</strong></span>
was selected, the <code
class="filename">/etc/sysconfig/iptables</code> file is removed and the
<code class="command">iptables</code> service is stopped
immediately.
</div><div class="para">
The selected options are also written to the <code
class="filename">/etc/sysconfig/system-config-securitylevel</code> file
so that the settings can be restored the next time the application is started. Do not edit
this file by hand.
</div><div class="para">
Even though the firewall is activated immediately, the <code
class="command">iptables</code> service is not configured to start
automatically at boot time. Refer to <a class="xref"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"
title="2.8.2.6. Activating the IPTables Service">Section 2.8.2.6, “Activating
the IPTables Service”</a> for more information.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"><strong>Prev</strong>2.8.2.4. Other
Ports</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"><strong>Next</strong>2.8.2.6. Activating
the IPTables Service</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Services</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/><link rel="prev"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"
title="2.8.2.2. Enabling and Disabling the Firewall"/><link
rel="next"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"
title="2.8.2.4. Other Ports"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="
Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-Trusted_Services">2.8.2.3. Trusted
Services</h4></div></div></div><a id="d0e12978"
class="indexterm"/><div class="para">
Enabling options in the <span class="guilabel"><strong>Trusted
services</strong></span> list allows the specified service to pass through the
firewall.
</div><div class="variablelist"><dl><dt><span
class="term"><span class="guilabel"><strong>WWW
(HTTP)</strong></span></span></dt><dd><div
class="para">
The HTTP protocol is used by Apache (and by other Web servers) to serve web pages.
If you plan on making your Web server publicly available, select this check box. This
option is not required for viewing pages locally or for developing web pages. This service
requires that the <code class="filename">httpd</code> package be
installed.
</div><div class="para">
Enabling <span class="guilabel"><strong>WWW
(HTTP)</strong></span> will not open a port for HTTPS, the SSL version of
HTTP. If this service is required, select the <span
class="guilabel"><strong>Secure WWW (HTTPS)</strong></span>
check box.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>FTP</strong></span></span></dt><dd><div
class="para">
The FTP protocol is used to transfer files between machines on a network. If you
plan on making your FTP server publicly available, select this check box. This service
requires that the <code class="filename">vsftpd</code> package be
installed.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>SSH</strong></span></span></dt><dd><div
class="para">
Secure Shell (SSH) is a suite of tools for logging into and executing commands on a
remote machine. To allow remote access to the machine via ssh, select this check box. This
service requires that the <code
class="filename">openssh-server</code> package be installed.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>Telnet</strong></span></span></dt><dd><div
class="para">
Telnet is a protocol for logging into remote machines. Telnet communications are
unencrypted and provide no security from network snooping. Allowing incoming Telnet access
is not recommended. To allow remote access to the machine via telnet, select this check
box. This service requires that the <code
class="filename">telnet-server</code> package be installed.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>Mail
(SMTP)</strong></span></span></dt><dd><div
class="para">
SMTP is a protocol that allows remote hosts to connect directly to your machine to
deliver mail. You do not need to enable this service if you collect your mail from your
ISP's server using POP3 or IMAP, or if you use a tool such as <code
class="command">fetchmail</code>. To allow delivery of mail to your
machine, select this check box. Note that an improperly configured SMTP server can allow
remote machines to use your server to send spam.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>NFS4</strong></span></span></dt><dd><div
class="para">
The Network File System (NFS) is a file sharing protocol commonly used on *NIX
systems. Version 4 of this protocol is more secure than its predecessors. If you want to
share files or directories on your system with other network users, select this check
box.
</div></dd><dt><span class="term"><span
class="guilabel"><strong>Samba</strong></span></span></dt><dd><div
class="para">
Samba is an implementation of Microsoft's proprietary SMB networking protocol.
If you need to share files, directories, or locally-connected printers with Microsoft
Windows machines, select this check box.
</div></dd></dl></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"><strong>Prev</strong>2.8.2.2. Enabling
and Disabling the Firewall</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Other_Ports.html"><strong>Next</strong>2.8.2.4. Other
Ports</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="next"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"
title="2.9.3.3. IPTables Parameter Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_C
ontent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-Command_Options">2.9.3.2. Command
Options</h4></div></div></div><a id="d0e14492"
class="indexterm"/><div class="para">
Command options instruct <code class="command">iptables</code>
to perform a specific action. Only one command option is allowed per <code
class="command">iptables</code> command. With the exception of the help
command, all commands are written in upper-case characters.
</div><div class="para">
The <code class="command">iptables</code> commands are as
follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">-A</code> — Appends the rule to the end
of the specified chain. Unlike the <code class="option">-I</code>
option described below, it does not take an integer argument. It always appends the rule
to the end of the specified chain.
</div></li><li><div class="para">
<code class="option">-C</code> — Checks a particular rule
before adding it to the user-specified chain. This command can help you construct complex
<code class="command">iptables</code> rules by prompting you for
additional parameters and options.
</div></li><li><div class="para">
<code class="option">-D <integer> |
<rule></code> — Deletes a rule in a particular chain by number (such
as <code class="option">5</code> for the fifth rule in a chain), or
by rule specification. The rule specification must exactly match an existing rule.
</div></li><li><div class="para">
<code class="option">-E</code> — Renames a user-defined chain.
A user-defined chain is any chain other than the default, pre-existing chains. (Refer to
the <code class="option">-N</code> option, below, for information on
creating user-defined chains.) This is a cosmetic change and does not affect the structure
of the table.
</div><div class="note"><h2>Note</h2><div
class="para">
If you attempt to rename one of the default chains, the system reports a <code
class="computeroutput">Match not found</code> error. You cannot rename
the default chains.
</div></div></li><li><div class="para">
<code class="option">-F</code> — Flushes the selected chain,
which effectively deletes every rule in the chain. If no chain is specified, this command
flushes every rule from every chain.
</div></li><li><div class="para">
<code class="option">-h</code> — Provides a list of command
structures, as well as a quick summary of command parameters and options.
</div></li><li><div class="para">
<code class="option">-I [<integer>]</code> —
Inserts the rule in the specified chain at a point specified by a user-defined integer
argument. If no argument is specified, the rule is inserted at the top of the chain.
</div><div class="caution"><h2>Caution</h2><div
class="para">
As noted above, the order of rules in a chain determines which rules apply to which
packets. This is important to remember when adding rules using either the <code
class="option">-A</code> or <code
class="option">-I</code> option.
</div><div class="para">
This is especially important when adding rules using the <code
class="option">-I</code> with an integer argument. If you specify an
existing number when adding a rule to a chain, <code
class="command">iptables</code> adds the new rule <span
class="emphasis"><em>before</em></span> (or above) the
existing rule.
</div></div></li><li><div class="para">
<code class="option">-L</code> — Lists all of the rules in the
chain specified after the command. To list all rules in all chains in the default <code
class="option">filter</code> table, do not specify a chain or table.
Otherwise, the following syntax should be used to list the rules in a specific chain in a
particular table:
</div><pre class="screen"><code
class="computeroutput"> iptables -L <em
class="replaceable"><code><chain-name></code></em>
-t <em
class="replaceable"><code><table-name></code></em></code>
</pre><div class="para">
Additional options for the <code class="option">-L</code>
command option, which provide rule numbers and allow more verbose rule descriptions, are
described in <a class="xref"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"
title="2.9.3.6. Listing Options">Section 2.9.3.6, “Listing
Options”</a>.
</div></li><li><div class="para">
<code class="option">-N</code> — Creates a new chain with a
user-specified name. The chain name must be unique, otherwise an error message is
displayed.
</div></li><li><div class="para">
<code class="option">-P</code> — Sets the default policy for
the specified chain, so that when packets traverse an entire chain without matching a
rule, they are sent to the specified target, such as ACCEPT or DROP.
</div></li><li><div class="para">
<code class="option">-R</code> — Replaces a rule in the
specified chain. The rule's number must be specified after the chain's name. The
first rule in a chain corresponds to rule number one.
</div></li><li><div class="para">
<code class="option">-X</code> — Deletes a user-specified
chain. You cannot delete a built-in chain.
</div></li><li><div class="para">
<code class="option">-Z</code> — Sets the byte and packet
counters in all chains for a table to zero.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"><strong>Prev</strong>2.9.3. Command
Options for IPTables</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"><strong>Next</strong>2.9.3.3. IPTables
Parameter Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Match Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="prev"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"
title="2.9.3.3. IPTables Parameter Options"/><link rel="next"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"
title="2.9.3.4.2. UDP Protocol"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/
images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options">2.9.3.4. IPTables
Match Options</h4></div></div></div><a id="d0e14889"
class="indexterm"/><div class="para">
Different network protocols provide specialized matching options which can be
configured to match a particular packet using that protocol. However, the protocol must
first be specified in the <code class="command">iptables</code>
command. For example, <code class="option">-p <em
class="replaceable"><code><protocol-name></code></em></code>
enables options for the specified protocol. Note that you can also use the protocol ID,
instead of the protocol name. Refer to the following examples, each of which have the same
effect:
</div><pre class="screen"><code class="command">
iptables -A INPUT -p icmp --icmp-type any -j ACCEPT </code><code
class="command"> iptables -A INPUT -p 5813 --icmp-type any -j ACCEPT
</code>
</pre><div class="para">
Service definitions are provided in the <code
class="filename">/etc/services</code> file. For readability, it is
recommended that you use the service names rather than the port numbers.
</div><div
class="important"><h2>Important</h2><div
class="para">
Secure the <code class="filename">/etc/services</code> file to
prevent unauthorized editing. If this file is editable, crackers can use it to enable
ports on your machine you have otherwise closed. To secure this file, type the following
commands as root:
</div><pre class="screen"><code class="command">
[root@myServer ~]# chown root.root /etc/services [root@myServer ~]# chmod 0644
/etc/services [root@myServer ~]# chattr +i /etc/services </code>
</pre><div class="para">
This prevents the file from being renamed, deleted or having links made to it.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-IPTables_Match_Options-TCP_Protocol">2.9.3.4.1. TCP
Protocol</h5></div></div></div><a id="d0e14933"
class="indexterm"/><div class="para">
These match options are available for the TCP protocol (<code
class="option">-p tcp</code>):
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--dport</code> — Sets the destination
port for the packet.
</div><div class="para">
To configure this option, use a network service name (such as www or smtp); a port
number; or a range of port numbers.
</div><div class="para">
To specify a range of port numbers, separate the two numbers with a colon (<code
class="option">:</code>). For example: <code
class="option">-p tcp --dport 3000:3200</code>. The largest acceptable
valid range is <code class="option">0:65535</code>.
</div><div class="para">
Use an exclamation point character (<code
class="option">!</code>) after the <code
class="option">--dport</code> option to match all packets that <span
class="emphasis"><em>do not</em></span> use that network
service or port.
</div><div class="para">
To browse the names and aliases of network services and the port numbers they use,
view the <code class="filename">/etc/services</code> file.
</div><div class="para">
The <code class="option">--destination-port</code> match
option is synonymous with <code class="option">--dport</code>.
</div></li><li><div class="para">
<code class="option">--sport</code> — Sets the source port of
the packet using the same options as <code
class="option">--dport</code>. The <code
class="option">--source-port</code> match option is synonymous with
<code class="option">--sport</code>.
</div></li><li><div class="para">
<code class="option">--syn</code> — Applies to all TCP
packets designed to initiate communication, commonly called <em
class="firstterm">SYN packets</em>. Any packets that carry a data
payload are not touched.
</div><div class="para">
Use an exclamation point character (<code
class="option">!</code>) after the <code
class="option">--syn</code> option to match all non-SYN packets.
</div></li><li><div class="para">
<code class="option">--tcp-flags <tested flag list>
<set flag list></code> — Allows TCP packets that have specific bits
(flags) set, to match a rule.
</div><div class="para">
The <code class="option">--tcp-flags</code> match option
accepts two parameters. The first parameter is the mask; a comma-separated list of flags
to be examined in the packet. The second parameter is a comma-separated list of flags that
must be set for the rule to match.
</div><div class="para">
The possible flags are:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">ACK</code>
</div></li><li><div class="para">
<code class="option">FIN</code>
</div></li><li><div class="para">
<code class="option">PSH</code>
</div></li><li><div class="para">
<code class="option">RST</code>
</div></li><li><div class="para">
<code class="option">SYN</code>
</div></li><li><div class="para">
<code class="option">URG</code>
</div></li><li><div class="para">
<code class="option">ALL</code>
</div></li><li><div class="para">
<code class="option">NONE</code>
</div></li></ul></div><div class="para">
For example, an <code class="command">iptables</code> rule
that contains the following specification only matches TCP packets that have the SYN flag
set and the ACK and FIN flags not set:
</div><div class="para">
<code class="command">--tcp-flags ACK,FIN,SYN SYN</code>
</div><div class="para">
Use the exclamation point character (<code
class="option">!</code>) after the <code
class="option">--tcp-flags</code> to reverse the effect of the match
option.
</div></li><li><div class="para">
<code class="option">--tcp-option</code> — Attempts to match
with TCP-specific options that can be set within a particular packet. This match option
can also be reversed with the exclamation point character (<code
class="option">!</code>).
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html"><strong>Prev</strong>2.9.3.3. IPTables
Parameter Options</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"><strong>Next</strong>2.9.3.4.2. UDP
Protocol</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Parameter Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="prev"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"
title="2.9.3.2. Command Options"/><link rel="next"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Co
ntent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Parameter_Options">2.9.3.3. IPTables
Parameter Options</h4></div></div></div><a
id="d0e14656" class="indexterm"/><div
class="para">
Certain <code class="command">iptables</code> commands,
including those used to add, append, delete, insert, or replace rules within a particular
chain, require various parameters to construct a packet filtering rule.
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">-c</code> — Resets the counters for a
particular rule. This parameter accepts the <code
class="option">PKTS</code> and <code
class="option">BYTES</code> options to specify which counter to reset.
</div></li><li><div class="para">
<code class="option">-d</code> — Sets the destination
hostname, IP address, or network of a packet that matches the rule. When matching a
network, the following IP address/netmask formats are supported:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option"><em
class="replaceable"><code>N.N.N.N</code></em>/<em
class="replaceable"><code>M.M.M.M</code></em></code>
— Where <em
class="replaceable"><code>N.N.N.N</code></em> is the IP
address range and <em
class="replaceable"><code>M.M.M.M</code></em> is the
netmask.
</div></li><li><div class="para">
<code class="option"><em
class="replaceable"><code>N.N.N.N</code></em>/<em
class="replaceable"><code>M</code></em></code> —
Where <em class="replaceable"><code>N.N.N.N</code></em>
is the IP address range and <em
class="replaceable"><code>M</code></em> is the bitmask.
</div></li></ul></div></li><li><div
class="para">
<code class="option">-f</code> — Applies this rule only to
fragmented packets.
</div><div class="para">
You can use the exclamation point character (<code
class="option">!</code>) option after this parameter to specify that
only unfragmented packets are matched.
</div><div class="note"><h2>Note</h2><div
class="para">
Distinguishing between fragmented and unfragmented packets is desirable, despite
fragmented packets being a standard part of the IP protocol.
</div><div class="para">
Originally designed to allow IP packets to travel over networks with differing
frame sizes, these days fragmentation is more commonly used to generate DoS attacks using
mal-formed packets. It's also worth noting that IPv6 disallows fragmentation
entirely.
</div></div></li><li><div class="para">
<code class="option">-i</code> — Sets the incoming network
interface, such as <code class="option">eth0</code> or <code
class="option">ppp0</code>. With <code
class="command">iptables</code>, this optional parameter may only be
used with the INPUT and FORWARD chains when used with the <code
class="option">filter</code> table and the PREROUTING chain with the
<code class="option">nat</code> and <code
class="option">mangle</code> tables.
</div><div class="para">
This parameter also supports the following special options:
</div><div class="itemizedlist"><ul><li><div
class="para">
Exclamation point character (<code class="option">!</code>)
— Reverses the directive, meaning any specified interfaces are excluded from this rule.
</div></li><li><div class="para">
Plus character (<code class="option">+</code>) — A wildcard
character used to match all interfaces that match the specified string. For example, the
parameter <code class="option">-i eth+</code> would apply this rule
to any Ethernet interfaces but exclude any other interfaces, such as <code
class="option">ppp0</code>.
</div></li></ul></div><div class="para">
If the <code class="option">-i</code> parameter is used but no
interface is specified, then every interface is affected by the rule.
</div></li><li><div class="para">
<code class="option">-j</code> — Jumps to the specified target
when a packet matches a particular rule.
</div><div class="para">
The standard targets are <code class="option">ACCEPT</code>,
<code class="option">DROP</code>, <code
class="option">QUEUE</code>, and <code
class="option">RETURN</code>.
</div><div class="para">
Extended options are also available through modules loaded by default with the
Fedora <code class="command">iptables</code> RPM package. Valid
targets in these modules include <code class="option">LOG</code>,
<code class="option">MARK</code>, and <code
class="option">REJECT</code>, among others. Refer to the <code
class="command">iptables</code> man page for more information about
these and other targets.
</div><div class="para">
This option can also be used to direct a packet matching a particular rule to a
user-defined chain outside of the current chain so that other rules can be applied to the
packet.
</div><div class="para">
If no target is specified, the packet moves past the rule with no action taken. The
counter for this rule, however, increases by one.
</div></li><li><div class="para">
<code class="option">-o</code> — Sets the outgoing network
interface for a rule. This option is only valid for the OUTPUT and FORWARD chains in the
<code class="option">filter</code> table, and the POSTROUTING chain
in the <code class="option">nat</code> and <code
class="option">mangle</code> tables. This parameter accepts the same
options as the incoming network interface parameter (<code
class="option">-i</code>).
</div></li><li><div class="para">
<code class="option">-p <protocol></code> — Sets
the IP protocol affected by the rule. This can be either <code
class="option">icmp</code>, <code
class="option">tcp</code>, <code
class="option">udp</code>, or <code
class="option">all</code>, or it can be a numeric value, representing
one of these or a different protocol. You can also use any protocols listed in the
<code class="filename">/etc/protocols</code> file.
</div><div class="para">
The "<code class="option">all</code>" protocol means
the rule applies to every supported protocol. If no protocol is listed with this rule, it
defaults to "<code class="option">all</code>".
</div></li><li><div class="para">
<code class="option">-s</code> — Sets the source for a
particular packet using the same syntax as the destination (<code
class="option">-d</code>) parameter.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"><strong>Prev</strong>2.9.3.2. Command
Options</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"><strong>Next</strong>2.9.3.4. IPTables
Match Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="prev"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"
title="2.9.3.5. Target Options"/><link rel="next"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"
title="2.9.4. Saving IPTables Rules"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Do
cumentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options">2.9.3.6. Listing
Options</h4></div></div></div><a id="d0e15519"
class="indexterm"/><div class="para">
The default list command, <code class="command">iptables -L
[<chain-name>]</code>, provides a very basic overview of the default
filter table's current chains. Additional options provide more information:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">-v</code> — Displays verbose output, such
as the number of packets and bytes each chain has processed, the number of packets and
bytes each rule has matched, and which interfaces apply to a particular rule.
</div></li><li><div class="para">
<code class="option">-x</code> — Expands numbers into their
exact values. On a busy system, the number of packets and bytes processed by a particular
chain or rule may be abbreviated to <code
class="computeroutput">Kilobytes</code>, <code
class="computeroutput">Megabytes</code> (Megabytes) or <code
class="computeroutput">Gigabytes</code>. This option forces the full
number to be displayed.
</div></li><li><div class="para">
<code class="option">-n</code> — Displays IP addresses and
port numbers in numeric format, rather than the default hostname and network service
format.
</div></li><li><div class="para">
<code class="option">--line-numbers</code> — Lists rules in
each chain next to their numeric order in the chain. This option is useful when attempting
to delete the specific rule in a chain or to locate where to insert a rule within a
chain.
</div></li><li><div class="para">
<code class="option">-t <table-name></code> —
Specifies a table name. If omitted, defaults to the filter table.
</div></li></ul></div><div class="para">
The following examples illustrate the use of several of these options. Note the
difference in the byte display by including the <code
class="option">-x</code> option.
</div><pre class="screen"><code
class="computeroutput"> [root@myserver ~]# iptables -L OUTPUT -v -n -x Chain
OUTPUT (policy ACCEPT 64005 packets, 6445791 bytes) pkts bytes target prot opt in out
source destination 1593 133812 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 [root@myserver
~]#iptables -L OUTPUT -v -n Chain OUTPUT (policy ACCEPT 64783 packets, 6492K bytes) pkts
bytes target prot opt in out source destination 1819 153K ACCEPT icmp -- * * 0.0.0.0/0
0.0.0.0/0 [root@myserver ~]# </code>
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"><strong>Prev</strong>2.9.3.5. Target
Options</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"><strong>Next</strong>2.9.4. Saving
IPTables Rules</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Options</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"
title="2.9.3.4.4. Additional Match Option Modules"/><link
rel="next"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"
title="2.9.3.6. Listing Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_
Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-Target_Options">2.9.3.5. Target
Options</h4></div></div></div><a id="d0e15360"
class="indexterm"/><div class="para">
When a packet has matched a particular rule, the rule can direct the packet to a
number of different targets which determine the appropriate action. Each chain has a
default target, which is used if none of the rules on that chain match a packet or if none
of the rules which match the packet specify a target.
</div><div class="para">
The following are the standard targets:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option"><em
class="replaceable"><code><user-defined-chain></code></em></code>
— A user-defined chain within the table. User-defined chain names must be unique. This
target passes the packet to the specified chain.
</div></li><li><div class="para">
<code class="option">ACCEPT</code> — Allows the packet through
to its destination or to another chain.
</div></li><li><div class="para">
<code class="option">DROP</code> — Drops the packet without
responding to the requester. The system that sent the packet is not notified of the
failure.
</div></li><li><div class="para">
<code class="option">QUEUE</code> — The packet is queued for
handling by a user-space application.
</div></li><li><div class="para">
<code class="option">RETURN</code> — Stops checking the packet
against rules in the current chain. If the packet with a <code
class="option">RETURN</code> target matches a rule in a chain called
from another chain, the packet is returned to the first chain to resume rule checking
where it left off. If the <code class="option">RETURN</code> rule is
used on a built-in chain and the packet cannot move up to its previous chain, the default
target for the current chain is used.
</div></li></ul></div><div class="para">
In addition, extensions are available which allow other targets to be specified. These
extensions are called target modules or match option modules and most only apply to
specific tables and situations. Refer to <a class="xref"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"
title="2.9.3.4.4. Additional Match Option Modules">Section 2.9.3.4.4,
“Additional Match Option Modules”</a> for more information about match option
modules.
</div><div class="para">
Many extended target modules exist, most of which only apply to specific tables or
situations. Some of the most popular target modules included by default in Fedora are:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">LOG</code> — Logs all packets that match
this rule. Because the packets are logged by the kernel, the <code
class="filename">/etc/syslog.conf</code> file determines where these
log entries are written. By default, they are placed in the <code
class="filename">/var/log/messages</code> file.
</div><div class="para">
Additional options can be used after the <code
class="option">LOG</code> target to specify the way in which logging
occurs:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--log-level</code> — Sets the priority
level of a logging event. Refer to the <code
class="filename">syslog.conf</code> man page for a list of priority
levels.
</div></li><li><div class="para">
<code class="option">--log-ip-options</code> — Logs any
options set in the header of an IP packet.
</div></li><li><div class="para">
<code class="option">--log-prefix</code> — Places a string
of up to 29 characters before the log line when it is written. This is useful for writing
syslog filters for use in conjunction with packet logging.
</div><div class="note"><h2>Note</h2><div
class="para">
Due to an issue with this option, you should add a trailing space to the <em
class="replaceable"><code>log-prefix</code></em> value.
</div></div></li><li><div class="para">
<code class="option">--log-tcp-options</code> — Logs any
options set in the header of a TCP packet.
</div></li><li><div class="para">
<code class="option">--log-tcp-sequence</code> — Writes the
TCP sequence number for the packet in the log.
</div></li></ul></div></li><li><div
class="para">
<code class="option">REJECT</code> — Sends an error packet
back to the remote system and drops the packet.
</div><div class="para">
The <code class="option">REJECT</code> target accepts <code
class="option">--reject-with <em
class="replaceable"><code><type></code></em></code>
(where <em
class="replaceable"><code><type></code></em>
is the rejection type) allowing more detailed information to be returned with the error
packet. The message <code
class="computeroutput">port-unreachable</code> is the default error
type given if no other option is used. Refer to the <code
class="command">iptables</code> man page for a full list of <code
class="option"><em
class="replaceable"><code><type></code></em></code>
options.
</div></li></ul></div><div class="para">
Other target extensions, including several that are useful for IP masquerading using
the <code class="option">nat</code> table, or with packet alteration
using the <code class="option">mangle</code> table, can be found in
the <code class="command">iptables</code> man page.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"><strong>Prev</strong>2.9.3.4.4. Additional
Match Option Modules</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"><strong>Next</strong>2.9.3.6. Listing
Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Common_Exploits_and_Attacks.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Exploits and Attacks</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/><link rel="prev"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"
title="1.3.4.2. Vulnerable Client Applications"/><link
rel="next" href="sect-Security_Guide-Security_Updates.html"
title="1.5. Security Updates"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Security_Updates.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Common_Exploits_and_Attacks">1.4. Common Exploits and
Attacks</h2></div></div></div><a id="d0e1212"
class="indexterm"/><a id="d0e1217"
class="indexterm"/><div class="para">
<a class="xref"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html#tabl-Security_Guide-Common_Exploits_and_Attacks-Common_Exploits"
title="Table 1.1. Common Exploits">Table 1.1, “Common Exploits”</a>
details some of the most common exploits and entry points used by intruders to access
organizational network resources. Key to these common exploits are the explanations of how
they are performed and how administrators can properly safeguard their network against
such attacks.
</div><div class="table"
id="tabl-Security_Guide-Common_Exploits_and_Attacks-Common_Exploits"><div
class="table-contents"><table summary="Common Exploits"
border="1"><colgroup><col width="2*"/><col
width="4*"/><col
width="4*"/></colgroup><thead><tr><th>
Exploit
</th><th>
Description
</th><th>
Notes
</th></tr></thead><tbody><tr><td>
Null or Default Passwords
</td><td>
Leaving administrative passwords blank or using a default password set by the
product vendor. This is most common in hardware such as routers and firewalls, though some
services that run on Linux can contain default administrator passwords (though Fedora 5
does not ship with them).
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Commonly associated with networking hardware such as
routers, firewalls, VPNs, and network attached storage (NAS) appliances.
</td></tr><tr><td> Common in many legacy operating systems,
especially OSes that bundle services (such as UNIX and Windows.)
</td></tr><tr><td> Administrators sometimes create privileged user
accounts in a rush and leave the password null, a perfect entry point for malicious users
who discover the account. </td></tr></table>
</td></tr><tr><td>
Default Shared Keys
</td><td>
Secure services sometimes package default security keys for development or
evaluation testing purposes. If these keys are left unchanged and are placed in a
production environment on the Internet, <span
class="emphasis"><em>all</em></span> users with the same
default keys have access to that shared-key resource, and any sensitive information that
it contains.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Most common in wireless access points and preconfigured
secure server appliances. </td></tr></table>
</td></tr><tr><td>
IP Spoofing
</td><td>
A remote machine acts as a node on your local network, finds vulnerabilities with
your servers, and installs a backdoor program or trojan horse to gain control over your
network resources.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Spoofing is quite difficult as it involves the attacker
predicting TCP/IP SYN-ACK numbers to coordinate a connection to target systems, but
several tools are available to assist crackers in performing such a vulnerability.
</td></tr><tr><td> Depends on target system running services (such
as <code class="command">rsh</code>, <code
class="command">telnet</code>, FTP and others) that use <em
class="firstterm">source-based</em> authentication techniques, which
are not recommended when compared to PKI or other forms of encrypted authentication used
in <code class="command">ssh</code> or SSL/TLS.
</td></tr></table>
</td></tr><tr><td>
Eavesdropping
</td><td>
Collecting data that passes between two active nodes on a network by eavesdropping
on the connection between the two nodes.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> This type of attack works mostly with plain text
transmission protocols such as Telnet, FTP, and HTTP transfers.
</td></tr><tr><td> Remote attacker must have access to a
compromised system on a LAN in order to perform such an attack; usually the cracker has
used an active attack (such as IP spoofing or man-in-the-middle) to compromise a system on
the LAN. </td></tr><tr><td> Preventative measures include services
with cryptographic key exchange, one-time passwords, or encrypted authentication to
prevent password snooping; strong encryption during transmission is also advised.
</td></tr></table>
</td></tr><tr><td>
Service Vulnerabilities
</td><td>
An attacker finds a flaw or loophole in a service run over the Internet; through
this vulnerability, the attacker compromises the entire system and any data that it may
hold, and could possibly compromise other systems on the network.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> HTTP-based services such as CGI are vulnerable to
remote command execution and even interactive shell access. Even if the HTTP service runs
as a non-privileged user such as "nobody", information such as configuration
files and network maps can be read, or the attacker can start a denial of service attack
which drains system resources or renders it unavailable to other users.
</td></tr><tr><td> Services sometimes can have vulnerabilities
that go unnoticed during development and testing; these vulnerabilities (such as <em
class="firstterm">buffer overflows</em>, where attackers crash a
service using arbitary values that fill the memory buffer of an application, giving the
attacker an interactive command prompt from which they may execute arbitrary commands) can
give complete administrative control to an attacker.
</td></tr><tr><td> Administrators should make sure that services
do not run as the root user,
and should stay vigilant of patches and errata updates for applications from vendors or
security organizations such as CERT and CVE. </td></tr></table>
</td></tr><tr><td>
Application Vulnerabilities
</td><td>
Attackers find faults in desktop and workstation applications (such as e-mail
clients) and execute arbitrary code, implant trojan horses for future compromise, or crash
systems. Further exploitation can occur if the compromised workstation has administrative
privileges on the rest of the network.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> Workstations and desktops are more prone to
exploitation as workers do not have the expertise or experience to prevent or detect a
compromise; it is imperative to inform individuals of the risks they are taking when they
install unauthorized software or open unsolicited email attachments.
</td></tr><tr><td> Safeguards can be implemented such that email
client software does not automatically open or execute attachments. Additionally, the
automatic update of workstation software via Red Hat Network or other system management
services can alleviate the burdens of multi-seat security deployments.
</td></tr></table>
</td></tr><tr><td>
Denial of Service (DoS) Attacks
</td><td>
Attacker or group of attackers coordinate against an organization's network or
server resources by sending unauthorized packets to the target host (either server,
router, or workstation). This forces the resource to become unavailable to legitimate
users.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> The most reported DoS case in the US occurred in 2000.
Several highly-trafficked commercial and government sites were rendered unavailable by a
coordinated ping flood attack using several compromised systems with high bandwidth
connections acting as <em class="firstterm">zombies</em>, or
redirected broadcast nodes. </td></tr><tr><td> Source packets are
usually forged (as well as rebroadcasted), making investigation as to the true source of
the attack difficult. </td></tr><tr><td> Advances in ingress
filtering (IETF rfc2267) using <code class="command">iptables</code>
and Network IDSes such as <code class="command">snort</code> assist
administrators in tracking down and preventing distributed DoS attacks.
</td></tr></table>
</td></tr></tbody></table></div><h6>Table 1.1. Common
Exploits</h6></div><br class="table-break"/></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html"><strong>Prev</strong>1.3.4.2. Vulnerable
Client Applications</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Security_Updates.html"><strong>Next</strong>1.5. Security
Updates</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Installation Instructions</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"
title="3.8. 7-Zip Encrypted Archives"/><link rel="prev"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"
title="3.8. 7-Zip Encrypted Archives"/><link rel="next"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"
title="3.8.3. Step-by-Step Usage
Instructions"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="C
ommon_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions">3.8.2. Step-by-Step
Installation Instructions</h3></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
Open a Terminal: <code class="code">Click
''Applications'' -> ''System Tools'' ->
''Terminal''</code>
</div></li><li><div class="para">
Install 7-Zip with sudo access: <code class="code">sudo yum install
p7zip</code>
</div></li><li><div class="para">
Close the Terminal: <code class="code">exit</code>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"><strong>Prev</strong>3.8. 7-Zip
Encrypted Archives</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"><strong>Next</strong>3.8.3. Step-by-Step
Usage Instructions</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
of note</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"
title="3.8. 7-Zip Encrypted Archives"/><link rel="prev"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"
title="3.8.3. Step-by-Step Usage Instructions"/><link rel="next"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"
title="Chapter 4. General Principles of Information
Security"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><im
g src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note">3.8.4. Things
of note</h3></div></div></div><div class="para">
7-Zip is not shipped by default with Microsoft Windows or Mac OS X. If you need to use
your 7-Zip files on those platforms you will need to install the appropriate version of
7-Zip on those computers. See the 7-Zip <a
href="http://www.7-zip.org/download.html">download page</a>.
</div><div class="para">
GNOME's File Roller application will recognize your .7z files and attempt to open
them, but it will fail with the error "''An error occurred while loading the
archive.''" when it attempts to do so. This is because File Roller does not
currently support the extraction of encrypted 7-Zip files. A bug report
([
http://bugzilla.gnome.org/show_bug.cgi?id=490732 Gnome Bug 490732]) has been submitted.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html"><strong>Prev</strong>3.8.3. Step-by-Step
Usage Instructions</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"><strong>Next</strong>Chapter 4. General
Principles of Information
Secu...</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Usage Instructions</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"
title="3.8. 7-Zip Encrypted Archives"/><link rel="prev"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"
title="3.8.2. Step-by-Step Installation Instructions"/><link
rel="next"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"
title="3.8.4. Things of note"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.or
g"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Usage_Instructions">3.8.3. Step-by-Step
Usage Instructions</h3></div></div></div><div
class="para">
By following these instructions you are going to compress and encrypt your
"Documents" directory. Your original "Documents" directory will remain
unaltered. This technique can be applied to any directory or file you have access to on
the filesystem.
</div><div class="itemizedlist"><ul><li><div
class="para">
Open a Terminal:<code class="code">Click
''Applications'' -> ''System Tools'' ->
''Terminal''</code>
</div></li><li><div class="para">
Compress and Encrypt: (enter a password when prompted) <code
class="code">7za a -mhe=on -ms=on -p Documents.7z Documents/</code>
</div></li></ul></div><div class="para">
The "Documents" directory is now compressed and encrypted. The following
instructions will move the encrypted archive somewhere new and then extract it.
</div><div class="itemizedlist"><ul><li><div
class="para">
Create a new directory: <code class="code">mkdir
newplace</code>
</div></li><li><div class="para">
Move the encrypted file: <code class="code">mv Documents.7z
newplace</code>
</div></li><li><div class="para">
Go to the new directory: <code class="code">cd newplace</code>
</div></li><li><div class="para">
Extract the file: (enter the password when prompted) <code
class="code">7za x Documents.7z</code>
</div></li></ul></div><div class="para">
The archive is now extracted into the new location. The following instructions will
clean up all the prior steps and restore your computer to its previous state.
</div><div class="itemizedlist"><ul><li><div
class="para">
Go up a directory: <code class="code">cd ..</code>
</div></li><li><div class="para">
Delete the test archive and test extraction: <code class="code">rm -r
newplace</code>
</div></li><li><div class="para">
Close the Terminal: <code class="code">exit</code>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"><strong>Prev</strong>3.8.2. Step-by-Step
Installation Instructions</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Things_of_note.html"><strong>Next</strong>3.8.4. Things
of note</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Encrypted Archives</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"
title="3.7.5. Links of Interest"/><link rel="next"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"
title="3.8.2. Step-by-Step Installation
Instructions"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png
" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives">3.8. 7-Zip
Encrypted Archives</h2></div></div></div><div
class="para">
<a
href="http://www.7-zip.org/">7-Zip</a> is a cross-platform,
next generation, file compression tool that can also use strong encryption (AES-256) to
protect the contents of the archive. This is extremely useful when you need to move data
between multiple computers that use varying operating systems (i.e. Linux at home, Windows
at work) and you want a portable encryption solution.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation">3.8.1. 7-Zip
Installation in Fedora</h3></div></div></div><div
class="para">
7-Zip is not a base package in Fedora, but it is available in the software repository.
Once installed, the package will update alongside the rest of the software on the computer
with no special attention necessary.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"><strong>Prev</strong>3.7.5. Links
of Interest</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives-Installation-Instructions.html"><strong>Next</strong>3.8.2. Step-by-Step
Installation Instructions</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... Disk
Encryption</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="next"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"
title="3.3. File Based Encryption"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li clas
s="previous"><a accesskey="p"
href="chap-Security_Guide-Encryption.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Encryption-Protecting_Data_at_Rest-Full_Disk_Encryption">3.2. Full
Disk Encryption</h2></div></div></div><div
class="para">
Full disk or partition encryption is one of the best ways of protecting your data. Not
only is each file protected but also the temporary storage that may contain parts of these
files is also protected. Full disk encryption will protect all of your files so you
don't have to worry about selecting what you want to protect and possibly missing a
file.
</div><div class="para">
Fedora 9 natively supports LUKS Encryption. LUKS will bulk encrypt your hard drive
partitions so that while your computer is off your data is protected. This will also
protect your computer from attackers attempting to use single-user-mode to login to your
computer or otherwise gain access. LUKS can be manually setup on Fedora 8.
</div><div class="para">
Full disk encryption solutions like LUKS only protect the data when your computer is
off. Once the computer is on and LUKS has decrypted the disk, the files on that disk are
available to anyone who would normally have access to them. To protect your files when the
computer is on, use full disk encryption in combination with another solution such as file
based encryption. Also remember to lock your computer whenever you are away from it. A
passphrase protected screen saver set to activate after a few minutes of inactivity is a
good way to keep intruders out.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Encryption.html"><strong>Prev</strong>Chapter 3. Encryption</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="Security_Guide-Encryption-Protecting_Data_at_Rest-File_Based_Encryption.html"><strong>Next</strong>3.3. File
Based Encryption</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Your Future Needs</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/><link rel="prev"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"
title="1.2.3.4. VLAD the Scanner"/><link rel="next"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"
title="1.3. Attackers and Vulnerabilities"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_ri
ght.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs">1.2.3.5. Anticipating
Your Future Needs</h4></div></div></div><div
class="para">
Depending upon your target and resources, there are many tools available. There are
tools for wireless networks, Novell networks, Windows systems, Linux systems, and more.
Another essential part of performing assessments may include reviewing physical security,
personnel screening, or voice/PBX network assessment. New concepts, such as <em
class="firstterm">war walking</em> scanning the perimeter of your
enterprise's physical structures for wireless network vulnerabilities are some
emerging concepts that you can investigate and, if needed, incorporate into your
assessments. Imagination and exposure are the only limits of planning and conducting
vulnerability assessments.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"><strong>Prev</strong>1.2.3.4. VLAD
the Scanner</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities.html"><strong>Next</strong>1.3. Attackers
and Vulnerabilities</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Evaluating_the_Tools-Nessus.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/><link rel="prev"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/><link rel="next"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"
title="1.2.3.3. Nikto"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></
a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Evaluating_the_Tools-Nessus">1.2.3.2. Nessus</h4></div></div></div><a
id="d0e847" class="indexterm"/><a id="d0e852"
class="indexterm"/><div class="para">
Nessus is a full-service security scanner. The plug-in architecture of Nessus allows
users to customize it for their systems and networks. As with any scanner, Nessus is only
as good as the signature database it relies upon. Fortunately, Nessus is frequently
updated and features full reporting, host scanning, and real-time vulnerability searches.
Remember that there could be false positives and false negatives, even in a tool as
powerful and as frequently updated as Nessus.
</div><div class="note"><h2>Note</h2><div
class="para">
Nessus is not included with Fedora and is not supported. It has been included in this
document as a reference to users who may be interested in using this popular application.
</div></div><div class="para">
For more information about Nessus, refer to the official website at the following
URL:
</div><div class="para">
<a
href="http://www.nessus.org/">http://www.nessus.org/</a>
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"><strong>Prev</strong>1.2.3. Evaluating
the Tools</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"><strong>Next</strong>1.2.3.3. Nikto</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Evaluating_the_Tools-Nikto.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/><link rel="prev"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"
title="1.2.3.2. Nessus"/><link rel="next"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"
title="1.2.3.4. VLAD the Scanner"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Evaluating_the_Tools-Nikto">1.2.3.3. Nikto</h4></div></div></div><a
id="d0e872" class="indexterm"/><a id="d0e877"
class="indexterm"/><div class="para">
Nikto is an excellent common gateway interface (CGI) script scanner. Nikto not only
checks for CGI vulnerabilities but does so in an evasive manner, so as to elude intrusion
detection systems. It comes with thorough documentation which should be carefully reviewed
prior to running the program. If you have Web servers serving up CGI scripts, Nikto can be
an excellent resource for checking the security of these servers.
</div><div class="note"><h2>Note</h2><div
class="para">
Nikto is not included with Fedora and is not supported. It has been included in this
document as a reference to users who may be interested in using this popular application.
</div></div><div class="para">
More information about Nikto can be found at the following URL:
</div><div class="para">
<a
href="http://www.cirt.net/code/nikto.shtml">http://www.cirt....
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"><strong>Prev</strong>1.2.3.2. Nessus</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html"><strong>Next</strong>1.2.3.4. VLAD
the Scanner</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the Scanner</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/><link rel="prev"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"
title="1.2.3.3. Nikto"/><link rel="next"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"
title="1.2.3.5. Anticipating Your Future
Needs"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Evaluating_the_Tools-VLAD_the_Scanner">1.2.3.4. VLAD
the Scanner</h4></div></div></div><a id="d0e897"
class="indexterm"/><a id="d0e902"
class="indexterm"/><div class="para">
VLAD is a vulnerabilities scanner developed by the <acronym
class="acronym">RAZOR</acronym> team at Bindview, Inc., which checks
for the SANS Top Ten list of common security issues (SNMP issues, file sharing issues,
etc.). While not as full-featured as Nessus, VLAD is worth investigating.
</div><div class="note"><h2>Note</h2><div
class="para">
VLAD is not included with Fedora and is not supported. It has been included in this
document as a reference to users who may be interested in using this popular application.
</div></div><div class="para">
More information about VLAD can be found on the RAZOR team website at the following
URL:
</div><div class="para">
<a
href="http://www.bindview.com/Support/Razor/Utilities/">http...
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Evaluating_the_Tools-Nikto.html"><strong>Prev</strong>1.2.3.3. Nikto</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Anticipating_Your_Future_Needs.html"><strong>Next</strong>1.2.3.5. Anticipating
Your Future Needs</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and IPTables</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"
title="2.8.5. FORWARD and NAT Rules"/><link rel="prev"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"
title="2.8.5.2. Prerouting"/><link rel="next"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"
title="2.8.6. Malicious Software and Spoofed IP
Addresses"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image
_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables">2.8.5.3. DMZs
and IPTables</h4></div></div></div><a id="d0e13629"
class="indexterm"/><a id="d0e13635"
class="indexterm"/><a id="d0e13640"
class="indexterm"/><a id="d0e13643"
class="indexterm"/><a id="d0e13651"
class="indexterm"/><div class="para">
You can create <code class="command">iptables</code> rules to
route traffic to certain machines, such as a dedicated HTTP or FTP server, in a <em
class="firstterm">demilitarized zone</em> (<acronym
class="acronym">DMZ</acronym>). A <acronym
class="acronym">DMZ</acronym> is a special local subnetwork dedicated
to providing services on a public carrier, such as the Internet.
</div><div class="para">
For example, to set a rule for routing incoming HTTP requests to a dedicated HTTP
server at 10.0.4.2 (outside of the 192.168.1.0/24 range of the LAN), NAT uses the <code
class="computeroutput">PREROUTING</code> table to forward the packets
to the appropriate destination:
</div><pre class="screen">[root@myServer ~ ] # iptables -t nat -A
PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.0.4.2:80
</pre><div class="para">
With this command, all HTTP connections to port 80 from outside of the LAN are routed
to the HTTP server on a network separate from the rest of the internal network. This form
of network segmentation can prove safer than allowing HTTP connections to a machine on the
network.
</div><div class="para">
If the HTTP server is configured to accept secure connections, then port 443 must be
forwarded as well.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"><strong>Prev</strong>2.8.5.2. Prerouting</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"><strong>Next</strong>2.8.6. Malicious
Software and Spoofed IP
Addresses</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"
title="2.8.5. FORWARD and NAT Rules"/><link rel="prev"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"
title="2.8.5. FORWARD and NAT Rules"/><link rel="next"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"
title="2.8.5.3. DMZs and IPTables"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation Site"/
</a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting">2.8.5.2. Prerouting</h4></div></div></div><a
id="d0e13595" class="indexterm"/><div class="para">
If you have a server on your internal network that you want make available
externally, you can use the <code class="option">-j DNAT</code>
target of the PREROUTING chain in NAT to specify a destination IP address and port where
incoming packets requesting a connection to your internal service can be forwarded.
</div><div class="para">
For example, if you want to forward incoming HTTP requests to your dedicated Apache
HTTP Server at 172.31.0.23, use the following command:
</div><pre class="screen">[root@myServer ~ ] # iptables -t nat -A
PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 172.31.0.23:80
</pre><div class="para">
This rule specifies that the <acronym
class="acronym">nat</acronym> table use the built-in PREROUTING chain
to forward incoming HTTP requests exclusively to the listed destination IP address of
172.31.0.23.
</div><div class="note"><h2>Note</h2><div
class="para">
If you have a default policy of DROP in your FORWARD chain, you must append a rule to
forward all incoming HTTP requests so that destination NAT routing is possible. To do
this, use the following command:
</div><pre class="screen">[root@myServer ~ ] # iptables -A
FORWARD -i eth0 -p tcp --dport 80 -d 172.31.0.23 -j ACCEPT
</pre><div class="para">
This rule forwards all incoming HTTP requests from the firewall to the intended
destination; the Apache HTTP Server behind the firewall.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"><strong>Prev</strong>2.8.5. FORWARD
and NAT Rules</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"><strong>Next</strong>2.8.5.3. DMZs
and IPTables</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-Additional_Resources.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Resources</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Firewalls-IPv6.html"
title="2.8.8. IPv6"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"
title="2.8.9.2. Useful Firewall Websites"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous">
<a accesskey="p"
href="sect-Security_Guide-Firewalls-IPv6.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Additional_Resources">2.8.9. Additional
Resources</h3></div></div></div><a id="d0e13868"
class="indexterm"/><a id="d0e13873"
class="indexterm"/><a id="d0e13878"
class="indexterm"/><div class="para">
There are several aspects to firewalls and the Linux Netfilter subsystem that could not
be covered in this chapter. For more information, refer to the following resources.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Installed_Firewall_Documentation">2.8.9.1. Installed
Firewall Documentation</h4></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables">Section 2.9, “IPTables”</a> for more detailed
information on the <code class="command">iptables</code> command,
including definitions for many command options.
</div></li><li><div class="para">
The <code class="command">iptables</code> man page contains a
brief summary of the various options.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls-IPv6.html"><strong>Prev</strong>2.8.8. IPv6</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_Firewall_Websites.html"><strong>Next</strong>2.8.9.2. Useful
Firewall Websites</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Firewall Configuration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="next"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"
title="2.8.2.2. Enabling and Disabling the
Firewall"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration">2.8.2. Basic
Firewall Configuration</h3></div></div></div><a
id="d0e12871" class="indexterm"/><div
class="para">
Just as a firewall in a building attempts to prevent a fire from spreading, a computer
firewall attempts to prevent malicious software from spreading to your computer. It also
helps to prevent unauthorized users from accessing your computer.
</div><div class="para">
In a default Fedora installation, a firewall exists between your computer or network
and any untrusted networks, for example the Internet. It determines which services on your
computer remote users can access. A properly configured firewall can greatly increase the
security of your system. It is recommended that you configure a firewall for any Fedora
system with an Internet connection.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Basic_Firewall_Configuration-RHSECLEVELTOOL">2.8.2.1. <span
class="application"><strong>Security Level Configuration
Tool</strong></span></h4></div></div></div><a
id="d0e12885" class="indexterm"/><a id="d0e12891"
class="indexterm"/><div class="para">
During the <span class="guilabel"><strong>Firewall
Configuration</strong></span> screen of the Fedora installation, you were
given the option to enable a basic firewall as well as to allow specific devices, incoming
services, and ports.
</div><div class="para">
After installation, you can change this preference by using the <span
class="application"><strong>Security Level Configuration
Tool</strong></span>.
</div><div class="para">
To start this application, use the following command:
</div><pre class="screen">[root@myServer ~] #
system-config-securitylevel
</pre><div class="figure"
id="figu-Security_Guide-RHSECLEVELTOOL-RHSECLEVELTOOL"><div
class="figure-contents"><div class="mediaobject"><img
src="images/rh-securitylevel.png" alt="Security Level Configuration
Tool"/><div class="longdesc"><div class="para">
Security Level Configuration
</div></div></div></div><h6>Figure 2.15. <span
class="application">Security Level Configuration
Tool</span></h6></div><br class="figure-break"/><div
class="note"><h2>Note</h2><div class="para">
The <span class="application"><strong>Security Level
Configuration Tool</strong></span> only configures a basic firewall. If the
system needs more complex rules, refer to <a class="xref"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables">Section 2.9, “IPTables”</a> for details on
configuring specific <code class="command">iptables</code> rules.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls.html"><strong>Prev</strong>2.8. Firewalls</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Basic_Firewall_Configuration-Enabling_and_Disabling_the_Firewall.html"><strong>Next</strong>2.8.2.2. Enabling
and Disabling the Firewall</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IPTables Filtering</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"
title="2.8.3.3. Saving and Restoring IPTables Rules"/><link
rel="next"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"
title="2.8.5. FORWARD and NAT Rules"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Common_IPTables_Filtering">2.8.4. Common
IPTables Filtering</h3></div></div></div><a
id="d0e13368" class="indexterm"/><a id="d0e13376"
class="indexterm"/><a id="d0e13384"
class="indexterm"/><div class="para">
Preventing remote attackers from accessing a LAN is one of the most important aspects
of network security. The integrity of a LAN should be protected from malicious remote
users through the use of stringent firewall rules.
</div><div class="para">
However, with a default policy set to block all incoming, outgoing, and forwarded
packets, it is impossible for the firewall/gateway and internal LAN users to communicate
with each other or with external resources.
</div><div class="para">
To allow users to perform network-related functions and to use networking applications,
administrators must open certain ports for communication.
</div><div class="para">
For example, to allow access to port 80 <span
class="emphasis"><em>on the firewall</em></span>, append
the following rule:
</div><pre class="screen">[root@myServer ~ ] # iptables -A INPUT
-p tcp -m tcp --dport 80 -j ACCEPT
</pre><div class="para">
This allows users to browse websites that communicate using the standard port 80. To
allow access to secure websites (for example,
https://www.example.com/), you also need to
provide access to port 443, as follows:
</div><pre class="screen">[root@myServer ~ ] # iptables -A INPUT
-p tcp -m tcp --dport 443 -j ACCEPT
</pre><div class="important"><h2>Important</h2><div
class="para">
When creating an <code class="command">iptables</code> ruleset,
order is important.
</div><div class="para">
If a rule specifies that any packets from the 192.168.100.0/24 subnet be dropped, and
this is followed by a rule that allows packets from 192.168.100.13 (which is within the
dropped subnet), then the second rule is ignored.
</div><div class="para">
The rule to allow packets from 192.168.100.13 must precede the rule that drops the
remainder of the subnet.
</div><div class="para">
To insert a rule in a specific location in an existing chain, use the <code
class="option">-I</code> option. For example:
</div><pre class="screen">[root@myServer ~ ] # iptables -I INPUT
1 -i lo -p all -j ACCEPT
</pre><div class="para">
This rule is inserted as the first rule in the INPUT chain to allow local loopback
device traffic.
</div></div><div class="para">
There may be times when you require remote access to the LAN. Secure services, for
example SSH, can be used for encrypted remote connection to LAN services.
</div><div class="para">
Administrators with PPP-based resources (such as modem banks or bulk ISP accounts),
dial-up access can be used to securely circumvent firewall barriers. Because they are
direct connections, modem connections are typically behind a firewall/gateway.
</div><div class="para">
For remote users with broadband connections, however, special cases can be made. You
can configure <code class="command">iptables</code> to accept
connections from remote SSH clients. For example, the following rules allow remote SSH
access:
</div><pre class="screen">[root@myServer ~ ] # iptables -A INPUT
-p tcp --dport 22 -j ACCEPT
[root@myServer ~ ] # iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
</pre><div class="para">
These rules allow incoming and outbound access for an individual system, such as a
single PC directly connected to the Internet or a firewall/gateway. However, they do not
allow nodes behind the firewall/gateway to access these services. To allow LAN access to
these services, you can use <em class="firstterm">Network Address
Translation</em> (<acronym class="acronym">NAT</acronym>) with
<code class="command">iptables</code> filtering rules.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"><strong>Prev</strong>2.8.3.3. Saving
and Restoring IPTables Rules</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html"><strong>Next</strong>2.8.5. FORWARD
and NAT Rules</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and NAT Rules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"
title="2.8.4. Common IPTables Filtering"/><link rel="next"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"
title="2.8.5.2. Prerouting"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li c
lass="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-FORWARD_and_NAT_Rules">2.8.5. <code
class="computeroutput">FORWARD</code> and <acronym
class="acronym">NAT</acronym>
Rules</h3></div></div></div><a id="d0e13460"
class="indexterm"/><a id="d0e13465"
class="indexterm"/><a id="d0e13468"
class="indexterm"/><a id="d0e13475"
class="indexterm"/><a id="d0e13483"
class="indexterm"/><div class="para">
Most ISPs provide only a limited number of publicly routable IP addresses to the
organizations they serve.
</div><div class="para">
Administrators must, therefore, find alternative ways to share access to Internet
services without giving public IP addresses to every node on the LAN. Using private IP
addresses is the most common way of allowing all nodes on a LAN to properly access
internal and external network services.
</div><div class="para">
Edge routers (such as firewalls) can receive incoming transmissions from the Internet
and route the packets to the intended LAN node. At the same time, firewalls/gateways can
also route outgoing requests from a LAN node to the remote Internet service.
</div><div class="para">
This forwarding of network traffic can become dangerous at times, especially with the
availability of modern cracking tools that can spoof <span
class="emphasis"><em>internal</em></span> IP addresses and
make the remote attacker's machine act as a node on your LAN.
</div><div class="para">
To prevent this, <code class="command">iptables</code> provides
routing and forwarding policies that can be implemented to prevent abnormal usage of
network resources.
</div><div class="para">
The <code class="computeroutput">FORWARD</code> chain allows an
administrator to control where packets can be routed within a LAN. For example, to allow
forwarding for the entire LAN (assuming the firewall/gateway is assigned an internal IP
address on eth1), use the following rules:
</div><pre class="screen">[root@myServer ~ ] # iptables -A FORWARD
-i eth1 -j ACCEPT
[root@myServer ~ ] # iptables -A FORWARD -o eth1 -j ACCEPT
</pre><div class="para">
This rule gives systems behind the firewall/gateway access to the internal network. The
gateway routes packets from one LAN node to its intended destination node, passing all
packets through its <code class="filename">eth1</code> device.
</div><div class="note"><h2>Note</h2><div
class="para">
By default, the IPv4 policy in Fedora kernels disables support for IP forwarding. This
prevents machines that run Fedora from functioning as dedicated edge routers. To enable IP
forwarding, use the following command:
</div><pre class="screen">[root@myServer ~ ] # sysctl -w
net.ipv4.ip_forward=1
</pre><div class="para">
This configuration change is only valid for the current session; it does not persist
beyond a reboot or network service restart. To permanently set IP forwarding, edit the
<code class="filename">/etc/sysctl.conf</code> file as follows:
</div><div class="para">
Locate the following line:
</div><pre class="screen">net.ipv4.ip_forward = 0
</pre><div class="para">
Edit it to read as follows:
</div><pre class="screen">net.ipv4.ip_forward = 1
</pre><div class="para">
Use the following command to enable the change to the <code
class="filename">sysctl.conf</code> file:
</div><pre class="screen">[root@myServer ~ ] # sysctl -p
/etc/sysctl.conf
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-FORWARD_and_NAT_Rules-Postrouting_and_IP_Masquerading">2.8.5.1. Postrouting
and IP Masquerading</h4></div></div></div><a
id="d0e13549" class="indexterm"/><a id="d0e13557"
class="indexterm"/><div class="para">
Accepting forwarded packets via the firewall's internal IP device allows LAN nodes
to communicate with each other; however they still cannot communicate externally to the
Internet.
</div><div class="para">
To allow LAN nodes with private IP addresses to communicate with external public
networks, configure the firewall for <em class="firstterm">IP
masquerading</em>, which masks requests from LAN nodes with the IP address of the
firewall's external device (in this case, eth0):
</div><pre class="screen">[root@myServer ~ ] # iptables -t nat -A
POSTROUTING -o eth0 -j MASQUERADE
</pre><div class="para">
This rule uses the NAT packet matching table (<code class="option">-t
nat</code>) and specifies the built-in POSTROUTING chain for NAT (<code
class="option">-A POSTROUTING</code>) on the firewall's external
networking device (<code class="option">-o eth0</code>).
</div><div class="para">
POSTROUTING allows packets to be altered as they are leaving the firewall's
external device.
</div><div class="para">
The <code class="option">-j MASQUERADE</code> target is
specified to mask the private IP address of a node with the external IP address of the
firewall/gateway.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"><strong>Prev</strong>2.8.4. Common
IPTables Filtering</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-Prerouting.html"><strong>Next</strong>2.8.5.2. Prerouting</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Connection Tracking</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"
title="2.8.6. Malicious Software and Spoofed IP Addresses"/><link
rel="next" href="sect-Security_Guide-Firewalls-IPv6.html"
title="2.8.8. IPv6"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-IPv6.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking">2.8.7. IPTables
and Connection Tracking</h3></div></div></div><a
id="d0e13752" class="indexterm"/><a id="d0e13757"
class="indexterm"/><a id="d0e13762"
class="indexterm"/><a id="d0e13768"
class="indexterm"/><div class="para">
You can inspect and restrict connections to services based on their <em
class="firstterm">connection state.</em> A module within <code
class="command">iptables</code> uses a method called <em
class="firstterm">connection tracking</em> to store information about
incoming connections. You can allow or deny access based on the following connection
states:
</div><a id="d0e13785" class="indexterm"/><a
id="d0e13793" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<code class="option">NEW</code> — A packet requesting a new
connection, such as an HTTP request.
</div></li><li><div class="para">
<code class="option">ESTABLISHED</code> — A packet that is part
of an existing connection.
</div></li><li><div class="para">
<code class="option">RELATED</code> — A packet that is
requesting a new connection but is part of an existing connection. For example, FTP uses
port 21 to establish a connection, but data is transferred on a different port (typically
port 20).
</div></li><li><div class="para">
<code class="option">INVALID</code> — A packet that is not part
of any connections in the connection tracking table.
</div></li></ul></div><div class="para">
You can use the stateful functionality of <code
class="command">iptables</code> connection tracking with any network
protocol, even if the protocol itself is stateless (such as UDP). The following example
shows a rule that uses connection tracking to forward only the packets that are associated
with an established connection:
</div><pre class="screen">[root@myServer ~ ] # iptables -A FORWARD
-m state --state ESTABLISHED,RELATED -j ACCEPT
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html"><strong>Prev</strong>2.8.6. Malicious
Software and Spoofed IP Addresses</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-IPv6.html"><strong>Next</strong>2.8.8. IPv6</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-IPv6.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"
title="2.8.7. IPTables and Connection Tracking"/><link
rel="next"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"
title="2.8.9. Additional Resources"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><l
i class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-IPv6">2.8.8. IPv6</h3></div></div></div><a
id="d0e13836" class="indexterm"/><a id="d0e13840"
class="indexterm"/><div class="para">
The introduction of the next-generation Internet Protocol, called IPv6, expands beyond
the 32-bit address limit of IPv4 (or IP). IPv6 supports 128-bit addresses, and carrier
networks that are IPv6 aware are therefore able to address a larger number of routable
addresses than IPv4.
</div><div class="para">
Fedora supports IPv6 firewall rules using the Netfilter 6 subsystem and the <code
class="command">ip6tables</code> command. In Fedora 5, both IPv4 and
IPv6 services are enabled by default.
</div><div class="para">
The <code class="command">ip6tables</code> command syntax is
identical to <code class="command">iptables</code> in every aspect
except that it supports 128-bit addresses. For example, use the following command to
enable SSH connections on an IPv6-aware network server:
</div><pre class="screen">[root@myServer ~ ] # ip6tables -A INPUT
-i eth0 -p tcp -s 3ffe:ffff:100::1/128 --dport 22 -j ACCEPT
</pre><div class="para">
For more information about IPv6 networking, refer to the IPv6 Information Page at <a
href="http://www.ipv6.org/">http://www.ipv6.org/</a>.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"><strong>Prev</strong>2.8.7. IPTables
and Connection Tracking</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Additional_Resources.html"><strong>Next</strong>2.8.9. Additional
Resources</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Software and Spoofed IP Addresses</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"
title="2.8.5.3. DMZs and IPTables"/><link rel="next"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"
title="2.8.7. IPTables and Connection
Tracking"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Doc
umentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Malicious_Software_and_Spoofed_IP_Addresses">2.8.6. Malicious
Software and Spoofed IP Addresses</h3></div></div></div><a
id="d0e13687" class="indexterm"/><a id="d0e13692"
class="indexterm"/><div class="para">
More elaborate rules can be created that control access to specific subnets, or even
specific nodes, within a LAN. You can also restrict certain dubious applications or
programs such as trojans, worms, and other client/server viruses from contacting their
server.
</div><div class="para">
For example, some trojans scan networks for services on ports from 31337 to 31340
(called the <span class="emphasis"><em>elite</em></span>
ports in cracking terminology).
</div><div class="para">
Since there are no legitimate services that communicate via these non-standard ports,
blocking them can effectively diminish the chances that potentially infected nodes on your
network independently communicate with their remote master servers.
</div><div class="para">
The following rules drop all TCP traffic that attempts to use port 31337:
</div><pre class="screen">[root@myServer ~ ] # iptables -A OUTPUT
-o eth0 -p tcp --dport 31337 --sport 31337 -j DROP
[root@myServer ~ ] # iptables -A FORWARD -o eth0 -p tcp --dport 31337 --sport 31337 -j
DROP
</pre><div class="para">
You can also block outside connections that attempt to spoof private IP address ranges
to infiltrate your LAN.
</div><div class="para">
For example, if your LAN uses the 192.168.1.0/24 range, you can design a rule that
instructs the Internet-facing network device (for example, eth0) to drop any packets to
that device with an address in your LAN IP range.
</div><div class="para">
Because it is recommended to reject forwarded packets as a default policy, any other
spoofed IP address to the external-facing device (eth0) is rejected automatically.
</div><pre class="screen">[root@myServer ~ ] # iptables -A FORWARD
-s 192.168.1.0/24 -i eth0 -j DROP
</pre><div class="note"><h2>Note</h2><div
class="para">
There is a distinction between the <code
class="computeroutput">DROP</code> and <code
class="computeroutput">REJECT</code> targets when dealing with <span
class="emphasis"><em>appended</em></span> rules.
</div><div class="para">
The <code class="computeroutput">REJECT</code> target denies
access and returns a <code class="computeroutput">connection
refused</code> error to users who attempt to connect to the service. The <code
class="computeroutput">DROP</code> target, as the name implies, drops
the packet without any warning.
</div><div class="para">
Administrators can use their own discretion when using these targets. However, to
avoid user confusion and attempts to continue connecting, the <code
class="computeroutput">REJECT</code> target is recommended.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-FORWARD_and_NAT_Rules-DMZs_and_IPTables.html"><strong>Prev</strong>2.8.5.3. DMZs
and IPTables</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-IPTables_and_Connection_Tracking.html"><strong>Next</strong>2.8.7. IPTables
and Connection Tracking</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls-Using_IPTables.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IPTables</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/><link rel="prev"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"
title="2.8.2.6. Activating the IPTables Service"/><link
rel="next"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"
title="2.8.3.2. Basic Firewall Policies"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Document
ation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Using_IPTables">2.8.3. Using
IPTables</h3></div></div></div><a id="d0e13191"
class="indexterm"/><div class="para">
The first step in using <code class="command">iptables</code> is
to start the <code class="command">iptables</code> service. Use the
following command to start the <code class="command">iptables</code>
service:
</div><pre class="screen">[root@myServer ~] # service iptables
start
</pre><div class="note"><h2>Note</h2><div
class="para">
The <code class="command">ip6tables</code> service can be turned
off if you intend to use the <code class="command">iptables</code>
service only. If you deactivate the <code
class="command">ip6tables</code> service, remember to deactivate the
IPv6 network also. Never leave a network device active without the matching firewall.
</div></div><div class="para">
To force <code class="command">iptables</code> to start by
default when the system is booted, use the following command:
</div><pre class="screen">[root@myServer ~] # chkconfig --level
345 iptables on
</pre><div class="para">
This forces <code class="command">iptables</code> to start
whenever the system is booted into runlevel 3, 4, or 5.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Using_IPTables-IPTables_Command_Syntax">2.8.3.1. IPTables
Command Syntax</h4></div></div></div><div
class="para">
The following sample <code class="command">iptables</code>
command illustrates the basic command syntax:
</div><pre class="screen">[root@myServer ~ ] # iptables -A <em
class="replaceable"><code><chain></code></em>
-j <em
class="replaceable"><code><target></code></em>
</pre><a id="d0e13252" class="indexterm"/><div
class="para">
The <code class="option">-A</code> option specifies that the
rule be appended to <em
class="firstterm"><chain></em>. Each chain is comprised
of one or more <em class="firstterm">rules</em>, and is therefore
also known as a <em class="firstterm">ruleset</em>.
</div><div class="para">
The three built-in chains are INPUT, OUTPUT, and FORWARD. These chains are permanent
and cannot be deleted. The chain specifies the point at which a packet is manipulated.
</div><div class="para">
The <code class="option">-j <em
class="replaceable"><code><target></code></em></code>
option specifies the target of the rule; i.e., what to do if the packet matches the rule.
Examples of built-in targets are ACCEPT, DROP, and REJECT.
</div><div class="para">
Refer to the <code class="command">iptables</code> man page for
more information on the available chains, options, and targets.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Basic_Firewall_Configuration-Activating_the_IPTables_Service.html"><strong>Prev</strong>2.8.2.6. Activating
the IPTables Service</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"><strong>Next</strong>2.8.3.2. Basic
Firewall Policies</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Firewalls.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"
title="2.7.8. Starting and Stopping an IPsec Connection"/><link
rel="next"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common
_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Firewalls">2.8. Firewalls</h2></div></div></div><a
id="d0e12677" class="indexterm"/><div
class="para">
Information security is commonly thought of as a process and not a product. However,
standard security implementations usually employ some form of dedicated mechanism to
control access privileges and restrict network resources to users who are authorized,
identifiable, and traceable. Fedora includes several tools to assist administrators and
security engineers with network-level access control issues.
</div><div class="para">
Firewalls are one of the core components of a network security implementation. Several
vendors market firewall solutions catering to all levels of the marketplace: from home
users protecting one PC to data center solutions safeguarding vital enterprise
information. Firewalls can be stand-alone hardware solutions, such as firewall appliances
by Cisco, Nokia, and Sonicwall. Vendors such as Checkpoint, McAfee, and Symantec have also
developed proprietary software firewall solutions for home and business markets.
</div><div class="para">
Apart from the differences between hardware and software firewalls, there are also
differences in the way firewalls function that separate one solution from another. <a
class="xref"
href="sect-Security_Guide-Firewalls.html#tabl-Security_Guide-Firewalls-Firewall_Types"
title="Table 2.2. Firewall Types">Table 2.2, “Firewall Types”</a>
details three common types of firewalls and how they function:
</div><a id="d0e12688" class="indexterm"/><a
id="d0e12693" class="indexterm"/><a id="d0e12696"
class="indexterm"/><a id="d0e12701"
class="indexterm"/><a id="d0e12706"
class="indexterm"/><div class="table"
id="tabl-Security_Guide-Firewalls-Firewall_Types"><div
class="table-contents"><table summary="Firewall Types"
border="1"><colgroup><col width="1*"/><col
width="3*"/><col width="3*"/><col
width="3*"/></colgroup><thead><tr><th>
Method
</th><th>
Description
</th><th>
Advantages
</th><th>
Disadvantages
</th></tr></thead><tbody><tr><td>
NAT
</td><td>
<em class="firstterm">Network Address Translation</em> (NAT)
places private IP subnetworks behind one or a small pool of public IP addresses,
masquerading all requests to one source rather than several. The Linux kernel has built-in
NAT functionality through the Netfilter kernel subsystem.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Can be configured transparently to machines on a LAN
</td></tr><tr><td> · Protection of many machines and services
behind one or more external IP addresses simplifies administration duties
</td></tr><tr><td> · Restriction of user access to and from the
LAN can be configured by opening and closing ports on the NAT firewall/gateway
</td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Cannot prevent malicious activity once users connect
to a service outside of the firewall </td></tr></table>
</td></tr><tr><td>
Packet Filter
</td><td>
A packet filtering firewall reads each data packet that passes through a LAN. It can
read and process packets by header information and filters the packet based on sets of
programmable rules implemented by the firewall administrator. The Linux kernel has
built-in packet filtering functionality through the Netfilter kernel subsystem.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Customizable through the <code
class="command">iptables</code> front-end utility
</td></tr><tr><td> · Does not require any customization on the
client side, as all network activity is filtered at the router level rather than the
application level </td></tr><tr><td> · Since packets are not
transmitted through a proxy, network performance is faster due to direct connection from
client to remote host </td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Cannot filter packets for content like proxy
firewalls </td></tr><tr><td> · Processes packets at the protocol
layer, but cannot filter packets at an application layer
</td></tr><tr><td> · Complex network architectures can make
establishing packet filtering rules difficult, especially if coupled with <em
class="firstterm">IP masquerading</em> or local subnets and DMZ
networks </td></tr></table>
</td></tr><tr><td>
Proxy
</td><td>
Proxy firewalls filter all requests of a certain protocol or type from LAN clients
to a proxy machine, which then makes those requests to the Internet on behalf of the local
client. A proxy machine acts as a buffer between malicious remote users and the internal
network client machines.
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Gives administrators control over what applications
and protocols function outside of the LAN </td></tr><tr><td> ·
Some proxy servers can cache frequently-accessed data locally rather than having to use
the Internet connection to request it. This helps to reduce bandwidth consumption
</td></tr><tr><td> · Proxy services can be logged and monitored
closely, allowing tighter control over resource utilization on the network
</td></tr></table>
</td><td>
<table class="simplelist" border="0" summary="Simple
list"><tr><td> · Proxies are often application-specific (HTTP, Telnet,
etc.), or protocol-restricted (most proxies work with TCP-connected services only)
</td></tr><tr><td> · Application services cannot run behind a
proxy, so your application servers must use a separate form of network security
</td></tr><tr><td> · Proxies can become a network bottleneck, as
all requests and transmissions are passed through one source rather than directly from a
client to a remote service </td></tr></table>
</td></tr></tbody></table></div><h6>Table 2.2. Firewall
Types</h6></div><br class="table-break"/><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Firewalls-Netfilter_and_IPTables">2.8.1. Netfilter
and IPTables</h3></div></div></div><a id="d0e12813"
class="indexterm"/><a id="d0e12817"
class="indexterm"/><a id="d0e12820"
class="indexterm"/><div class="para">
The Linux kernel features a powerful networking subsystem called <em
class="firstterm">Netfilter</em>. The Netfilter subsystem provides
stateful or stateless packet filtering as well as NAT and IP masquerading services.
Netfilter also has the ability to <em class="firstterm">mangle</em>
IP header information for advanced routing and connection state management. Netfilter is
controlled using the <code class="command">iptables</code> tool.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Netfilter_and_IPTables-IPTables_Overview">2.8.1.1. IPTables
Overview</h4></div></div></div><div class="para">
The power and flexibility of Netfilter is implemented using the <code
class="command">iptables</code> administration tool, a command line
tool similar in syntax to its predecessor, <code
class="command">ipchains</code>.
</div><div class="para">
A similar syntax does not mean similar implementation, however. <code
class="command">ipchains</code> requires intricate rule sets for:
filtering source paths; filtering destination paths; and filtering both source and
destination connection ports.
</div><div class="para">
By contrast, <code class="command">iptables</code> uses the
Netfilter subsystem to enhance network connection, inspection, and processing. <code
class="command">iptables</code> features advanced logging, pre- and
post-routing actions, network address translation, and port forwarding, all in one command
line interface.
</div><div class="para">
This section provides an overview of <code
class="command">iptables</code>. For more detailed information, refer
to <a class="xref" href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables">Section 2.9, “IPTables”</a>.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"><strong>Prev</strong>2.7.8. Starting
and Stopping an IPsec Connection</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"><strong>Next</strong>2.8.2. Basic
Firewall Configuration</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... IASE
Documents</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"
title="Chapter 4. General Principles of Information Security"/><link
rel="prev"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"
title="4.3. NSA Documents"/><link rel="next"
href="chap-Security_Guide-Secure_Installation.html"
title="Chapter 5. Secure Installation"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/
image_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Secure_Installation.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents">4.4. DISA
IASE Documents</h2></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
<a
href="iase.disa.mil/stigs/stig/index.html">Security Technical
Implementation Guides</a> (STIG) Scroll down to the Unix STIG
</div></li><li><div class="para">
<a
href="iase.disa.mil/stigs/checklist/index.html">Security
Checklists</a> Scroll down to the Unix Security Checklists
</div></li><li><div class="para">
<a
href="iase.disa.mil/stigs/SRR/unix.html">Unix Security Readiness
Review Evaluation Script</a>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"><strong>Prev</strong>4.3. NSA
Documents</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Secure_Installation.html"><strong>Next</strong>Chapter 5. Secure
Installation</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Documents</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"
title="Chapter 4. General Principles of Information Security"/><link
rel="prev"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"
title="4.2. Tips, Guides, and Tools"/><link rel="next"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"
title="4.4. DISA IASE Documents"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fed
oraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents">4.3. NSA
Documents</h2></div></div></div><div
class="itemizedlist"><ul><li><div class="para">
<a
href="www.nsa.gov/notices/notic00004.cfm?Address=/snac/os/redhat/rhe...
Tips for the Red Hat Enterprise Linux 5 (PDF)</a>
</div></li><li><div class="para">
<a
href="www.nsa.gov/notices/notic00004.cfm?Address=/snac/os/redhat/rhe...
to the Secure Configuration of Red Hat Enterprise Linux 5 (PDF)</a>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html"><strong>Prev</strong>4.2. Tips,
Guides, and Tools</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-DISA_IASE_Documents.html"><strong>Next</strong>4.4. DISA
IASE Documents</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...,
Guides, and Tools</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"
title="Chapter 4. General Principles of Information Security"/><link
rel="prev"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"
title="Chapter 4. General Principles of Information Security"/><link
rel="next"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"
title="4.3. NSA Documents"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.f
edoraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-General_Principles_of_Information_Security-Tips_Guides_and_Tools">4.2. Tips,
Guides, and Tools</h2></div></div></div><div
class="para">
Most of the above tips are very basic. Depending on your knowledge of Linux and how
comfortable you are with modifying your system, some changes could be made to help make
your installation more secure. As mentioned above, the NSA has hardening guides and tips
for securing Red Hat Enterprise Linux 5. Likewise, the <a
href="http://www.disa.mil/">Defense Information Systems Agency</a>
(DISA) has an <a href="iase.disa.mil">Information Assurance Support
Environment</a> in which they publish checklists and tests for verifying the
security of your system. The documents from the NSA are a good read for anyone familiar
with Linux while the information from DISA is extremely specific and advanced knowledge of
Unix/Linux would be a great benefit. Links to these documents are listed below. We will
try to pull some of the larger items out of these documents and explain how to implement
them in Fedora and why they are important. In addition to documentation, DISA has made
available SRR
scripts that allow an administrator to check specific settings on a system quickly. The
SRR scripts will provide an XML-formatted report listing any known vulnerable settings
that you have on your system.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-General_Principles_of_Information_Security.html"><strong>Prev</strong>Chapter 4. General
Principles of Information Secu...</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-General_Principles_of_Information_Security-NSA_Documents.html"><strong>Next</strong>4.3. NSA
Documents</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-Additional_Resources.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Resources</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"
title="2.9.6. IPTables and IPv6"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"
title="2.9.7.2. Useful IP Tables Websites"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docn
av"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-Additional_Resources">2.9.7. Additional
Resources</h3></div></div></div><a id="d0e16237"
class="indexterm"/><div class="para">
Refer to the following sources for additional information on packet filtering with
<code class="command">iptables</code>.
</div><div class="itemizedlist"><ul><li><div
class="para">
<a class="xref" href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls">Section 2.8, “Firewalls”</a> — Contains a
chapter about the role of firewalls within an overall security strategy as well as
strategies for constructing firewall rules.
</div></li></ul></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Installed_IP_Tables_Documentation">2.9.7.1. Installed
IP Tables Documentation</h4></div></div></div><a
id="d0e16257" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man iptables</code> — Contains a
description of <code class="command">iptables</code> as well as a
comprehensive list of targets, options, and match extensions.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"><strong>Prev</strong>2.9.6. IPTables
and IPv6</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_IP_Tables_Websites.html"><strong>Next</strong>2.9.7.2. Useful
IP Tables Websites</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-Command_Options_for_IPTables.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Options for IPTables</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"
title="2.9.2. Differences Between IPTables and IPChains"/><link
rel="next"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"
title="2.9.3.2. Command Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="
Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-Command_Options_for_IPTables">2.9.3. Command
Options for IPTables</h3></div></div></div><a
id="d0e14355" class="indexterm"/><div
class="para">
Rules for filtering packets are created using the <code
class="command">iptables</code> command. The following aspects of the
packet are most often used as criteria:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Packet Type</em></span>
— Specifies the type of packets the command filters.
</div></li><li><div class="para">
<span class="emphasis"><em>Packet
Source/Destination</em></span> — Specifies which packets the command filters
based on the source or destination of the packet.
</div></li><li><div class="para">
<span class="emphasis"><em>Target</em></span> —
Specifies what action is taken on packets matching the above criteria.
</div></li></ul></div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options">Section 2.9.3.4, “IPTables Match
Options”</a> and <a class="xref"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"
title="2.9.3.5. Target Options">Section 2.9.3.5, “Target Options”</a>
for more information about specific options that address these aspects of a packet.
</div><div class="para">
The options used with specific <code
class="command">iptables</code> rules must be grouped logically, based
on the purpose and conditions of the overall rule, for the rule to be valid. The remainder
of this section explains commonly-used options for the <code
class="command">iptables</code> command.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Command_Options_for_IPTables-Structure_of_IPTables_Command_Options">2.9.3.1. Structure
of IPTables Command Options</h4></div></div></div><a
id="d0e14402" class="indexterm"/><div
class="para">
Many <code class="command">iptables</code> commands have the
following structure:
</div><pre class="screen"><code
class="computeroutput"> iptables [-t <em
class="replaceable"><code><table-name></code></em>]
<em
class="replaceable"><code><command></code></em>
<em
class="replaceable"><code><chain-name></code></em>
\ <em
class="replaceable"><code><parameter-1></code></em>
<em
class="replaceable"><code><option-1></code></em>
\ <em
class="replaceable"><code><parameter-n></code></em>
<em
class="replaceable"><code><option-n></code></em></code>
</pre><div class="para">
<em
class="replaceable"><code><table-name></code></em>
— Specifies which table the rule applies to. If omitted, the <code
class="option">filter</code> table is used.
</div><div class="para">
<em
class="replaceable"><code><command></code></em>
— Specifies the action to perform, such as appending or deleting a rule.
</div><div class="para">
<em
class="replaceable"><code><chain-name></code></em>
— Specifies the chain to edit, create, or delete.
</div><div class="para">
<em
class="replaceable"><code><parameter>-<option></code></em>
pairs — Parameters and associated options that specify how to process a packet that
matches the rule.
</div><div class="para">
The length and complexity of an <code
class="command">iptables</code> command can change significantly, based
on its purpose.
</div><div class="para">
For example, a command to remove a rule from a chain can be very short:
</div><div class="para">
<code class="command">iptables -D <em
class="replaceable"><code><chain-name>
<line-number></code></em></code>
</div><div class="para">
In contrast, a command that adds a rule which filters packets from a particular subnet
using a variety of specific parameters and options can be rather long. When constructing
<code class="command">iptables</code> commands, it is important to
remember that some parameters and options require further parameters and options to
construct a valid rule. This can produce a cascading effect, with the further parameters
requiring yet more parameters. Until every parameter and option that requires another set
of options is satisfied, the rule is not valid.
</div><div class="para">
Type <code class="command">iptables -h</code> to view a
comprehensive list of <code class="command">iptables</code> command
structures.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"><strong>Prev</strong>2.9.2. Differences
Between IPTables and IPChains</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Command_Options.html"><strong>Next</strong>2.9.3.2. Command
Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Between IPTables and IPChains</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="next"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"
title="2.9.3. Command Options for IPTables"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="p
revious"><a accesskey="p"
href="sect-Security_Guide-IPTables.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains">2.9.2. Differences
Between IPTables and IPChains</h3></div></div></div><a
id="d0e14256" class="indexterm"/><div
class="para">
Both <code class="command">ipchains</code> and <code
class="command">iptables</code> use chains of rules that operate within
the Linux kernel to filter packets based on matches with specified rules or rule sets.
However, <code class="command">iptables</code> offers a more
extensible way of filtering packets, giving the administrator greater control without
building undue complexity into the system.
</div><div class="para">
You should be aware of the following significant differences between <code
class="command">ipchains</code> and <code
class="command">iptables</code>:
</div><div class="variablelist"><dl><dt><span
class="term"><span class="emphasis"><em>Using <code
class="command">iptables</code>, each filtered packet is processed
using rules from only one chain rather than multiple
chains.</em></span></span></dt><dd><div
class="para">
For example, a FORWARD packet coming into a system using <code
class="command">ipchains</code> would have to go through the INPUT,
FORWARD, and OUTPUT chains to continue to its destination. However, <code
class="command">iptables</code> only sends packets to the INPUT chain
if they are destined for the local system, and only sends them to the OUTPUT chain if the
local system generated the packets. It is therefore important to place the rule designed
to catch a particular packet within the chain that actually handles the packet.
</div></dd><dt><span class="term"><span
class="emphasis"><em>The DENY target has been changed to
DROP.</em></span></span></dt><dd><div
class="para">
In <code class="command">ipchains</code>, packets that matched
a rule in a chain could be directed to the DENY target. This target must be changed to
DROP in <code class="command">iptables</code>.
</div></dd><dt><span class="term"><span
class="emphasis"><em>Order matters when placing options in a
rule.</em></span></span></dt><dd><div
class="para">
In <code class="command">ipchains</code>, the order of the
rule options does not matter.
</div><div class="para">
The <code class="command">iptables</code> command has a
stricter syntax. The <code class="command">iptables</code> command
requires that the protocol (ICMP, TCP, or UDP) be specified before the source or
destination ports.
</div></dd><dt><span class="term"><span
class="emphasis"><em>Network interfaces must be associated with the
correct chains in firewall
rules.</em></span></span></dt><dd><div
class="para">
For example, incoming interfaces (<code
class="option">-i</code> option) can only be used in INPUT or FORWARD
chains. Similarly, outgoing interfaces (<code
class="option">-o</code> option) can only be used in FORWARD or OUTPUT
chains.
</div><div class="para">
In other words, INPUT chains and incoming interfaces work together; OUTPUT chains
and outgoing interfaces work together. FORWARD chains work with both incoming and outgoing
interfaces.
</div><div class="para">
OUTPUT chains are no longer used by incoming interfaces, and INPUT chains are not
seen by packets moving through outgoing interfaces.
</div></dd></dl></div><div class="para">
This is not a comprehensive list of the changes. Refer to <a class="xref"
href="sect-Security_Guide-IPTables-Additional_Resources.html"
title="2.9.7. Additional Resources">Section 2.9.7, “Additional
Resources”</a> for more specific information.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables.html"><strong>Prev</strong>2.9. IPTables</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Command_Options_for_IPTables.html"><strong>Next</strong>2.9.3. Command
Options for IPTables</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-IPTables_Control_Scripts.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Control Scripts</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"
title="2.9.4. Saving IPTables Rules"/><link rel="next"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"
title="2.9.6. IPTables and IPv6"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="pre
vious"><a accesskey="p"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-IPTables_Control_Scripts">2.9.5. IPTables
Control Scripts</h3></div></div></div><a
id="d0e15749" class="indexterm"/><a id="d0e15757"
class="indexterm"/><a id="d0e15765"
class="indexterm"/><a id="d0e15773"
class="indexterm"/><a id="d0e15781"
class="indexterm"/><a id="d0e15789"
class="indexterm"/><a id="d0e15797"
class="indexterm"/><a id="d0e15805"
class="indexterm"/><a id="d0e15813"
class="indexterm"/><a id="d0e15821"
class="indexterm"/><a id="d0e15829"
class="indexterm"/><a id="d0e15837"
class="indexterm"/><div class="para">
There are two basic methods for controlling <code
class="command">iptables</code> in Fedora:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="application"><strong>Security Level Configuration
Tool</strong></span> (<code
class="command">system-config-securitylevel</code>) — A graphical
interface for creating, activating, and saving basic firewall rules. Refer to <a
class="xref"
href="sect-Security_Guide-Firewalls-Basic_Firewall_Configuration.html"
title="2.8.2. Basic Firewall Configuration">Section 2.8.2, “Basic Firewall
Configuration”</a> for more information.
</div></li><li><div class="para">
<code class="command">/sbin/service iptables <em
class="replaceable"><code><option></code></em></code>
— Used to manipulate various functions of <code
class="command">iptables</code> using its initscript. The following
options are available:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">start</code> — If a firewall is
configured (that is, <code
class="filename">/etc/sysconfig/iptables</code> exists), all running
<code class="command">iptables</code> are stopped completely and
then started using the <code
class="command">/sbin/iptables-restore</code> command. This option only
works if the <code class="command">ipchains</code> kernel module is
not loaded. To check if this module is loaded, type the following command as root:
</div><pre class="screen"><code
class="command"> [root@MyServer ~]# lsmod | grep ipchains </code>
</pre><div class="para">
If this command returns no output, it means the module is not loaded. If necessary,
use the <code class="command">/sbin/rmmod</code> command to remove
the module.
</div></li><li><div class="para">
<code class="command">stop</code> — If a firewall is running,
the firewall rules in memory are flushed, and all iptables modules and helpers are
unloaded.
</div><div class="para">
If the <code class="command">IPTABLES_SAVE_ON_STOP</code>
directive in the <code
class="filename">/etc/sysconfig/iptables-config</code> configuration
file is changed from its default value to <code
class="command">yes</code>, current rules are saved to <code
class="filename">/etc/sysconfig/iptables</code> and any existing rules
are moved to the file <code
class="filename">/etc/sysconfig/iptables.save</code>.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html#sect-Security_Guide-IPTables_Control_Scripts-IPTables_Control_Scripts_Configuration_File"
title="2.9.5.1. IPTables Control Scripts Configuration File">Section 2.9.5.1,
“IPTables Control Scripts Configuration File”</a> for more information about the
<code class="filename">iptables-config</code> file.
</div></li><li><div class="para">
<code class="command">restart</code> — If a firewall is
running, the firewall rules in memory are flushed, and the firewall is started again if it
is configured in <code
class="filename">/etc/sysconfig/iptables</code>. This option only works
if the <code class="command">ipchains</code> kernel module is not
loaded.
</div><div class="para">
If the <code class="command">IPTABLES_SAVE_ON_RESTART</code>
directive in the <code
class="filename">/etc/sysconfig/iptables-config</code> configuration
file is changed from its default value to <code
class="command">yes</code>, current rules are saved to <code
class="filename">/etc/sysconfig/iptables</code> and any existing rules
are moved to the file <code
class="filename">/etc/sysconfig/iptables.save</code>.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html#sect-Security_Guide-IPTables_Control_Scripts-IPTables_Control_Scripts_Configuration_File"
title="2.9.5.1. IPTables Control Scripts Configuration File">Section 2.9.5.1,
“IPTables Control Scripts Configuration File”</a> for more information about the
<code class="filename">iptables-config</code> file.
</div></li><li><div class="para">
<code class="command">status</code> — Displays the status of
the firewall and lists all active rules.
</div><div class="para">
The default configuration for this option displays IP addresses in each rule. To
display domain and hostname information, edit the <code
class="filename">/etc/sysconfig/iptables-config</code> file and change
the value of <code class="command">IPTABLES_STATUS_NUMERIC</code> to
<code class="command">no</code>. Refer to <a
class="xref"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html#sect-Security_Guide-IPTables_Control_Scripts-IPTables_Control_Scripts_Configuration_File"
title="2.9.5.1. IPTables Control Scripts Configuration File">Section 2.9.5.1,
“IPTables Control Scripts Configuration File”</a> for more information about the
<code class="filename">iptables-config</code> file.
</div></li><li><div class="para">
<code class="command">panic</code> — Flushes all firewall
rules. The policy of all configured tables is set to <code
class="command">DROP</code>.
</div><div class="para">
This option could be useful if a server is known to be compromised. Rather than
physically disconnecting from the network or shutting down the system, you can use this
option to stop all further network traffic but leave the machine in a state ready for
analysis or other forensics.
</div></li><li><div class="para">
<code class="command">save</code> — Saves firewall rules to
<code class="filename">/etc/sysconfig/iptables</code> using <code
class="command">iptables-save</code>. Refer to <a
class="xref"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"
title="2.9.4. Saving IPTables Rules">Section 2.9.4, “Saving IPTables
Rules”</a> for more information.
</div></li></ul></div></li></ul></div><div
class="tip"><h2>Tip</h2><div class="para">
To use the same initscript commands to control netfilter for IPv6, substitute <code
class="command">ip6tables</code> for <code
class="command">iptables</code> in the <code
class="command">/sbin/service</code> commands listed in this section.
For more information about IPv6 and netfilter, refer to <a class="xref"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"
title="2.9.6. IPTables and IPv6">Section 2.9.6, “IPTables and
IPv6”</a>.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-IPTables_Control_Scripts-IPTables_Control_Scripts_Configuration_File">2.9.5.1. IPTables
Control Scripts Configuration File</h4></div></div></div><a
id="d0e16033" class="indexterm"/><div
class="para">
The behavior of the <code class="command">iptables</code>
initscripts is controlled by the <code
class="filename">/etc/sysconfig/iptables-config</code> configuration
file. The following is a list of directives contained in this file:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">IPTABLES_MODULES</code> — Specifies a
space-separated list of additional <code
class="command">iptables</code> modules to load when a firewall is
activated. These can include connection tracking and NAT helpers.
</div></li><li><div class="para">
<code class="command">IPTABLES_MODULES_UNLOAD</code> — Unloads
modules on restart and stop. This directive accepts the following values:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">yes</code> — The default value. This
option must be set to achieve a correct state for a firewall restart or stop.
</div></li><li><div class="para">
<code class="command">no</code> — This option should only be
set if there are problems unloading the netfilter modules.
</div></li></ul></div></li><li><div
class="para">
<code class="command">IPTABLES_SAVE_ON_STOP</code> — Saves
current firewall rules to <code
class="filename">/etc/sysconfig/iptables</code> when the firewall is
stopped. This directive accepts the following values:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">yes</code> — Saves existing rules to
<code class="filename">/etc/sysconfig/iptables</code> when the
firewall is stopped, moving the previous version to the <code
class="filename">/etc/sysconfig/iptables.save</code> file.
</div></li><li><div class="para">
<code class="command">no</code> — The default value. Does
not save existing rules when the firewall is stopped.
</div></li></ul></div></li><li><div
class="para">
<code class="command">IPTABLES_SAVE_ON_RESTART</code> — Saves
current firewall rules when the firewall is restarted. This directive accepts the
following values:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">yes</code> — Saves existing rules to
<code class="filename">/etc/sysconfig/iptables</code> when the
firewall is restarted, moving the previous version to the <code
class="filename">/etc/sysconfig/iptables.save</code> file.
</div></li><li><div class="para">
<code class="command">no</code> — The default value. Does
not save existing rules when the firewall is restarted.
</div></li></ul></div></li><li><div
class="para">
<code class="command">IPTABLES_SAVE_COUNTER</code> — Saves and
restores all packet and byte counters in all chains and rules. This directive accepts the
following values:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">yes</code> — Saves the counter
values.
</div></li><li><div class="para">
<code class="command">no</code> — The default value. Does
not save the counter values.
</div></li></ul></div></li><li><div
class="para">
<code class="command">IPTABLES_STATUS_NUMERIC</code> — Outputs
IP addresses in numeric form instead of domain or hostnames. This directive accepts the
following values:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">yes</code> — The default value.
Returns only IP addresses within a status output.
</div></li><li><div class="para">
<code class="command">no</code> — Returns domain or
hostnames within a status output.
</div></li></ul></div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables-Saving_IPTables_Rules.html"><strong>Prev</strong>2.9.4. Saving
IPTables Rules</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-IPTables_and_IPv6.html"><strong>Next</strong>2.9.6. IPTables
and IPv6</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-IPTables_and_IPv6.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and IPv6</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"
title="2.9.5. IPTables Control Scripts"/><link rel="next"
href="sect-Security_Guide-IPTables-Additional_Resources.html"
title="2.9.7. Additional Resources"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li class
="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Additional_Resources.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-IPTables_and_IPv6">2.9.6. IPTables and
IPv6</h3></div></div></div><a id="d0e16173"
class="indexterm"/><div class="para">
If the <code class="filename">iptables-ipv6</code> package is
installed, netfilter in Fedora can filter the next-generation IPv6 Internet protocol. The
command used to manipulate the IPv6 netfilter is <code
class="command">ip6tables</code>.
</div><div class="para">
Most directives for this command are identical to those used for <code
class="command">iptables</code>, except the <code
class="command">nat</code> table is not yet supported. This means that
it is not yet possible to perform IPv6 network address translation tasks, such as
masquerading and port forwarding.
</div><div class="para">
Rules for <code class="command">ip6tables</code> are saved in the
<code class="filename">/etc/sysconfig/ip6tables</code> file.
Previous rules saved by the <code class="command">ip6tables</code>
initscripts are saved in the <code
class="filename">/etc/sysconfig/ip6tables.save</code> file.
</div><div class="para">
Configuration options for the <code
class="command">ip6tables</code> init script are stored in <code
class="filename">/etc/sysconfig/ip6tables-config</code>, and the names
for each directive vary slightly from their <code
class="command">iptables</code> counterparts.
</div><div class="para">
For example, the <code class="filename">iptables-config</code>
directive <code class="command">IPTABLES_MODULES</code>:the
equivalent in the <code class="filename">ip6tables-config</code>
file is <code class="command">IP6TABLES_MODULES</code>.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"><strong>Prev</strong>2.9.5. IPTables
Control Scripts</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Additional_Resources.html"><strong>Next</strong>2.9.7. Additional
Resources</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables-Saving_IPTables_Rules.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IPTables Rules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables"/><link rel="prev"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"
title="2.9.3.6. Listing Options"/><link rel="next"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"
title="2.9.5. IPTables Control Scripts"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="d
ocnav"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-Saving_IPTables_Rules">2.9.4. Saving
IPTables Rules</h3></div></div></div><a id="d0e15584"
class="indexterm"/><a id="d0e15590"
class="indexterm"/><a id="d0e15598"
class="indexterm"/><a id="d0e15605"
class="indexterm"/><a id="d0e15612"
class="indexterm"/><a id="d0e15620"
class="indexterm"/><a id="d0e15629"
class="indexterm"/><div class="para">
Rules created with the <code class="command">iptables</code>
command are stored in memory. If the system is restarted before saving the <code
class="command">iptables</code> rule set, all rules are lost. For
netfilter rules to persist through a system reboot, they need to be saved. To save
netfilter rules, type the following command as root:
</div><pre class="screen"><code class="command">
/sbin/service iptables save </code>
</pre><div class="para">
This executes the <code class="command">iptables</code> init
script, which runs the <code
class="command">/sbin/iptables-save</code> program and writes the
current <code class="command">iptables</code> configuration to
<code class="filename">/etc/sysconfig/iptables</code>. The existing
<code class="filename">/etc/sysconfig/iptables</code> file is saved
as <code class="filename">/etc/sysconfig/iptables.save</code>.
</div><div class="para">
The next time the system boots, the <code
class="command">iptables</code> init script reapplies the rules saved
in <code class="filename">/etc/sysconfig/iptables</code> by using
the <code class="command">/sbin/iptables-restore</code> command.
</div><div class="para">
While it is always a good idea to test a new <code
class="command">iptables</code> rule before committing it to the
<code class="filename">/etc/sysconfig/iptables</code> file, it is
possible to copy <code class="command">iptables</code> rules into
this file from another system's version of this file. This provides a quick way to
distribute sets of <code class="command">iptables</code> rules to
multiple machines.
</div><div class="para">
You can also save the iptables rules to a separate file for distribution, backup or
other purposes. To save your iptables rules, type the following command as root:
</div><pre class="screen"><code class="command">
[root@myserver ~]# iptables-save > <em
class="replaceable"><code><filename></code></em></code>where
<em
class="replaceable"><code><filename></code></em>
is a user-defined name for your ruleset.
</pre><div class="important"><h2>Important</h2><div
class="para">
If distributing the <code
class="filename">/etc/sysconfig/iptables</code> file to other machines,
type <code class="command">/sbin/service iptables restart</code> for
the new rules to take effect.
</div></div><div
class="note"><h2>Note</h2><div class="para">
Note the difference between the <code
class="command">iptables</code> <span
class="emphasis"><em>command</em></span> (<code
class="command">/sbin/iptables</code>), which is used to manipulate the
tables and chains that constitute the <code
class="command">iptables</code> functionality, and the <code
class="command">iptables</code> <span
class="emphasis"><em>service</em></span> (<code
class="command">/sbin/iptables service</code>), which is used to enable
and disable the <code class="command">iptables</code> service
itself.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-Listing_Options.html"><strong>Prev</strong>2.9.3.6. Listing
Options</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-IPTables_Control_Scripts.html"><strong>Next</strong>2.9.5. IPTables
Control Scripts</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"
title="2.8.9.3. Related Documentation"/><link rel="next"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"
title="2.9.2. Differences Between IPTables and
IPChains"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_r
ight.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-IPTables">2.9. IPTables</h2></div></div></div><a
id="d0e13957" class="indexterm"/><a id="d0e13963"
class="indexterm"/><a id="d0e13969"
class="indexterm"/><div class="para">
Included with Fedora are advanced tools for network <em
class="firstterm">packet filtering</em> — the process of controlling
network packets as they enter, move through, and exit the network stack within the kernel.
Kernel versions prior to 2.4 relied on <code
class="command">ipchains</code> for packet filtering and used lists of
rules applied to packets at each step of the filtering process. The 2.4 kernel introduced
<code class="command">iptables</code> (also called <em
class="firstterm">netfilter</em>), which is similar to <code
class="command">ipchains</code> but greatly expands the scope and
control available for filtering network packets.
</div><div class="para">
This chapter focuses on packet filtering basics, defines the differences between
<code class="command">ipchains</code> and <code
class="command">iptables</code>, explains various options available
with <code class="command">iptables</code> commands, and explains
how filtering rules can be preserved between system reboots.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-IPTables-Additional_Resources.html"
title="2.9.7. Additional Resources">Section 2.9.7, “Additional
Resources”</a> for instructions on how to construct <code
class="command">iptables</code> rules and setting up a firewall based
on these rules.
</div><div class="warning"><h2>Warning</h2><div
class="para">
The default firewall mechanism in the 2.4 and later kernels is <code
class="command">iptables</code>, but <code
class="command">iptables</code> cannot be used if <code
class="command">ipchains</code> is already running. If <code
class="command">ipchains</code> is present at boot time, the kernel
issues an error and fails to start <code
class="command">iptables</code>.
</div><div class="para">
The functionality of <code class="command">ipchains</code> is not
affected by these errors.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-IPTables-Packet_Filtering">2.9.1. Packet
Filtering</h3></div></div></div><a id="d0e14039"
class="indexterm"/><a id="d0e14045"
class="indexterm"/><a id="d0e14051"
class="indexterm"/><a id="d0e14057"
class="indexterm"/><a id="d0e14063"
class="indexterm"/><div class="para">
The Linux kernel uses the <span
class="application"><strong>Netfilter</strong></span>
facility to filter packets, allowing some of them to be received by or pass through the
system while stopping others. This facility is built in to the Linux kernel, and has three
built-in <em class="firstterm">tables</em> or <em
class="firstterm">rules lists</em>, as follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">filter</code> — The default table for
handling network packets.
</div></li><li><div class="para">
<code class="option">nat</code> — Used to alter packets that
create a new connection and used for <em class="firstterm">Network Address
Translation</em> (<em class="firstterm">NAT</em>).
</div></li><li><div class="para">
<code class="option">mangle</code> — Used for specific types of
packet alteration.
</div></li></ul></div><div class="para">
Each table has a group of built-in <em
class="firstterm">chains</em>, which correspond to the actions
performed on the packet by <code class="command">netfilter</code>.
</div><div class="para">
The built-in chains for the <code class="option">filter</code>
table are as follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<em class="firstterm">INPUT</em> — Applies to network packets
that are targeted for the host.
</div></li><li><div class="para">
<em class="firstterm">OUTPUT</em> — Applies to
locally-generated network packets.
</div></li><li><div class="para">
<em class="firstterm">FORWARD</em> — Applies to network packets
routed through the host.
</div></li></ul></div><div class="para">
The built-in chains for the <code class="option">nat</code> table
are as follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<em class="firstterm">PREROUTING</em> — Alters network packets
when they arrive.
</div></li><li><div class="para">
<em class="firstterm">OUTPUT</em> — Alters locally-generated
network packets before they are sent out.
</div></li><li><div class="para">
<em class="firstterm">POSTROUTING</em> — Alters network packets
before they are sent out.
</div></li></ul></div><div class="para">
The built-in chains for the <code class="option">mangle</code>
table are as follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<em class="firstterm">INPUT</em> — Alters network packets
targeted for the host.
</div></li><li><div class="para">
<em class="firstterm">OUTPUT</em> — Alters locally-generated
network packets before they are sent out.
</div></li><li><div class="para">
<em class="firstterm">FORWARD</em> — Alters network packets
routed through the host.
</div></li><li><div class="para">
<em class="firstterm">PREROUTING</em> — Alters incoming network
packets before they are routed.
</div></li><li><div class="para">
<em class="firstterm">POSTROUTING</em> — Alters network packets
before they are sent out.
</div></li></ul></div><div class="para">
Every network packet received by or sent from a Linux system is subject to at least one
table. However, a packet may be subjected to multiple rules within each table before
emerging at the end of the chain. The structure and purpose of these rules may vary, but
they usually seek to identify a packet coming from or going to a particular IP address, or
set of addresses, when using a particular protocol and network service.
</div><div class="note"><h2>Note</h2><div
class="para">
By default, firewall rules are saved in the <code
class="filename">/etc/sysconfig/iptables</code> or <code
class="filename">/etc/sysconfig/ip6tables</code> files.
</div><div class="para">
The <code class="command">iptables</code> service starts before
any DNS-related services when a Linux system is booted. This means that firewall rules can
only reference numeric IP addresses (for example, 192.168.0.1). Domain names (for example,
host.example.com) in such rules produce errors.
</div></div><div class="para">
Regardless of their destination, when packets match a particular rule in one of the
tables, a <em class="firstterm">target</em> or action is applied to
them. If the rule specifies an <code class="command">ACCEPT</code>
target for a matching packet, the packet skips the rest of the rule checks and is allowed
to continue to its destination. If a rule specifies a <code
class="command">DROP</code> target, that packet is refused access to
the system and nothing is sent back to the host that sent the packet. If a rule specifies
a <code class="command">QUEUE</code> target, the packet is passed to
user-space. If a rule specifies the optional <code
class="command">REJECT</code> target, the packet is dropped, but an
error packet is sent to the packet's originator.
</div><div class="para">
Every chain has a default policy to <code
class="command">ACCEPT</code>, <code
class="command">DROP</code>, <code
class="command">REJECT</code>, or <code
class="command">QUEUE</code>. If none of the rules in the chain apply
to the packet, then the packet is dealt with in accordance with the default policy.
</div><div class="para">
The <code class="command">iptables</code> command configures
these tables, as well as sets up new tables if necessary.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Related_Documentation.html"><strong>Prev</strong>2.8.9.3. Related
Documentation</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables-Differences_Between_IPTables_and_IPChains.html"><strong>Next</strong>2.9.2. Differences
Between IPTables and IPChains</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Match Option Modules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options"/><link rel="prev"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"
title="2.9.3.4.3. ICMP Protocol"/><link rel="next"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"
title="2.9.3.5. Target Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/i
mages/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules">2.9.3.4.4. Additional
Match Option Modules</h5></div></div></div><a
id="d0e15192" class="indexterm"/><div
class="para">
Additional match options are available through modules loaded by the <code
class="command">iptables</code> command.
</div><div class="para">
To use a match option module, load the module by name using the <code
class="option">-m <em
class="replaceable"><code><module-name></code></em></code>,
where <em
class="replaceable"><code><module-name></code></em>
is the name of the module.
</div><div class="para">
Many modules are available by default. You can also create modules to provide
additional functionality.
</div><div class="para">
The following is a partial list of the most commonly used modules:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">limit</code> module — Places limits on
how many packets are matched to a particular rule.
</div><div class="para">
When used in conjunction with the <code
class="command">LOG</code> target, the <code
class="option">limit</code> module can prevent a flood of matching
packets from filling up the system log with repetitive messages or using up system
resources.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"
title="2.9.3.5. Target Options">Section 2.9.3.5, “Target Options”</a>
for more information about the <code class="command">LOG</code>
target.
</div><div class="para">
The <code class="option">limit</code> module enables the
following options:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--limit</code> — Sets the maximum
number of matches for a particular time period, specified as a <code
class="option"><em
class="replaceable"><code><value>/<period></code></em></code>
pair. For example, using <code class="option">--limit 5/hour</code>
allows five rule matches per hour.
</div><div class="para">
Periods can be specified in seconds, minutes, hours, or days.
</div><div class="para">
If a number and time modifier are not used, the default value of <code
class="option">3/hour</code> is assumed.
</div></li><li><div class="para">
<code class="option">--limit-burst</code> — Sets a limit on
the number of packets able to match a rule at one time.
</div><div class="para">
This option is specified as an integer and should be used in conjunction with the
<code class="option">--limit</code> option.
</div><div class="para">
If no value is specified, the default value of five (5) is assumed.
</div></li></ul></div></li><li><div
class="para">
<code class="option">state</code> module — Enables state
matching.
</div><div class="para">
The <code class="option">state</code> module enables the
following options:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--state</code> — match a packet with
the following connection states:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">ESTABLISHED</code> — The matching
packet is associated with other packets in an established connection. You need to accept
this state if you want to maintain a connection between a client and a server.
</div></li><li><div class="para">
<code class="option">INVALID</code> — The matching packet
cannot be tied to a known connection.
</div></li><li><div class="para">
<code class="option">NEW</code> — The matching packet is
either creating a new connection or is part of a two-way connection not previously seen.
You need to accept this state if you want to allow new connections to a service.
</div></li><li><div class="para">
<code class="option">RELATED</code> — The matching packet
is starting a new connection related in some way to an existing connection. An example of
this is FTP, which uses one connection for control traffic (port 21), and a separate
connection for data transfer (port 20).
</div></li></ul></div><div
class="para">
These connection states can be used in combination with one another by separating
them with commas, such as <code class="option">-m state --state
INVALID,NEW</code>.
</div></li></ul></div></li><li><div
class="para">
<code class="option">mac</code> module — Enables hardware MAC
address matching.
</div><div class="para">
The <code class="option">mac</code> module enables the
following option:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--mac-source</code> — Matches a MAC
address of the network interface card that sent the packet. To exclude a MAC address from
a rule, place an exclamation point character (<code
class="option">!</code>) after the <code
class="option">--mac-source</code> match option.
</div></li></ul></div></li></ul></div><div
class="para">
Refer to the <code class="command">iptables</code> man page for
more match options available through modules.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"><strong>Prev</strong>2.9.3.4.3. ICMP
Protocol</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Command_Options_for_IPTables-Target_Options.html"><strong>Next</strong>2.9.3.5. Target
Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Protocol</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options"/><link rel="prev"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"
title="2.9.3.4.2. UDP Protocol"/><link rel="next"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"
title="2.9.3.4.4. Additional Match Option
Modules"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common
_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol">2.9.3.4.3. ICMP
Protocol</h5></div></div></div><a id="d0e15166"
class="indexterm"/><div class="para">
The following match options are available for the Internet Control Message Protocol
(ICMP) (<code class="option">-p icmp</code>):
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--icmp-type</code> — Sets the name or
number of the ICMP type to match with the rule. A list of valid ICMP names can be
retrieved by typing the <code class="command">iptables -p icmp
-h</code> command.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html"><strong>Prev</strong>2.9.3.4.2. UDP
Protocol</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-Additional_Match_Option_Modules.html"><strong>Next</strong>2.9.3.4.4. Additional
Match Option Modules</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-IPTables_Match_Options-UDP_Protocol.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Protocol</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options"/><link rel="prev"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"
title="2.9.3.4. IPTables Match Options"/><link rel="next"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"
title="2.9.3.4.3. ICMP Protocol"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/imag
es/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-IPTables_Match_Options-UDP_Protocol">2.9.3.4.2. UDP
Protocol</h5></div></div></div><a id="d0e15114"
class="indexterm"/><div class="para">
These match options are available for the UDP protocol (<code
class="option">-p udp</code>):
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">--dport</code> — Specifies the
destination port of the UDP packet, using the service name, port number, or range of port
numbers. The <code class="option">--destination-port</code> match
option is synonymous with <code class="option">--dport</code>.
</div></li><li><div class="para">
<code class="option">--sport</code> — Specifies the source
port of the UDP packet, using the service name, port number, or range of port numbers. The
<code class="option">--source-port</code> match option is synonymous
with <code class="option">--sport</code>.
</div></li></ul></div><div class="para">
For the <code class="option">--dport</code> and <code
class="option">--sport</code> options, to specify a range of port
numbers, separate the two numbers with a colon (:). For example: <code
class="option">-p tcp --dport 3000:3200</code>. The largest acceptable
valid range is 0:65535.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Command_Options_for_IPTables-IPTables_Match_Options.html"><strong>Prev</strong>2.9.3.4. IPTables
Match Options</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPTables_Match_Options-ICMP_Protocol.html"><strong>Next</strong>2.9.3.4.3. ICMP
Protocol</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IPsec Host-to-Host Configuration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"
title="2.7.6. IPsec Host-to-Host Configuration"/><link
rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"
title="2.7.6. IPsec Host-to-Host Configuration"/><link
rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"
title="2.7.7. IPsec Network-to-Network
Configuration"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_l
eft.png" alt="Product Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration">2.7.6.2. Manual
<abbr class="abbrev">IPsec</abbr> Host-to-Host
Configuration</h4></div></div></div><div
class="para">
The first step in creating a connection is to gather system and network information
from each workstation. For a host-to-host connection, you need the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
The IP address of each host
</div></li><li><div class="para">
A unique name, for example, <code
class="computeroutput">ipsec1</code>. This is used to identify the
<abbr class="abbrev">IPsec</abbr> connection and to distinguish it
from other devices or connections.
</div></li><li><div class="para">
A fixed encryption key or one automatically generated by <code
class="command">racoon</code>.
</div></li><li><div class="para">
A pre-shared authentication key that is used during the initial stage of the
connection and to exchange encryption keys during the session.
</div></li></ul></div><div class="para">
For example, suppose Workstation A and Workstation B want to connect to each other
through an <abbr class="abbrev">IPsec</abbr> tunnel. They want to
connect using a pre-shared key with the value of <code
class="computeroutput">Key_Value01</code>, and the users agree to let
<code class="command">racoon</code> automatically generate and share
an authentication key between each host. Both host users decide to name their connections
<code class="computeroutput">ipsec1</code>.
</div><div class="note"><h2>Note</h2><div
class="para">
You should choose a PSK that uses a mixture of upper- and lower-case characters,
numbers and punctuation. An easily-guessable PSK constitutes a security risk.
</div><div class="para">
It is not necessary to use the same connection name for each host. You should choose
a name that is convenient and meaningful for your installation.
</div></div><div class="para">
The following is the <abbr class="abbrev">IPsec</abbr>
configuration file for Workstation A for a host-to-host <abbr
class="abbrev">IPsec</abbr> connection with Workstation B. The unique
name to identify the connection in this example is <em
class="replaceable"><code>ipsec1</code></em>, so the
resulting file is called <code
class="filename">/etc/sysconfig/network-scripts/ifcfg-ipsec1</code>.
</div><pre class="screen">DST=<em
class="replaceable"><code>X.X.X.X</code></em>TYPE=IPSEC
ONBOOT=no
IKE_METHOD=PSK
</pre><div class="para">
For Workstation A, <em
class="replaceable"><code>X.X.X.X</code></em> is the IP
address of Workstation B. For Workstation B, <em
class="replaceable"><code>X.X.X.X</code></em> is the IP
address of Workstation A. This connection is not set to initiate on boot-up (<code
class="computeroutput">ONBOOT=no</code>) and it uses the pre-shared key
method of authentication (<code
class="computeroutput">IKE_METHOD=PSK</code>).
</div><div class="para">
The following is the content of the pre-shared key file (called <code
class="filename">/etc/sysconfig/network-scripts/keys-ipsec1</code>)
that both workstations need to authenticate each other. The contents of this file should
be identical on both workstations, and only the root user should be able to read or write
this file.
</div><pre class="screen">IKE_PSK=Key_Value01
</pre><div class="important"><h2>Important</h2><div
class="para">
To change the <code class="filename">keys-ipsec1</code> file so
that only the root user can read or edit the file, use the following command after
creating the file:
</div><pre class="screen">[root@myServer ~] # chmod 600
/etc/sysconfig/network-scripts/keys-ipsec1
</pre></div><div class="para">
To change the authentication key at any time, edit the <code
class="filename">keys-ipsec1</code> file on both workstations. <span
class="emphasis"><em>Both authentication keys must be identical for
proper connectivity</em></span>.
</div><div class="para">
The next example shows the specific configuration for the phase 1 connection to the
remote host. The file is called <code class="filename"><em
class="replaceable"><code>X.X.X.X</code></em>.conf</code>,
where <em class="replaceable"><code>X.X.X.X</code></em>
is the IP address of the remote <abbr class="abbrev">IPsec</abbr>
host. Note that this file is automatically generated when the <abbr
class="abbrev">IPsec</abbr> tunnel is activated and should not be
edited directly.
</div><pre class="screen">remote <em
class="replaceable"><code>X.X.X.X</code></em>{
exchange_mode aggressive, main;
my_identifier address;
proposal {
encryption_algorithm 3des;
hash_algorithm sha1;
authentication_method pre_shared_key;
dh_group 2 ;
}
}
</pre><div class="para">
The default phase 1 configuration file that is created when an <abbr
class="abbrev">IPsec</abbr> connection is initialized contains the
following statements used by the Fedora implementation of IPsec:
</div><div class="variablelist"><dl><dt><span
class="term">remote <em
class="replaceable"><code>X.X.X.X</code></em></span></dt><dd><div
class="para">
Specifies that the subsequent stanzas of this configuration file apply only to the
remote node identified by the <em
class="replaceable"><code>X.X.X.X</code></em> IP address.
</div></dd><dt><span class="term">exchange_mode
aggressive</span></dt><dd><div class="para">
The default configuration for <abbr
class="abbrev">IPsec</abbr> on Fedora uses an aggressive authentication
mode, which lowers the connection overhead while allowing configuration of several
<abbr class="abbrev">IPsec</abbr> connections with multiple hosts.
</div></dd><dt><span class="term">my_identifier
address</span></dt><dd><div class="para">
Specifies the identification method to use when authenticating nodes. Fedora uses
IP addresses to identify nodes.
</div></dd><dt><span
class="term">encryption_algorithm
3des</span></dt><dd><div class="para">
Specifies the encryption cipher used during authentication. By default, <em
class="firstterm">Triple Data Encryption Standard</em> (<acronym
class="acronym">3DES</acronym>) is used.
</div></dd><dt><span class="term">hash_algorithm
sha1;</span></dt><dd><div class="para">
Specifies the hash algorithm used during phase 1 negotiation between nodes. By
default, Secure Hash Algorithm version 1 is used.
</div></dd><dt><span
class="term">authentication_method
pre_shared_key</span></dt><dd><div class="para">
Specifies the authentication method used during node negotiation. By default,
Fedora uses pre-shared keys for authentication.
</div></dd><dt><span class="term">dh_group
2</span></dt><dd><div class="para">
Specifies the Diffie-Hellman group number for establishing dynamically-generated
session keys. By default, modp1024 (group 2) is used.
</div></dd></dl></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Manual_IPsec_Host_to_Host_Configuration-The_Racoon_Configuration_File">2.7.6.2.1. The
Racoon Configuration File</h5></div></div></div><div
class="para">
The <code class="filename">/etc/racoon/racoon.conf</code> files
should be identical on all <abbr class="abbrev">IPsec</abbr> nodes
<span class="emphasis"><em>except</em></span> for the
<code class="command">include "/etc/racoon/<em
class="replaceable"><code>X.X.X.X</code></em>.conf"</code>
statement. This statement (and the file it references) is generated when the <abbr
class="abbrev">IPsec</abbr> tunnel is activated. For Workstation A, the
<em class="replaceable"><code>X.X.X.X</code></em> in the
<code class="command">include</code> statement is Workstation
B's IP address. The opposite is true of Workstation B. The following shows a typical
<code class="filename">racoon.conf</code> file when the <abbr
class="abbrev">IPsec</abbr> connection is activated.
</div><pre class="screen"># Racoon IKE daemon configuration
file.
# See 'man racoon.conf' for a description of the format and entries.
path include "/etc/racoon";
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
sainfo anonymous
{
pfs_group 2;
lifetime time 1 hour ;
encryption_algorithm 3des, blowfish 448, rijndael ;
authentication_algorithm hmac_sha1, hmac_md5 ;
compression_algorithm deflate ;
}
include "/etc/racoon/X.X.X.X.conf";
</pre><div class="para">
This default <code class="filename">racoon.conf</code> file
includes defined paths for <abbr class="abbrev">IPsec</abbr>
configuration, pre-shared key files, and certificates. The fields in <code
class="computeroutput">sainfo anonymous</code> describe the phase 2 SA
between the <abbr class="abbrev">IPsec</abbr> nodes — the nature of
the <abbr class="abbrev">IPsec</abbr> connection (including the
supported encryption algorithms used) and the method of exchanging keys. The following
list defines the fields of phase 2:
</div><div class="variablelist"><dl><dt><span
class="term">sainfo anonymous</span></dt><dd><div
class="para">
Denotes that SA can anonymously initialize with any peer provided that the
<abbr class="abbrev">IPsec</abbr> credentials match.
</div></dd><dt><span class="term">pfs_group
2</span></dt><dd><div class="para">
Defines the Diffie-Hellman key exchange protocol, which determines the method by
which the <abbr class="abbrev">IPsec</abbr> nodes establish a mutual
temporary session key for the second phase of <abbr
class="abbrev">IPsec</abbr> connectivity. By default, the Fedora
implementation of <abbr class="abbrev">IPsec</abbr> uses group 2 (or
<code class="computeroutput">modp1024</code>) of the Diffie-Hellman
cryptographic key exchange groups. Group 2 uses a 1024-bit modular exponentiation that
prevents attackers from decrypting previous <abbr
class="abbrev">IPsec</abbr> transmissions even if a private key is
compromised.
</div></dd><dt><span class="term">lifetime time 1
hour</span></dt><dd><div class="para">
This parameter specifies the lifetime of an SA and can be quantified either by
time or by bytes of data. The default Fedora implementation of <abbr
class="abbrev">IPsec</abbr> specifies a one hour lifetime.
</div></dd><dt><span
class="term">encryption_algorithm 3des, blowfish 448,
rijndael</span></dt><dd><div class="para">
Specifies the supported encryption ciphers for phase 2. Fedora supports 3DES,
448-bit Blowfish, and Rijndael (the cipher used in the <em
class="firstterm">Advanced Encryption Standard</em>, or <acronym
class="acronym">AES</acronym>).
</div></dd><dt><span
class="term">authentication_algorithm hmac_sha1,
hmac_md5</span></dt><dd><div class="para">
Lists the supported hash algorithms for authentication. Supported modes are sha1
and md5 hashed message authentication codes (HMAC).
</div></dd><dt><span
class="term">compression_algorithm
deflate</span></dt><dd><div class="para">
Defines the Deflate compression algorithm for IP Payload Compression (IPCOMP)
support, which allows for potentially faster transmission of IP datagrams over slow
connections.
</div></dd></dl></div><div class="para">
To start the connection, use the following command on each host:
</div><pre class="screen">[root@myServer ~]# /sbin/ifup
<nickname>
</pre><div class="para">
where <nickname> is the name you specified for the <abbr
class="abbrev">IPsec</abbr> connection.
</div><div class="para">
To test the <abbr class="abbrev">IPsec</abbr> connection, run
the <code class="command">tcpdump</code> utility to view the network
packets being transfered between the hosts and verify that they are encrypted via IPsec.
The packet should include an AH header and should be shown as ESP packets. ESP means it is
encrypted. For example:
</div><pre class="screen">[root@myServer ~]# tcpdump -n -i eth0
host <targetSystem>
IP 172.16.45.107 > 172.16.44.192: AH(spi=0x0954ccb6,seq=0xbb):
ESP(spi=0x0c9f2164,seq=0xbb)
</pre></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"><strong>Prev</strong>2.7.6. IPsec
Host-to-Host Configuration</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"><strong>Next</strong>2.7.7. IPsec
Network-to-Network
Configuration</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
IPsec Network-to-Network Configuration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"
title="2.7.7. IPsec Network-to-Network Configuration"/><link
rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"
title="2.7.7. IPsec Network-to-Network Configuration"/><link
rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"
title="2.7.8. Starting and Stopping an IPsec
Connection"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><im
g src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration">2.7.7.2. Manual
<abbr class="abbrev">IPsec</abbr> Network-to-Network
Configuration</h4></div></div></div><div
class="para">
Suppose <acronym class="acronym">LAN</acronym> A
(
lana.example.com) and <acronym class="acronym">LAN</acronym> B
(
lanb.example.com) want to connect to each other through an <abbr
class="abbrev">IPsec</abbr> tunnel. The network address for <acronym
class="acronym">LAN</acronym> A is in the 192.168.1.0/24 range, while
<acronym class="acronym">LAN</acronym> B uses the 192.168.2.0/24
range. The gateway IP address is 192.168.1.254 for <acronym
class="acronym">LAN</acronym> A and 192.168.2.254 for <acronym
class="acronym">LAN</acronym> B. The <abbr
class="abbrev">IPsec</abbr> routers are separate from each <acronym
class="acronym">LAN</acronym> gateway and use two network devices: eth0
is assigned to an externally-accessible static IP address which accesses the Internet,
while eth1 acts as a routing point to process and transmit <acronym
class="acronym">LAN</acronym> packets from one network node to the
remote network nodes.
</div><div class="para">
The <abbr class="abbrev">IPsec</abbr> connection between each
network uses a pre-shared key with the value of <code
class="computeroutput">r3dh4tl1nux</code>, and the administrators of A
and B agree to let <code class="command">racoon</code> automatically
generate and share an authentication key between each <abbr
class="abbrev">IPsec</abbr> router. The administrator of <acronym
class="acronym">LAN</acronym> A decides to name the <abbr
class="abbrev">IPsec</abbr> connection <code
class="computeroutput">ipsec0</code>, while the administrator of
<acronym class="acronym">LAN</acronym> B names the <abbr
class="abbrev">IPsec</abbr> connection <code
class="computeroutput">ipsec1</code>.
</div><div class="para">
The following example shows the contents of the <code
class="filename">ifcfg</code> file for a network-to-network <abbr
class="abbrev">IPsec</abbr> connection for <acronym
class="acronym">LAN</acronym> A. The unique name to identify the
connection in this example is <em
class="replaceable"><code>ipsec0</code></em>, so the
resulting file is called <code
class="filename">/etc/sysconfig/network-scripts/ifcfg-ipsec0</code>.
</div><pre class="screen">TYPE=IPSEC
ONBOOT=yes
IKE_METHOD=PSK
SRCGW=192.168.1.254
DSTGW=192.168.2.254
SRCNET=192.168.1.0/24
DSTNET=192.168.2.0/24
DST=<em class="replaceable"><code>X.X.X.X</code></em>
</pre><div class="para">
The following list describes the contents of this file:
</div><div class="variablelist"><dl><dt><span
class="term">TYPE=IPSEC</span></dt><dd><div
class="para">
Specifies the type of connection.
</div></dd><dt><span
class="term">ONBOOT=yes</span></dt><dd><div
class="para">
Specifies that the connection should initiate on boot-up.
</div></dd><dt><span
class="term">IKE_METHOD=PSK</span></dt><dd><div
class="para">
Specifies that the connection uses the pre-shared key method of authentication.
</div></dd><dt><span
class="term">SRCGW=192.168.1.254</span></dt><dd><div
class="para">
The IP address of the source gateway. For LAN A, this is the LAN A gateway, and for
LAN B, the LAN B gateway.
</div></dd><dt><span
class="term">DSTGW=192.168.2.254</span></dt><dd><div
class="para">
The IP address of the destination gateway. For LAN A, this is the LAN B gateway,
and for LAN B, the LAN A gateway.
</div></dd><dt><span
class="term">SRCNET=192.168.1.0/24</span></dt><dd><div
class="para">
Specifies the source network for the <abbr
class="abbrev">IPsec</abbr> connection, which in this example is the
network range for LAN A.
</div></dd><dt><span
class="term">DSTNET=192.168.2.0/24</span></dt><dd><div
class="para">
Specifies the destination network for the <abbr
class="abbrev">IPsec</abbr> connection, which in this example is the
network range for <acronym class="acronym">LAN</acronym> B.
</div></dd><dt><span
class="term">DST=X.X.X.X</span></dt><dd><div
class="para">
The externally-accessible IP address of <acronym
class="acronym">LAN</acronym> B.
</div></dd></dl></div><div class="para">
The following example is the content of the pre-shared key file called <code
class="filename">/etc/sysconfig/network-scripts/keys-ipsec<em
class="replaceable"><code>X</code></em></code> (where
<em class="replaceable"><code>X</code></em> is 0 for
<acronym class="acronym">LAN</acronym> A and 1 for <acronym
class="acronym">LAN</acronym> B) that both networks use to authenticate
each other. The contents of this file should be identical and only the root user should be
able to read or write this file.
</div><pre class="screen">IKE_PSK=r3dh4tl1nux
</pre><div class="important"><h2>Important</h2><div
class="para">
To change the <code class="filename">keys-ipsec<em
class="replaceable"><code>X</code></em></code> file
so that only the root user can read or edit the file, use the following command after
creating the file:
</div><pre class="screen">chmod 600
/etc/sysconfig/network-scripts/keys-ipsec1
</pre></div><div class="para">
To change the authentication key at any time, edit the <code
class="filename">keys-ipsec<em
class="replaceable"><code>X</code></em></code> file
on both <abbr class="abbrev">IPsec</abbr> routers. <span
class="emphasis"><em>Both keys must be identical for proper
connectivity</em></span>.
</div><div class="para">
The following example is the contents of the <code
class="filename">/etc/racoon/racoon.conf</code> configuration file for
the <abbr class="abbrev">IPsec</abbr> connection. Note that the
<code class="computeroutput">include</code> line at the bottom of
the file is automatically generated and only appears if the <abbr
class="abbrev">IPsec</abbr> tunnel is running.
</div><pre class="screen"># Racoon IKE daemon configuration
file.
# See 'man racoon.conf' for a description of the format and entries.
path include "/etc/racoon";
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
sainfo anonymous
{
pfs_group 2;
lifetime time 1 hour ;
encryption_algorithm 3des, blowfish 448, rijndael ;
authentication_algorithm hmac_sha1, hmac_md5 ;
compression_algorithm deflate ;
}
include "/etc/racoon/<em
class="replaceable"><code>X.X.X.X</code></em>.conf"
</pre><div class="para">
The following is the specific configuration for the connection to the remote network.
The file is called <code class="filename"><em
class="replaceable"><code>X.X.X.X</code></em>.conf</code>
(where <em class="replaceable"><code>X.X.X.X</code></em>
is the IP address of the remote <abbr class="abbrev">IPsec</abbr>
router). Note that this file is automatically generated when the <abbr
class="abbrev">IPsec</abbr> tunnel is activated and should not be
edited directly.
</div><pre class="screen">remote <em
class="replaceable"><code>X.X.X.X</code></em>{
exchange_mode aggressive, main;
my_identifier address;
proposal {
encryption_algorithm 3des;
hash_algorithm sha1;
authentication_method pre_shared_key;
dh_group 2 ;
}
}
</pre><div class="para">
Prior to starting the <abbr class="abbrev">IPsec</abbr>
connection, IP forwarding should be enabled in the kernel. To enable IP forwarding:
</div><div class="orderedlist"><ol><li><div
class="para">
Edit <code class="filename">/etc/sysctl.conf</code> and set
<code class="computeroutput">net.ipv4.ip_forward</code> to
<strong class="userinput"><code>1</code></strong>.
</div></li><li><div class="para">
Use the following command to enable the change:
</div><pre class="screen">[root@myServer ~] # sysctl -p
/etc/sysctl.conf
</pre></li></ol></div><div class="para">
To start the <abbr class="abbrev">IPsec</abbr> connection, use
the following command on each router:
</div><pre class="screen">[root@myServer ~] # /sbin/ifup ipsec0
</pre><div class="para">
The connections are activated, and both <acronym
class="acronym">LAN</acronym> A and <acronym
class="acronym">LAN</acronym> B are able to communicate with each
other. The routes are created automatically via the initialization script called by
running <code class="command">ifup</code> on the <abbr
class="abbrev">IPsec</abbr> connection. To show a list of routes for
the network, use the following command:
</div><pre class="screen">[root@myServer ~] # /sbin/ip route
list
</pre><div class="para">
To test the <abbr class="abbrev">IPsec</abbr> connection, run
the <code class="command">tcpdump</code> utility on the
externally-routable device (eth0 in this example) to view the network packets being
transfered between the hosts (or networks), and verify that they are encrypted via IPsec.
For example, to check the <abbr class="abbrev">IPsec</abbr>
connectivity of <acronym class="acronym">LAN</acronym> A, use the
following command:
</div><pre class="screen">[root@myServer ~] # tcpdump -n -i eth0
host <em
class="replaceable"><code>lana.example.com</code></em>
</pre><div class="para">
The packet should include an AH header and should be shown as ESP packets. ESP means
it is encrypted. For example (back slashes denote a continuation of one line):
</div><pre class="screen">12:24:26.155529
lanb.example.com
>
lana.example.com: AH(spi=0x021c9834,seq=0x358): \
lanb.example.com >
lana.example.com: ESP(spi=0x00c887ad,seq=0x358) (DF) \
(ipip-proto-4)
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"><strong>Prev</strong>2.7.7. IPsec
Network-to-Network Configuration</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html"><strong>Next</strong>2.7.8. Starting
and Stopping an IPsec
Connection</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Additional_Resources.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Resources</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"
title="2.6.9. Setting Up Cross Realm Authentication"/><link
rel="next"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"
title="2.6.10.2. Useful Kerberos Websites"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Docu
mentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Additional_Resources">2.6.10. Additional
Resources</h3></div></div></div><a id="d0e10726"
class="indexterm"/><div class="para">
For more information about Kerberos, refer to the following resources.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Installed_Kerberos_Documentation">2.6.10.1. Installed
Kerberos Documentation</h4></div></div></div><a
id="d0e10736" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
The <em class="citetitle">Kerberos V5 Installation Guide</em>
and the <em class="citetitle">Kerberos V5 System Administrator's
Guide</em> in PostScript and HTML formats. These can be found in the <code
class="filename">/usr/share/doc/krb5-server-<em
class="replaceable"><code><version-number></code></em>/</code>
directory (where <em
class="replaceable"><code><version-number></code></em>
is the version number of the <code
class="command">krb5-server</code> package installed on your system).
</div></li><li><div class="para">
The <em class="citetitle">Kerberos V5 UNIX User's
Guide</em> in PostScript and HTML formats. These can be found in the <code
class="filename">/usr/share/doc/krb5-workstation-<em
class="replaceable"><code><version-number></code></em>/</code>
directory (where <em
class="replaceable"><code><version-number></code></em>
is the version number of the <code
class="command">krb5-workstation</code> package installed on your
system).
</div></li><li><div class="para">
Kerberos man pages — There are a number of man pages for the various applications
and configuration files involved with a Kerberos implementation. The following is a list
of some of the more important man pages.
</div><div class="variablelist"><dl><dt><span
class="term">Client Applications</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man kerberos</code> — An
introduction to the Kerberos system which describes how credentials work and provides
recommendations for obtaining and destroying Kerberos tickets. The bottom of the man page
references a number of related man pages.
</div></li><li><div class="para">
<code class="command">man kinit</code> — Describes how to
use this command to obtain and cache a ticket-granting ticket.
</div></li><li><div class="para">
<code class="command">man kdestroy</code> — Describes how
to use this command to destroy Kerberos credentials.
</div></li><li><div class="para">
<code class="command">man klist</code> — Describes how to
use this command to list cached Kerberos credentials.
</div></li></ul></div></dd><dt><span
class="term">Administrative
Applications</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man kadmin</code> — Describes how
to use this command to administer the Kerberos V5 database.
</div></li><li><div class="para">
<code class="command">man kdb5_util</code> — Describes
how to use this command to create and perform low-level administrative functions on the
Kerberos V5 database.
</div></li></ul></div></dd><dt><span
class="term">Server Applications</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man krb5kdc</code> — Describes
available command line options for the Kerberos V5 KDC.
</div></li><li><div class="para">
<code class="command">man kadmind</code> — Describes
available command line options for the Kerberos V5 administration server.
</div></li></ul></div></dd><dt><span
class="term">Configuration Files</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man krb5.conf</code> — Describes
the format and options available within the configuration file for the Kerberos V5
library.
</div></li><li><div class="para">
<code class="command">man kdc.conf</code> — Describes the
format and options available within the configuration file for the Kerberos V5 AS and
KDC.
</div></li></ul></div></dd></dl></div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"><strong>Prev</strong>2.6.9. Setting
Up Cross Realm Authentication</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"><strong>Next</strong>2.6.10.2. Useful
Kerberos Websites</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
a Kerberos 5 Client</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"
title="2.6.5. Configuring a Kerberos 5 Server"/><link rel="next"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"
title="2.6.7. Domain-to-Realm Mapping"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></
a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client">2.6.6. Configuring
a Kerberos 5 Client</h3></div></div></div><a
id="d0e9792" class="indexterm"/><div class="para">
Setting up a Kerberos 5 client is less involved than setting up a server. At a minimum,
install the client packages and provide each client with a valid <code
class="filename">krb5.conf</code> configuration file. While <code
class="command">ssh</code> and <code
class="command">slogin</code> are the preferred method of remotely
logging in to client systems, Kerberized versions of <code
class="command">rsh</code> and <code
class="command">rlogin</code> are still available, though deploying
them requires that a few more configuration changes be made.
</div><div class="procedure"><ol
class="1"><li><div class="para">
Be sure that time synchronization is in place between the Kerberos client and the
KDC. Refer to <a class="xref"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"
title="2.6.5. Configuring a Kerberos 5 Server">Section 2.6.5, “Configuring a
Kerberos 5 Server”</a> for more information. In addition, verify that DNS is working
properly on the Kerberos client before configuring the Kerberos client programs.
</div></li><li><div class="para">
Install the <code class="filename">krb5-libs</code> and
<code class="filename">krb5-workstation</code> packages on all of
the client machines. Supply a valid <code
class="filename">/etc/krb5.conf</code> file for each client (usually
this can be the same <code class="filename">krb5.conf</code> file
used by the KDC).
</div></li><li><div class="para">
Before a workstation in the realm can use Kerberos to authenticate users who connect
using <code class="command">ssh</code> or Kerberized <code
class="command">rsh</code> or <code
class="command">rlogin</code>, it must have its own host principal in
the Kerberos database. The <code class="command">sshd</code>,
<code class="command">kshd</code>, and <code
class="command">klogind</code> server programs all need access to the
keys for the <span class="emphasis"><em>host</em></span>
service's principal. Additionally, in order to use the kerberized <code
class="command">rsh</code> and <code
class="command">rlogin</code> services, that workstation must have the
<code class="filename">xinetd</code> package installed.
</div><div class="para">
Using <code class="command">kadmin</code>, add a host principal
for the workstation on the KDC. The instance in this case is the hostname of the
workstation. Use the <code class="command">-randkey</code> option
for the <code class="command">kadmin</code>'s <code
class="command">addprinc</code> command to create the principal and
assign it a random key:
</div><pre class="screen">addprinc -randkey host/<em
class="replaceable"><code>blah.example.com</code></em>
</pre><div class="para">
Now that the principal has been created, keys can be extracted for the workstation by
running <code class="command">kadmin</code> <span
class="emphasis"><em>on the workstation itself</em></span>,
and using the <code class="command">ktadd</code> command within
<code class="command">kadmin</code>:
</div><pre class="screen">ktadd -k /etc/krb5.keytab host/<em
class="replaceable"><code>blah.example.com</code></em>
</pre></li><li><div class="para">
To use other kerberized network services, they must first be started. Below is a list
of some common kerberized services and instructions about enabling them:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">ssh</code> — OpenSSH uses GSS-API to
authenticate users to servers if the client's and server's configuration both have
<code class="option">GSSAPIAuthentication</code> enabled. If the
client also has <code
class="option">GSSAPIDelegateCredentials</code> enabled, the user's
credentials are made available on the remote system.
</div></li><li><div class="para">
<code class="command">rsh</code> and <code
class="command">rlogin</code> — To use the kerberized versions of
<code class="command">rsh</code> and <code
class="command">rlogin</code>, enable <code
class="command">klogin</code>, <code
class="command">eklogin</code>, and <code
class="command">kshell</code>.
</div></li><li><div class="para">
Telnet — To use kerberized Telnet, <code
class="command">krb5-telnet</code> must be enabled.
</div></li><li><div class="para">
FTP — To provide FTP access, create and extract a key for the principal with a root
of <code class="computeroutput">ftp</code>. Be certain to set the
instance to the fully qualified hostname of the FTP server, then enable <code
class="command">gssftp</code>.
</div></li><li><div class="para">
IMAP — To use a kerberized IMAP server, the <code
class="filename">cyrus-imap</code> package uses Kerberos 5 if it also
has the <code class="filename">cyrus-sasl-gssapi</code> package
installed. The <code class="filename">cyrus-sasl-gssapi</code>
package contains the Cyrus SASL plugins which support GSS-API authentication. Cyrus IMAP
should function properly with Kerberos as long as the <code
class="command">cyrus</code> user is able to find the proper key in
<code class="filename">/etc/krb5.keytab</code>, and the root for the
principal is set to <code class="command">imap</code> (created with
<code class="command">kadmin</code>).
</div><div class="para">
An alternative to <code class="filename">cyrus-imap</code>
can be found in the <code class="command">dovecot</code> package,
which is also included in Fedora. This package contains an IMAP server but does not, to
date, support GSS-API and Kerberos.
</div></li><li><div class="para">
CVS — To use a kerberized CVS server, <code
class="command">gserver</code> uses a principal with a root of <code
class="computeroutput">cvs</code> and is otherwise identical to the CVS
<code class="command">pserver</code>.
</div></li></ul></div></li></ol></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"><strong>Prev</strong>2.6.5. Configuring
a Kerberos 5 Server</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"><strong>Next</strong>2.6.7. Domain-to-Realm
Mapping</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
a Kerberos 5 Server</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"
title="2.6.4. Kerberos and PAM"/><link rel="next"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"
title="2.6.6. Configuring a Kerberos 5
Client"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul clas
s="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server">2.6.5. Configuring
a Kerberos 5 Server</h3></div></div></div><a
id="d0e9582" class="indexterm"/><div class="para">
When setting up Kerberos, install the KDC first. If it is necessary to set up slave
servers, install the master first.
</div><div class="para">
To configure the first Kerberos KDC, follow these steps:
</div><div class="procedure"><ol
class="1"><li><div class="para">
Ensure that time synchronization and DNS are functioning correctly on all client and
server machines before configuring Kerberos. Pay particular attention to time
synchronization between the Kerberos server and its clients. If the time difference
between the server and client is greater than five minutes (this is configurable in
Kerberos 5), Kerberos clients can not authenticate to the server. This time
synchronization is necessary to prevent an attacker from using an old Kerberos ticket to
masquerade as a valid user.
</div><div class="para">
It is advisable to set up a Network Time Protocol (NTP) compatible client/server
network even if Kerberos is not being used. Fedora includes the <code
class="filename">ntp</code> package for this purpose. Refer to <code
class="filename">/usr/share/doc/ntp-<em
class="replaceable"><code><version-number></code></em>/index.html</code>
(where <em
class="replaceable"><code><version-number></code></em>
is the version number of the <code class="filename">ntp</code>
package installed on your system) for details about how to set up Network Time Protocol
servers, and <a href="http://www.ntp.org">http://www.ntp.org</a> for
more information about NTP.
</div></li><li><div class="para">
Install the <code class="filename">krb5-libs</code>, <code
class="filename">krb5-server</code>, and <code
class="filename">krb5-workstation</code> packages on the dedicated
machine which runs the KDC. This machine needs to be very secure — if possible, it should
not run any services other than the KDC.
</div></li><li><div class="para">
Edit the <code class="filename">/etc/krb5.conf</code> and
<code class="filename">/var/kerberos/krb5kdc/kdc.conf</code>
configuration files to reflect the realm name and domain-to-realm mappings. A simple realm
can be constructed by replacing instances of <em
class="replaceable"><code>EXAMPLE.COM</code></em> and
<em class="replaceable"><code>example.com</code></em>
with the correct domain name — being certain to keep uppercase and lowercase names in the
correct format — and by changing the KDC from <em
class="replaceable"><code>kerberos.example.com</code></em>
to the name of the Kerberos server. By convention, all realm names are uppercase and all
DNS hostnames and domain names are lowercase. For full details about the formats of these
configuration files, refer to their respective man pages.
</div></li><li><div class="para">
Create the database using the <code
class="command">kdb5_util</code> utility from a shell prompt:
</div><pre class="screen">/usr/kerberos/sbin/kdb5_util create
-s
</pre><div class="para">
The <code class="command">create</code> command creates the
database that stores keys for the Kerberos realm. The <code
class="command">-s</code> switch forces creation of a <em
class="firstterm">stash</em> file in which the master server key is
stored. If no stash file is present from which to read the key, the Kerberos server
(<code class="command">krb5kdc</code>) prompts the user for the
master server password (which can be used to regenerate the key) every time it starts.
</div></li><li><div class="para">
Edit the <code
class="filename">/var/kerberos/krb5kdc/kadm5.acl</code> file. This file
is used by <code class="command">kadmind</code> to determine which
principals have administrative access to the Kerberos database and their level of access.
Most organizations can get by with a single line:
</div><pre class="screen">*/admin(a)EXAMPLE.com *
</pre><div class="para">
Most users are represented in the database by a single principal (with a <span
class="emphasis"><em>NULL</em></span>, or empty, instance,
such as <span
class="emphasis"><em>joe(a)EXAMPLE.COM</em></span>). In this
configuration, users with a second principal with an instance of <span
class="emphasis"><em>admin</em></span> (for example,
<span
class="emphasis"><em>joe/admin(a)EXAMPLE.COM</em></span>) are
able to wield full power over the realm's Kerberos database.
</div><div class="para">
After <code class="command">kadmind</code> has been started on
the server, any user can access its services by running <code
class="command">kadmin</code> on any of the clients or servers in the
realm. However, only users listed in the <code
class="filename">kadm5.acl</code> file can modify the database in any
way, except for changing their own passwords.
</div><div class="note"><h2>Note</h2><div
class="para">
The <code class="command">kadmin</code> utility communicates
with the <code class="command">kadmind</code> server over the
network, and uses Kerberos to handle authentication. Consequently, the first principal
must already exist before connecting to the server over the network to administer it.
Create the first principal with the <code
class="command">kadmin.local</code> command, which is specifically
designed to be used on the same host as the KDC and does not use Kerberos for
authentication.
</div></div><div class="para">
Type the following <code class="command">kadmin.local</code>
command at the KDC terminal to create the first principal:
</div><pre class="screen">/usr/kerberos/sbin/kadmin.local -q
"addprinc <em
class="replaceable"><code>username</code></em>/admin"
</pre></li><li><div class="para">
Start Kerberos using the following commands:
</div><pre class="screen">/sbin/service krb5kdc start
/sbin/service kadmin start
/sbin/service krb524 start
</pre></li><li><div class="para">
Add principals for the users using the <code
class="command">addprinc</code> command within <code
class="command">kadmin</code>. <code
class="command">kadmin</code> and <code
class="command">kadmin.local</code> are command line interfaces to the
KDC. As such, many commands — such as <code
class="command">addprinc</code> — are available after launching the
<code class="command">kadmin</code> program. Refer to the <code
class="command">kadmin</code> man page for more information.
</div></li><li><div class="para">
Verify that the KDC is issuing tickets. First, run <code
class="command">kinit</code> to obtain a ticket and store it in a
credential cache file. Next, use <code class="command">klist</code>
to view the list of credentials in the cache and use <code
class="command">kdestroy</code> to destroy the cache and the
credentials it contains.
</div><div class="note"><h2>Note</h2><div
class="para">
By default, <code class="command">kinit</code> attempts to
authenticate using the same system login username (not the Kerberos server). If that
username does not correspond to a principal in the Kerberos database, <code
class="command">kinit</code> issues an error message. If that happens,
supply <code class="command">kinit</code> with the name of the
correct principal as an argument on the command line (<code
class="command">kinit <em
class="replaceable"><code><principal></code></em></code>).
</div></div></li></ol></div><div
class="para">
Once these steps are completed, the Kerberos server should be up and running.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"><strong>Prev</strong>2.6.4. Kerberos
and PAM</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"><strong>Next</strong>2.6.6. Configuring
a Kerberos 5 Client</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Mapping</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"
title="2.6.6. Configuring a Kerberos 5 Client"/><link rel="next"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"
title="2.6.8. Setting Up Secondary KDCs"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></
p><ul class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping">2.6.7. Domain-to-Realm
Mapping</h3></div></div></div><div class="para">
When a client attempts to access a service running on a particular server, it knows the
name of the service (<span
class="emphasis"><em>host</em></span>) and the name of the
server (<span
class="emphasis"><em>foo.example.com</em></span>), but
because more than one realm may be deployed on your network, it must guess at the name of
the realm in which the service resides.
</div><div class="para">
By default, the name of the realm is taken to be the DNS domain name of the server,
upper-cased.
</div><div
class="literallayout"><p>foo.example.org → EXAMPLE.ORG<br/>
foo.example.com → EXAMPLE.COM<br/>
foo.hq.example.com → HQ.EXAMPLE.COM<br/>
</p></div><div class="para">
In some configurations, this will be sufficient, but in others, the realm name which is
derived will be the name of a non-existant realm. In these cases, the mapping from the
server's DNS domain name to the name of its realm must be specified in the <span
class="emphasis"><em>domain_realm</em></span> section of
the client system's <code class="filename">krb5.conf</code>. For
example:
</div><pre class="screen">[domain_realm]
.example.com =
EXAMPLE.COM
example.com =
EXAMPLE.COM
</pre><div class="para">
The above configuration specifies two mappings. The first mapping specifies that any
system in the "example.com" DNS domain belongs to the <span
class="emphasis"><em>EXAMPLE.COM</em></span> realm. The
second specifies that a system with the exact name "example.com" is also in the
realm. (The distinction between a domain and a specific host is marked by the presence or
lack of an initial ".".) The mapping can also be stored directly in DNS.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Client.html"><strong>Prev</strong>2.6.6. Configuring
a Kerberos 5 Client</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"><strong>Next</strong>2.6.8. Setting
Up Secondary KDCs</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-How_Kerberos_Works.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Kerberos Works</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"
title="2.6.2. Kerberos Terminology"/><link rel="next"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"
title="2.6.4. Kerberos and PAM"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-How_Kerberos_Works">2.6.3. How Kerberos
Works</h3></div></div></div><a id="d0e9443"
class="indexterm"/><a id="d0e9448"
class="indexterm"/><a id="d0e9453"
class="indexterm"/><a id="d0e9458"
class="indexterm"/><a id="d0e9463"
class="indexterm"/><div class="para">
Kerberos differs from username/password authentication methods. Instead of
authenticating each user to each network service, Kerberos uses symmetric encryption and a
trusted third party (a KDC), to authenticate users to a suite of network services. When a
user authenticates to the KDC, the KDC sends a ticket specific to that session back to the
user's machine, and any Kerberos-aware services look for the ticket on the user's
machine rather than requiring the user to authenticate using a password.
</div><div class="para">
When a user on a Kerberos-aware network logs in to their workstation, their principal
is sent to the KDC as part of a request for a TGT from the Authentication Server. This
request can be sent by the log-in program so that it is transparent to the user, or can be
sent by the <code class="command">kinit</code> program after the
user logs in.
</div><div class="para">
The KDC then checks for the principal in its database. If the principal is found, the
KDC creates a TGT, which is encrypted using the user's key and returned to that user.
</div><div class="para">
The login or <code class="command">kinit</code> program on the
client then decrypts the TGT using the user's key, which it computes from the
user's password. The user's key is used only on the client machine and is <span
class="emphasis"><em>not</em></span> transmitted over the
network.
</div><div class="para">
The TGT is set to expire after a certain period of time (usually ten to twenty-four
hours) and is stored in the client machine's credentials cache. An expiration time is
set so that a compromised TGT is of use to an attacker for only a short period of time.
After the TGT has been issued, the user does not have to re-enter their password until the
TGT expires or until they log out and log in again.
</div><div class="para">
Whenever the user needs access to a network service, the client software uses the TGT
to request a new ticket for that specific service from the TGS. The service ticket is then
used to authenticate the user to that service transparently.
</div><div class="warning"><h2>Warning</h2><div
class="para">
The Kerberos system can be compromised if a user on the network authenticates against
a non-Kerberos aware service by transmitting a password in plain text. The use of
non-Kerberos aware services is highly discouraged. Such services include Telnet and FTP.
The use of other encrypted protocols, such as SSH or SSL-secured services, however, is
preferred, although not ideal.
</div></div><div class="para">
This is only a broad overview of how Kerberos authentication works. Refer to <a
class="xref"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"
title="2.6.10. Additional Resources">Section 2.6.10, “Additional
Resources”</a> for links to more in-depth information.
</div><div class="note"><h2>Note</h2><div
class="para">
Kerberos depends on the following network services to function correctly.
<div class="itemizedlist"><ul><li><div
class="para">
Approximate clock synchronization between the machines on the network.
</div><div class="para">
A clock synchronization program should be set up for the network, such as <code
class="command">ntpd</code>. Refer to <code
class="filename">/usr/share/doc/ntp-<em
class="replaceable"><code><version-number></code></em>/index.html</code>
for details on setting up Network Time Protocol servers (where <em
class="replaceable"><code><version-number></code></em>
is the version number of the <code class="filename">ntp</code>
package installed on your system).
</div></li><li><div class="para">
Domain Name Service (DNS).
</div><div class="para">
You should ensure that the DNS entries and hosts on the network are all properly
configured. Refer to the <em class="citetitle">Kerberos V5 System
Administrator's Guide</em> in <code
class="filename">/usr/share/doc/krb5-server-<em
class="replaceable"><code><version-number></code></em></code>
for more information (where <em
class="replaceable"><code><version-number></code></em>
is the version number of the <code
class="filename">krb5-server</code> package installed on your system).
</div></li></ul></div>
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"><strong>Prev</strong>2.6.2. Kerberos
Terminology</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"><strong>Next</strong>2.6.4. Kerberos
and PAM</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Kerberos_Terminology.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Terminology</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="next"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"
title="2.6.3. How Kerberos Works"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p" href="sect-Secu
rity_Guide-Kerberos.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Kerberos_Terminology">2.6.2. Kerberos
Terminology</h3></div></div></div><a id="d0e9276"
class="indexterm"/><div class="para">
Kerberos has its own terminology to define various aspects of the service. Before
learning how Kerberos works, it is important to learn the following terms.
</div><div class="variablelist"><dl><dt><span
class="term">authentication server
(AS)</span></dt><dd><div class="para">
A server that issues tickets for a desired service which are in turn given to users
for access to the service. The AS responds to requests from clients who do not have or do
not send credentials with a request. It is usually used to gain access to the
ticket-granting server (TGS) service by issuing a ticket-granting ticket (TGT). The AS
usually runs on the same host as the key distribution center (KDC).
</div></dd><dt><span
class="term">ciphertext</span></dt><dd><div
class="para">
Encrypted data.
</div></dd><dt><span
class="term">client</span></dt><dd><div
class="para">
An entity on the network (a user, a host, or an application) that can receive a
ticket from Kerberos.
</div></dd><dt><span
class="term">credentials</span></dt><dd><div
class="para">
A temporary set of electronic credentials that verify the identity of a client for a
particular service. Also called a ticket.
</div></dd><dt><span class="term">credential cache
or ticket file</span></dt><dd><div class="para">
A file which contains the keys for encrypting communications between a user and
various network services. Kerberos 5 supports a framework for using other cache types,
such as shared memory, but files are more thoroughly supported.
</div></dd><dt><span class="term">crypt
hash</span></dt><dd><div class="para">
A one-way hash used to authenticate users. These are more secure than using
unencrypted data, but they are still relatively easy to decrypt for an experienced
cracker.
</div></dd><dt><span
class="term">GSS-API</span></dt><dd><div
class="para">
The Generic Security Service Application Program Interface (defined in RFC-2743
published by The Internet Engineering Task Force) is a set of functions which provide
security services. This API is used by clients and services to authenticate to each other
without either program having specific knowledge of the underlying mechanism. If a network
service (such as cyrus-IMAP) uses GSS-API, it can authenticate using Kerberos.
</div></dd><dt><span
class="term">hash</span></dt><dd><div
class="para">
Also known as a <em class="firstterm">hash value</em>. A value
generated by passing a string through a <em class="firstterm">hash
function</em>. These values are typically used to ensure that transmitted data has
not been tampered with.
</div></dd><dt><span class="term">hash
function</span></dt><dd><div class="para">
A way of generating a digital "fingerprint" from input data. These
functions rearrange, transpose or otherwise alter data to produce a <em
class="firstterm">hash value</em>.
</div></dd><dt><span
class="term">key</span></dt><dd><div
class="para">
Data used when encrypting or decrypting other data. Encrypted data cannot be
decrypted without the proper key or extremely good fortune on the part of the cracker.
</div></dd><dt><span class="term">key distribution
center (KDC)</span></dt><dd><div class="para">
A service that issues Kerberos tickets, and which usually run on the same host as
the ticket-granting server (TGS).
</div></dd><dt><span class="term">keytab (or key
table)</span></dt><dd><div class="para">
A file that includes an unencrypted list of principals and their keys. Servers
retrieve the keys they need from keytab files instead of using <code
class="command">kinit</code>. The default keytab file is <code
class="filename">/etc/krb5.keytab</code>. The KDC administration
server, <code class="command">/usr/kerberos/sbin/kadmind</code>, is
the only service that uses any other file (it uses <code
class="filename">/var/kerberos/krb5kdc/kadm5.keytab</code>).
</div></dd><dt><span
class="term">kinit</span></dt><dd><div
class="para">
The <code class="command">kinit</code> command allows a
principal who has already logged in to obtain and cache the initial ticket-granting ticket
(TGT). Refer to the <code class="command">kinit</code> man page for
more information.
</div></dd><dt><span class="term">principal (or
principal name)</span></dt><dd><div class="para">
The principal is the unique name of a user or service allowed to authenticate using
Kerberos. A principal follows the form <code
class="computeroutput">root[/instance]@REALM</code>. For a typical
user, the root is the same as their login ID. The <code
class="computeroutput">instance</code> is optional. If the principal
has an instance, it is separated from the root with a forward slash ("/"). An
empty string ("") is considered a valid instance (which differs from the default
<code class="computeroutput">NULL</code> instance), but using it can
be confusing. All principals in a realm have their own key, which for users is derived
from a password or is randomly set for services.
</div></dd><dt><span
class="term">realm</span></dt><dd><div
class="para">
A network that uses Kerberos, composed of one or more servers called KDCs and a
potentially large number of clients.
</div></dd><dt><span
class="term">service</span></dt><dd><div
class="para">
A program accessed over the network.
</div></dd><dt><span
class="term">ticket</span></dt><dd><div
class="para">
A temporary set of electronic credentials that verify the identity of a client for a
particular service. Also called credentials.
</div></dd><dt><span class="term">ticket-granting
server (TGS)</span></dt><dd><div class="para">
A server that issues tickets for a desired service which are in turn given to users
for access to the service. The TGS usually runs on the same host as the KDC.
</div></dd><dt><span class="term">ticket-granting
ticket (TGT)</span></dt><dd><div class="para">
A special ticket that allows the client to obtain additional tickets without
applying for them from the KDC.
</div></dd><dt><span class="term">unencrypted
password</span></dt><dd><div class="para">
A plain text, human-readable password.
</div></dd></dl></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos.html"><strong>Prev</strong>2.6. Kerberos</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"><strong>Next</strong>2.6.3. How
Kerberos Works</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Kerberos_and_PAM.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and PAM</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"
title="2.6.3. How Kerberos Works"/><link rel="next"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"
title="2.6.5. Configuring a Kerberos 5
Server"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav">
<li class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Kerberos_and_PAM">2.6.4. Kerberos and
PAM</h3></div></div></div><a id="d0e9547"
class="indexterm"/><a id="d0e9552"
class="indexterm"/><div class="para">
Kerberos-aware services do not currently make use of Pluggable Authentication Modules
(PAM) — these services bypass PAM completely. However, applications that use PAM can make
use of Kerberos for authentication if the <code
class="filename">pam_krb5</code> module (provided in the <code
class="filename">pam_krb5</code> package) is installed. The <code
class="filename">pam_krb5</code> package contains sample configuration
files that allow services such as <code class="command">login</code>
and <code class="command">gdm</code> to authenticate users as well
as obtain initial credentials using their passwords. If access to network servers is
always performed using Kerberos-aware services or services that use GSS-API, such as IMAP,
the network can be considered reasonably safe.
</div><div class="tip"><h2>Tip</h2><div
class="para">
Administrators should be careful not to allow users to authenticate to most network
services using Kerberos passwords. Many protocols used by these services do not encrypt
the password before sending it over the network, destroying the benefits of the Kerberos
system. For example, users should not be allowed to authenticate to Telnet services with
the same password they use for Kerberos authentication.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-How_Kerberos_Works.html"><strong>Prev</strong>2.6.3. How
Kerberos Works</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Configuring_a_Kerberos_5_Server.html"><strong>Next</strong>2.6.5. Configuring
a Kerberos 5 Server</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Up Cross Realm Authentication</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"
title="2.6.8. Setting Up Secondary KDCs"/><link rel="next"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"
title="2.6.10. Additional Resources"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul c
lass="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication">2.6.9. Setting
Up Cross Realm Authentication</h3></div></div></div><div
class="para">
<span class="emphasis"><em>Cross-realm
authentication</em></span> is the term which is used to describe situations in
which clients (typically users) of one realm use Kerberos to authenticate to services
(typically server processes running on a particular server system) which belong to a realm
other than their own.
</div><div class="para">
For the simplest case, in order for a client of a realm named <code
class="literal">A.EXAMPLE.COM</code> to access a service in the
<code class="literal">B.EXAMPLE.COM</code> realm, both realms must
share a key for a principal named <code
class="literal">krbtgt/B.EXAMPLE.COM(a)A.EXAMPLE.COM</code>, and both
keys must have the same key version number associated with them.
</div><div class="para">
To accomplish this, select a very strong password or passphrase, and create an entry
for the principal in both realms using kadmin.
</div><div class="literallayout"><p> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>kadmin -r A.EXAMPLE.COM</code></strong></code> <code
class="computeroutput"><code
class="prompt">kadmin:</code> <strong
class="userinput"><code>add_principal krbtgt/B.EXAMPLE.COM(a)A.EXAMPLE.COM</code></strong></code> <code
class="computeroutput">Enter password for principal "krbtgt/B.EXAMPLE.COM@A.EXAMPLE.COM":</code> <code
class="computeroutput">Re-enter password for principal "krbtgt/B.EXAMPLE.COM@A.EXAMPLE.COM":</code> <code
class="computeroutput">Principal "krbtgt/B.EXAMPLE.COM(a)A.EXAMPLE.com" created.</code> <strong
class="userinput"><code>quit</code></strong> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>kadmin -r B.EXAMPLE.COM</code></strong></code> <code
class="computeroutput"><code
class="prompt">kadmin:</code> <strong
class="userinput"><code>add_principal krbtgt/B.EXAM
PLE.COM(a)A.EXAMPLE.COM</code></strong></code> <code
class="computeroutput">Enter password for principal "krbtgt/B.EXAMPLE.COM@A.EXAMPLE.COM":</code> <code
class="computeroutput">Re-enter password for principal "krbtgt/B.EXAMPLE.COM@A.EXAMPLE.COM":</code> <code
class="computeroutput">Principal "krbtgt/B.EXAMPLE.COM(a)A.EXAMPLE.com" created.</code> <strong
class="userinput"><code>quit</code></strong><br/>
</p></div><div class="para">
Use the <code class="command">get_principal</code> command to
verify that both entries have matching key version numbers (<code
class="literal">kvno</code> values) and encryption types.
</div><div class="caution"><h2>Dumping the Database
Doesn't Do It</h2><div class="para">
Security-conscious administrators may attempt to use the <code
class="command">add_principal</code> command's <code
class="literal">-randkey</code> option to assign a random key instead
of a password, dump the new entry from the database of the first realm, and import it into
the second. This will not work unless the master keys for the realm databases are
identical, as the keys contained in a database dump are themselves encrypted using the
master key.
</div></div><div class="para">
Clients in the <code class="literal">A.EXAMPLE.COM</code> realm
are now able to authenticate to services in the <code
class="literal">B.EXAMPLE.COM</code> realm. Put another way, the
<code class="literal">B.EXAMPLE.COM</code> realm now <span
class="emphasis"><em>trusts</em></span> the <code
class="literal">A.EXAMPLE.COM</code> realm, or phrased even more
simply, <code class="literal">B.EXAMPLE.COM</code> now <span
class="emphasis"><em>trusts</em></span> <code
class="literal">A.EXAMPLE.COM</code>.
</div><div class="para">
This brings us to an important point: cross-realm trust is unidirectional by default.
The KDC for the <code class="literal">B.EXAMPLE.COM</code> realm may
trust clients from the <code class="literal">A.EXAMPLE.COM</code> to
authenticate to services in the <code
class="literal">B.EXAMPLE.COM</code> realm, but the fact that it does
has no effect on whether or not clients in the <code
class="literal">B.EXAMPLE.COM</code> realm are trusted to authenticate
to services in the <code class="literal">A.EXAMPLE.COM</code> realm.
To establish trust in the other direction, both realms would need to share keys for the
<code class="literal">krbtgt/A.EXAMPLE.COM(a)B.EXAMPLE.COM</code>
service (take note of the reversed in order of the two realms compared to the example
above).
</div><div class="para">
If direct trust relationships were the only method for providing trust between realms,
networks which contain multiple realms would be very difficult to set up. Luckily,
cross-realm trust is transitive. If clients from <code
class="literal">A.EXAMPLE.COM</code> can authenticate to services in
<code class="literal">B.EXAMPLE.COM</code>, and clients from
<code class="literal">B.EXAMPLE.COM</code> can authenticate to
services in <code class="literal">C.EXAMPLE.COM</code>, then clients
in <code class="literal">A.EXAMPLE.COM</code> can also authenticate
to services in <code class="literal">C.EXAMPLE.COM</code>, <span
class="emphasis"><em>even if <code
class="literal">C.EXAMPLE.COM</code> doesn't directly trust
<code class="literal">A.EXAMPLE.COM</code></em></span>.
This means that, on a network with multiple realms which all need to trust each other,
making good choices about which trust relationships to set up can greatly reduce the
amount of effort required.
</div><div class="para">
Now you face the more conventional problems: the client's system must be configured
so that it can properly deduce the realm to which a particular service belongs, and it
must be able to determine how to obtain credentials for services in that realm.
</div><div class="para">
First things first: the principal name for a service provided from a specific server
system in a given realm typically looks like this:
</div><div
class="literallayout"><p>service/server.example.com(a)EXAMPLE.COM<br/>
</p></div><div class="para">
In this example, <span
class="emphasis"><em>service</em></span> is typically
either the name of the protocol in use (other common values include <span
class="emphasis"><em>ldap</em></span>, <span
class="emphasis"><em>imap</em></span>, <span
class="emphasis"><em>cvs</em></span>, and <span
class="emphasis"><em>HTTP</em></span>) or <span
class="emphasis"><em>host</em></span>, <span
class="emphasis"><em>server.example.com</em></span> is the
fully-qualified domain name of the system which runs the service, and <code
class="literal">EXAMPLE.COM</code> is the name of the realm.
</div><div class="para">
To deduce the realm to which the service belongs, clients will most often consult DNS
or the <code class="literal">domain_realm</code> section of <code
class="filename">/etc/krb5.conf</code> to map either a hostname
(<span
class="emphasis"><em>server.example.com</em></span>) or a
DNS domain name (<span
class="emphasis"><em>.example.com</em></span>) to the name
of a realm (<span
class="emphasis"><em>EXAMPLE.COM</em></span>).
</div><div class="para">
Having determined which to which realm a service belongs, a client then has to
determine the set of realms which it needs to contact, and in which order it must contact
them, to obtain credentials for use in authenticating to the service.
</div><div class="para">
This can be done in one of two ways.
</div><div class="para">
The default method, which requires no explicit configuration, is to give the realms
names within a shared hierarchy. For an example, assume realms named <code
class="literal">A.EXAMPLE.COM</code>, <code
class="literal">B.EXAMPLE.COM</code>, and <code
class="literal">EXAMPLE.COM</code>. When a client in the <code
class="literal">A.EXAMPLE.COM</code> realm attempts to authenticate to
a service in <code class="literal">B.EXAMPLE.COM</code>, it will, by
default, first attempt to get credentials for the <code
class="literal">EXAMPLE.COM</code> realm, and then to use those
credentials to obtain credentials for use in the <code
class="literal">B.EXAMPLE.COM</code> realm.
</div><div class="para">
The client in this scenario treats the realm name as one might treat a DNS name. It
repeatedly strips off the components of its own realm's name to generate the names of
realms which are "above" it in the hierarchy until it reaches a point which is
also "above" the service's realm. At that point it begins prepending
components of the service's realm name until it reaches the service's realm. Each
realm which is involved in the process is another "hop".
</div><div class="para">
For example, using credentials in <code
class="literal">A.EXAMPLE.COM</code>, authenticating to a service in
<code class="literal">B.EXAMPLE.COM</code><code
class="literal">A.EXAMPLE.COM →
EXAMPLE.COM →
B.EXAMPLE.COM </code>
<div class="itemizedlist"><ul><li><div
class="para">
<code class="literal">A.EXAMPLE.COM</code> and <code
class="literal">EXAMPLE.COM</code> share a key for <code
class="literal">krbtgt/EXAMPLE.COM(a)A.EXAMPLE.COM</code>
</div></li><li><div class="para">
<code class="literal">EXAMPLE.COM</code> and <code
class="literal">B.EXAMPLE.COM</code> share a key for <code
class="literal">krbtgt/B.EXAMPLE.COM(a)EXAMPLE.COM</code>
</div></li></ul></div>
</div><div class="para">
Another example, using credentials in <code
class="literal">SITE1.SALES.EXAMPLE.COM</code>, authenticating to a
service in <code
class="literal">EVERYWHERE.EXAMPLE.COM</code><code
class="literal">SITE1.SALES.EXAMPLE.COM →
SALES.EXAMPLE.COM →
EXAMPLE.COM →
EVERYWHERE.EXAMPLE.COM </code>
<div class="itemizedlist"><ul><li><div
class="para">
<code class="literal">SITE1.SALES.EXAMPLE.COM</code> and
<code class="literal">SALES.EXAMPLE.COM</code> share a key for
<code
class="literal">krbtgt/SALES.EXAMPLE.COM(a)SITE1.SALES.EXAMPLE.COM</code>
</div></li><li><div class="para">
<code class="literal">SALES.EXAMPLE.COM</code> and <code
class="literal">EXAMPLE.COM</code> share a key for <code
class="literal">krbtgt/EXAMPLE.COM(a)SALES.EXAMPLE.COM</code>
</div></li><li><div class="para">
<code class="literal">EXAMPLE.COM</code> and <code
class="literal">EVERYWHERE.EXAMPLE.COM</code> share a key for <code
class="literal">krbtgt/EVERYWHERE.EXAMPLE.COM(a)EXAMPLE.COM</code>
</div></li></ul></div>
</div><div class="para">
Another example, this time using realm names whose names share no common suffix
(<code class="literal">DEVEL.EXAMPLE.COM</code> and <code
class="literal">PROD.EXAMPLE.ORG</code><code
class="literal">
DEVEL.EXAMPLE.COM →
EXAMPLE.COM → COM → ORG →
EXAMPLE.ORG →
PROD.EXAMPLE.ORG </code>
<div class="itemizedlist"><ul><li><div
class="para">
<code class="literal">DEVEL.EXAMPLE.COM</code> and <code
class="literal">EXAMPLE.COM</code> share a key for <code
class="literal">krbtgt/EXAMPLE.COM(a)DEVEL.EXAMPLE.COM</code>
</div></li><li><div class="para">
<code class="literal">EXAMPLE.COM</code> and <code
class="literal">COM</code> share a key for <code
class="literal">krbtgt/COM(a)EXAMPLE.COM</code>
</div></li><li><div class="para">
<code class="literal">COM</code> and <code
class="literal">ORG</code> share a key for <code
class="literal">krbtgt/ORG@COM</code>
</div></li><li><div class="para">
<code class="literal">ORG</code> and <code
class="literal">EXAMPLE.ORG</code> share a key for <code
class="literal">krbtgt/EXAMPLE.ORG@ORG</code>
</div></li><li><div class="para">
<code class="literal">EXAMPLE.ORG</code> and <code
class="literal">PROD.EXAMPLE.ORG</code> share a key for <code
class="literal">krbtgt/PROD.EXAMPLE.ORG(a)EXAMPLE.ORG</code>
</div></li></ul></div>
</div><div class="para">
The more complicated, but also more flexible, method involves configuring the <code
class="literal">capaths</code> section of <code
class="filename">/etc/krb5.conf</code>, so that clients which have
credentials for one realm will be able to look up which realm is next in the chain which
will eventually lead to the being able to authenticate to servers.
</div><div class="para">
The format of the <code class="literal">capaths</code> section is
relatively straightforward: each entry in the section is named after a realm in which a
client might exist. Inside of that subsection, the set of intermediate realms from which
the client must obtain credentials is listed as values of the key which corresponds to the
realm in which a service might reside. If there are no intermediate realms, the value
"." is used.
</div><div class="para">
Here's an example:
</div><div class="literallayout"><p> [capaths]<br/>
A.EXAMPLE.COM = {<br/>
B.EXAMPLE.COM = .<br/>
C.EXAMPLE.COM = B.EXAMPLE.COM<br/>
D.EXAMPLE.COM = B.EXAMPLE.COM<br/>
D.EXAMPLE.COM = C.EXAMPLE.COM<br/>
}<br/>
</p></div><div class="para">
In this example, clients in the <code
class="literal">A.EXAMPLE.COM</code> realm can obtain cross-realm
credentials for <code class="literal">B.EXAMPLE.COM</code> directly
from the <code class="literal">A.EXAMPLE.COM</code> KDC.
</div><div class="para">
If those clients wish to contact a service in the<code
class="literal">C.EXAMPLE.COM</code> realm, they will first need to
obtain necessary credentials from the <code
class="literal">B.EXAMPLE.COM</code> realm (this requires that <code
class="literal">krbtgt/B.EXAMPLE.COM(a)A.EXAMPLE.COM</code> exist), and
then use <code class="literal">those</code> credentials to obtain
credentials for use in the <code
class="literal">C.EXAMPLE.COM</code> realm (using <code
class="literal">krbtgt/C.EXAMPLE.COM(a)B.EXAMPLE.COM</code>).
</div><div class="para">
If those clients wish to contact a service in the <code
class="literal">D.EXAMPLE.COM</code> realm, they will first need to
obtain necessary credentials from the <code
class="literal">B.EXAMPLE.COM</code> realm, and then credentials from
the <code class="literal">C.EXAMPLE.COM</code> realm, before finally
obtaining credentials for use with the <code
class="literal">D.EXAMPLE.COM</code> realm.
</div><div class="note"><h2>Note</h2><div
class="para">
Without a capath entry indicating otherwise, Kerberos assumes that cross-realm trust
relationships form a hierarchy.
</div><div class="para">
Clients in the <code class="literal">A.EXAMPLE.COM</code> realm
can obtain cross-realm credentials from <code
class="literal">B.EXAMPLE.COM</code> realm directly. Without the
"." indicating this, the client would instead attempt to use a hierarchical
path, in this case:
</div><div
class="literallayout"><p> A.EXAMPLE.COM → EXAMPLE.COM → B.EXAMPLE.COM<br/>
</p></div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html"><strong>Prev</strong>2.6.8. Setting
Up Secondary KDCs</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Additional_Resources.html"><strong>Next</strong>2.6.10. Additional
Resources</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Up Secondary KDCs</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos"/><link rel="prev"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"
title="2.6.7. Domain-to-Realm Mapping"/><link rel="next"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"
title="2.6.9. Setting Up Cross Realm
Authentication"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation Sit
e"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-Setting_Up_Secondary_KDCs">2.6.8. Setting Up
Secondary KDCs</h3></div></div></div><div
class="para">
For a number of reasons, you may choose to run multiple KDCs for a given realm. In this
scenario, one KDC (the <span class="emphasis"><em>master
KDC</em></span>) keeps a writable copy of the realm database and runs <code
class="command">kadmind</code> (it is also your realm's <span
class="emphasis"><em>admin server</em></span>), and one or
more KDCs (<span class="emphasis"><em>slave
KDCs</em></span>) keep read-only copies of the database and run <code
class="command">kpropd</code>.
</div><div class="para">
The master-slave propagation procedure entails the master KDC dumping its database to a
temporary dump file and then transmitting that file to each of its slaves, which then
overwrite their previously-received read-only copies of the database with the contents of
the dump file.
</div><div class="para">
To set up a slave KDC, first ensure that the master KDC's <code
class="filename">krb5.conf</code> and <code
class="filename">kdc.conf</code> files are copied to the slave KDC.
</div><div class="para">
Start <code class="command">kadmin.local</code> from a root shell
on the master KDC and use its <code
class="command">add_principal</code> command to create a new entry for
the master KDC's <span
class="emphasis"><em>host</em></span> service, and then use
its <code class="command">ktadd</code> command to simultaneously set
a random key for the service and store the random key in the master's default keytab
file. This key will be used by the <code
class="command">kprop</code> command to authenticate to the slave
servers. You will only need to do this once, regardless of how many slave servers you
install.
</div><div class="literallayout"><p> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>kadmin.local -r EXAMPLE.COM</code></strong> Authenticating as principal root/admin(a)EXAMPLE.com with password. <code
class="prompt">kadmin:</code> <strong
class="userinput"><code>add_principal -randkey host/masterkdc.example.com</code></strong> Principal "host/host/masterkdc.example.com(a)EXAMPLE.com" created. <code
class="prompt">kadmin:</code> <strong
class="userinput"><code>ktadd host/masterkdc.example.com</code></strong> Entry for principal host/masterkdc.example.com with kvno 3, encryption type Triple DES cbc mode with \ HMAC/sha1 added to keytab WRFILE:/etc/krb5.keytab. Entry for principal host/masterkdc.example.com with kvno 3, encryption type ArcFour with HMAC/md5 \ added to keytab WRFILE:/etc/krb5.keytab. Entry for principal host/masterkdc.example.com with kvno 3, encryption ty
pe DES with HMAC/sha1 added \ to keytab WRFILE:/etc/krb5.keytab. Entry for principal host/masterkdc.example.com with kvno 3, encryption type DES cbc mode with RSA-MD5 \ added to keytab WRFILE:/etc/krb5.keytab. <code
class="prompt">kadmin:</code> <strong
class="userinput"><code>quit</code></strong></code><br/>
</p></div><div class="para">
Start <code class="command">kadmin</code> from a root shell on
the slave KDC and use its <code class="command">add_principal</code>
command to create a new entry for the slave KDC's <span
class="emphasis"><em>host</em></span> service, and then use
<code class="command">kadmin</code>'s <code
class="command">ktadd</code> command to simultaneously set a random key
for the service and store the random key in the slave's default keytab file. This key
is used by the <code class="command">kpropd</code> service when
authenticating clients.
</div><div class="literallayout"><p> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>kadmin -p jimbo/admin@EXAMPLE.COM -r EXAMPLE.COM</code></strong> Authenticating as principal jimbo/admin(a)EXAMPLE.com with password. <code
class="prompt">Password for jimbo/admin@EXAMPLE.COM: </code><code
class="prompt">kadmin:</code> <strong
class="userinput"><code>add_principal -randkey host/slavekdc.example.com</code></strong> Principal "host/slavekdc.example.com(a)EXAMPLE.com" created. <code
class="prompt">kadmin:</code> <strong
class="userinput"><code>ktadd host/slavekdc.example.com@EXAMPLE.COM</code></strong> Entry for principal host/slavekdc.example.com with kvno 3, encryption type Triple DES cbc mode with \ HMAC/sha1 added to keytab WRFILE:/etc/krb5.keytab. Entry for principal host/slavekdc.example.com with kvno 3, encryption type ArcFour with HMAC/md5 added \ to keytab WRFILE:/etc/
krb5.keytab. Entry for principal host/slavekdc.example.com with kvno 3, encryption type DES with HMAC/sha1 added \ to keytab WRFILE:/etc/krb5.keytab. Entry for principal host/slavekdc.example.com with kvno 3, encryption type DES cbc mode with RSA-MD5 added \ to keytab WRFILE:/etc/krb5.keytab. <code
class="prompt">kadmin:</code> <strong
class="userinput"><code>quit</code></strong></code><br/>
</p></div><div class="para">
With its service key, the slave KDC could authenticate any client which would connect
to it. Obviously, not all of them should be allowed to provide the slave's <code
class="command">kprop</code> service with a new realm database. To
restrict access, the <code class="command">kprop</code> service on
the slave KDC will only accept updates from clients whose principal names are listed in
<code class="filename">/var/kerberos/krb5kdc/kpropd.acl</code>. Add
the master KDC's host service's name to that file.
</div><div class="literallayout"><p> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>echo host/masterkdc.example.com(a)EXAMPLE.com &gt; /var/kerberos/krb5kdc/kpropd.acl</code></strong></code><br/>
</p></div><div class="para">
Once the slave KDC has obtained a copy of the database, it will also need the master
key which was used to encrypt it. If your KDC database's master key is stored in a
<span class="emphasis"><em>stash</em></span> file on the
master KDC (typically named <code
class="filename">/var/kerberos/krb5kdc/.k5.REALM</code>, either copy it
to the slave KDC using any available secure method, or create a dummy database and
identical stash file on the slave KDC by running <code
class="command">kdb5_util create -s</code> (the dummy database will be
overwritten by the first successful database propagation) and supplying the same
password.
</div><div class="para">
Ensure that the slave KDC's firewall allows the master KDC to contact it using TCP
on port 754 (<span
class="emphasis"><em>krb5_prop</em></span>), and start the
<code class="command">kprop</code> service. Then, double-check that
the <code class="command">kadmin</code> service is <span
class="emphasis"><em>disabled</em></span>.
</div><div class="para">
Now perform a manual database propagation test by dumping the realm database, on the
master KDC, to the default data file which the <code
class="command">kprop</code> command will read (<code
class="filename">/var/kerberos/krb5kdc/slave_datatrans</code>), and
then use the <code class="command">kprop</code> command to transmit
its contents to the slave KDC.
</div><div class="literallayout"><p> <code
class="computeroutput"><code
class="prompt">#</code> <strong
class="userinput"><code>/usr/kerberos/sbin/kdb5_util dump /var/kerberos/krb5kdc/slave_datatrans</code></strong><code
class="prompt">#</code> <strong
class="userinput"><code>kprop slavekdc.example.com</code></strong></code><br/>
</p></div><div class="para">
Using <code class="command">kinit</code>, verify that a client
system whose <code class="filename">krb5.conf</code> lists only the
slave KDC in its list of KDCs for your realm is now correctly able to obtain initial
credentials from the slave KDC.
</div><div class="para">
That done, simply create a script which dumps the realm database and runs the <code
class="command">kprop</code> command to transmit the database to each
slave KDC in turn, and configure the <code
class="command">cron</code> service to run the script periodically.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Kerberos-Domain_to_Realm_Mapping.html"><strong>Prev</strong>2.6.7. Domain-to-Realm
Mapping</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Setting_Up_Cross_Realm_Authentication.html"><strong>Next</strong>2.6.9. Setting
Up Cross Realm Authentication</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Kerberos.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"
title="2.5.5.3. Related Books"/><link rel="next"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"
title="2.6.2. Kerberos Terminology"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="doc
nav"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Kerberos">2.6. Kerberos</h2></div></div></div><a
id="d0e9180" class="indexterm"/><div class="para">
System security and integrity within a network can be unwieldy. It can occupy the time
of several administrators just to keep track of what services are being run on a network
and the manner in which these services are used.
</div><div class="para">
Further, authenticating users to network services can prove dangerous when the method
used by the protocol is inherently insecure, as evidenced by the transfer of unencrypted
passwords over a network using the traditional FTP and Telnet protocols.
</div><div class="para">
Kerberos is a way to eliminate the need for protocols that allow unsafe methods of
authentication, thereby enhancing overall network security.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Kerberos-What_is_Kerberos">2.6.1. What is
Kerberos?</h3></div></div></div><div
class="para">
Kerberos is a network authentication protocol created by MIT, and uses symmetric-key
cryptography<sup>[<a id="d0e9196" href="#ftn.d0e9196"
class="footnote">8</a>]</sup> to authenticate users to network
services, which means passwords are never actually sent over the network.
</div><div class="para">
Consequently, when users authenticate to network services using Kerberos, unauthorized
users attempting to gather passwords by monitoring network traffic are effectively
thwarted.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-What_is_Kerberos-Advantages_of_Kerberos">2.6.1.1. Advantages
of Kerberos</h4></div></div></div><a id="d0e9205"
class="indexterm"/><div class="para">
Most conventional network services use password-based authentication schemes. Such
schemes require a user to authenticate to a given network server by supplying their
username and password. Unfortunately, the transmission of authentication information for
many services is unencrypted. For such a scheme to be secure, the network has to be
inaccessible to outsiders, and all computers and users on the network must be trusted and
trustworthy.
</div><div class="para">
Even if this is the case, a network that is connected to the Internet can no longer be
assumed to be secure. Any attacker who gains access to the network can use a simple packet
analyzer, also known as a packet sniffer, to intercept usernames and passwords,
compromising user accounts and the integrity of the entire security infrastructure.
</div><div class="para">
The primary design goal of Kerberos is to eliminate the transmission of unencrypted
passwords across the network. If used properly, Kerberos effectively eliminates the threat
that packet sniffers would otherwise pose on a network.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-What_is_Kerberos-Disadvantages_of_Kerberos">2.6.1.2. Disadvantages
of Kerberos</h4></div></div></div><a id="d0e9219"
class="indexterm"/><div class="para">
Although Kerberos removes a common and severe security threat, it may be difficult to
implement for a variety of reasons:
</div><div class="itemizedlist"><ul><li><div
class="para">
Migrating user passwords from a standard UNIX password database, such as <code
class="filename">/etc/passwd</code> or <code
class="filename">/etc/shadow</code>, to a Kerberos password database
can be tedious, as there is no automated mechanism to perform this task. Refer to Question
2.23 in the online Kerberos FAQ:
</div><div class="para">
<a
href="http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html#pwco...
http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html</a>
</div></li><li><div class="para">
Kerberos has only partial compatibility with the Pluggable Authentication Modules
(PAM) system used by most Fedora servers. Refer to <a class="xref"
href="sect-Security_Guide-Kerberos-Kerberos_and_PAM.html"
title="2.6.4. Kerberos and PAM">Section 2.6.4, “Kerberos and PAM”</a>
for more information about this issue.
</div></li><li><div class="para">
Kerberos assumes that each user is trusted but is using an untrusted host on an
untrusted network. Its primary goal is to prevent unencrypted passwords from being
transmitted across that network. However, if anyone other than the proper user has access
to the one host that issues tickets used for authentication — called the <em
class="firstterm">key distribution center</em> (<em
class="firstterm">KDC</em>) — the entire Kerberos authentication system
is at risk.
</div></li><li><div class="para">
For an application to use Kerberos, its source must be modified to make the
appropriate calls into the Kerberos libraries. Applications modified in this way are
considered to be <em class="firstterm">Kerberos-aware</em>, or
<em class="firstterm">kerberized</em>. For some applications, this
can be quite problematic due to the size of the application or its design. For other
incompatible applications, changes must be made to the way in which the server and client
communicate. Again, this may require extensive programming. Closed-source applications
that do not have Kerberos support by default are often the most problematic.
</div></li><li><div class="para">
Kerberos is an all-or-nothing solution. If Kerberos is used on the network, any
unencrypted passwords transferred to a non-Kerberos aware service is at risk. Thus, the
network gains no benefit from the use of Kerberos. To secure a network with Kerberos, one
must either use Kerberos-aware versions of <span
class="emphasis"><em>all</em></span> client/server
applications that transmit passwords unencrypted, or not use <span
class="emphasis"><em>any</em></span> such client/server
applications at all.
</div></li></ul></div></div></div><div
class="footnotes"><br/><hr/><div
class="footnote"><p><sup>[<a id="ftn.d0e9196"
href="#d0e9196" class="para">8</a>] </sup>
A system where both the client and the server share a common key that is used to
encrypt and decrypt network communication.
</p></div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Related_Books.html"><strong>Prev</strong>2.5.5.3. Related
Books</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Kerberos-Kerberos_Terminology.html"><strong>Next</strong>2.6.2. Kerberos
Terminology</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... of
Interest</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/><link rel="prev"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"
title="3.7.4. What you have just accomplished."/><link
rel="next"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"
title="3.8. 7-Zip Encrypted Archives"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Con
tent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest">3.7.5. Links
of Interest</h3></div></div></div><div
class="para">
For additional information on LUKS or encrypting hard drives under Fedora please visit
one of the following links:
</div><div class="itemizedlist"><ul><li><div
class="para">
<a
href="http://luks.endorphin.org/">LUKS - Linux Unified Key
Setup</a>
</div></li><li><div class="para">
<a
href="https://bugzilla.redhat.com/attachment.cgi?id=161912">...:
Creating an encrypted Physical Volume (PV) using a second hard drive, pvmove, and a Fedora
LiveCD</a>
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"><strong>Prev</strong>3.7.4. What
you have just accomplished.</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Encryption-7_Zip_Encrypted_Archives.html"><strong>Next</strong>3.8. 7-Zip
Encrypted Archives</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Instructions</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/><link rel="prev"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"
title="3.7.2. Manually Encrypting Directories"/><link rel="next"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"
title="3.7.4. What you have just
accomplished."/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fedor
aproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions">3.7.3. Step-by-Step
Instructions</h3></div></div></div><div
class="orderedlist"><ol><li><div class="para">
enter runlevel 1: <code class="code">telinit 1</code>
</div></li><li><div class="para">
unmount your existing /home: <code class="code"> umount
/home</code>
</div></li><li><div class="para">
if it fails use <code class="code">fuser</code> to find and
kill processes hogging /home: <code class="code">fuser -mvk
/home</code>
</div></li><li><div class="para">
verify /home is not mounted any longer: <code class="code">cat
/proc/mounts | grep home</code>
</div></li><li><div class="para">
Fill your partition with random data: <code class="code">dd
if=/dev/urandom of=/dev/VG00/LV_home</code> This process takes many hours to
complete.
</div><div
class="important"><h2>Important</h2><div
class="para">
The process, however, is imperative in order to have good protection against
break-in attempts. Just let it run overnight.
</div></div></li><li><div class="para">
initialize your partition: <code class="code">cryptsetup --verbose
--verify-passphrase luksFormat /dev/VG00/LV_home</code>
</div></li><li><div class="para">
open the newly encrypted device: <code class="code">cryptsetup
luksOpen /dev/VG00/LV_home home</code>
</div></li><li><div class="para">
check it's there: <code class="code">ls -l /dev/mapper | grep
home</code>
</div></li><li><div class="para">
create a filesystem: <code class="code">mkfs.ext3
/dev/mapper/home</code>
</div></li><li><div class="para">
mount it: <code class="code">mount /dev/mapper/home
/home</code>
</div></li><li><div class="para">
check it's visible: <code class="code">df -h | grep
home</code>
</div></li><li><div class="para">
add the following to /etc/crypttab: <code class="code">home
/dev/VG00/LV_home none</code>
</div></li><li><div class="para">
edit your /etc/fstab, removing the old entry for /home and adding <code
class="code">/dev/mapper/home /home ext3 defaults 1 2</code>
</div></li><li><div class="para">
verify your fstab entry: <code class="code">mount /home</code>
</div></li><li><div class="para">
restore default SELinux security contexts: <code
class="code">/sbin/restorecon -v -R /home</code>
</div></li><li><div class="para">
reboot: <code class="code">shutdown -r now</code>
</div></li><li><div class="para">
The entry in /etc/crypttab makes your computer ask your <code
class="code">luks</code> passphrase on boot
</div></li><li><div class="para">
Login as root and restore your backup
</div></li></ol></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"><strong>Prev</strong>3.7.2. Manually
Encrypting Directories</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html"><strong>Next</strong>3.7.4. What
you have just accomplished.</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... you
have just accomplished.</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/><link rel="prev"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"
title="3.7.3. Step-by-Step Instructions"/><link rel="next"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"
title="3.7.5. Links of Interest"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Con
tent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-What_you_have_just_accomplished">3.7.4. What
you have just accomplished.</h3></div></div></div><div
class="para">
Congratulations, you now have an encrypted partition for all of your data to safely
rest while the computer is off.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"><strong>Prev</strong>3.7.3. Step-by-Step
Instructions</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Links_of_Interest.html"><strong>Next</strong>3.7.5. Links
of Interest</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Encrypting Directories</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/><link rel="prev"
href="sect-Security_Guide-LUKS_Disk_Encryption.html" title="3.7. LUKS Disk
Encryption"/><link rel="next"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"
title="3.7.3. Step-by-Step Instructions"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_
right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories">3.7.2. Manually
Encrypting Directories</h3></div></div></div><div
class="warning"><h2>Warning</h2><div
class="para">
Following this procedure will remove all data on the partition that you are
encrypting. You WILL lose all your information! Make sure you backup your data to an
external source before beginning this procedure!
</div></div><div class="para">
If you are running a version of Fedora prior to Fedora 9 and want to encrypt a
partition, or you want to encrypt a partition after the installation of the current
version of Fedora, the following directions are for you. The below example demonstrates
encrypting your /home partition but any partition can be used.
</div><div class="para">
The following procedure will wipe all your existing data, so be sure to have a tested
backup before you start. This also requires you to have a separate partition for /home (in
my case that is /dev/VG00/LV_home). All the following must be done as root. Any of these
steps failing means you must not continue until the step succeeded.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-LUKS_Disk_Encryption.html"><strong>Prev</strong>3.7. LUKS
Disk Encryption</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories-Step_by_Step_Instructions.html"><strong>Next</strong>3.7.3. Step-by-Step
Instructions</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-LUKS_Disk_Encryption.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... Disk
Encryption</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Encryption.html"
title="Chapter 3. Encryption"/><link rel="prev"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"
title="3.6. Secure Shell"/><link rel="next"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"
title="3.7.2. Manually Encrypting
Directories"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a>
</p><ul class="docnav"><li class="previous"><a
accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption">3.7. LUKS Disk
Encryption</h2></div></div></div><div
class="para">
Linux Unified Key Setup-on-disk-format (or LUKS) allows you to encrypt partitions on
your Linux computer. This is particularly important when it comes to mobile computers and
removable media. LUKS allows multiple user keys to decrypt a master key which is used for
the bulk encryption of the partition.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-LUKS_Disk_Encryption-LUKS_Implementation_in_Fedora">3.7.1. LUKS
Implementation in Fedora</h3></div></div></div><div
class="para">
Fedora 9, and later, utilizes LUKS to perform file system encryption. By default, the
option to encrypt the file system is unchecked during the installation. If you select the
option to encrypt you hard drive, you will be prompted for a passphrase that will be asked
every time you boot the computer. This passphrase "unlocks" the bulk encryption
key that is used to decrypt your partition. If you choose to modify the default partition
table you can choose which partitions you want to encrypt. This is set in the partition
table settings
</div><div class="para">
Fedora 9's default implementation of LUKS is AES 128 with a SHA256 hashing. Ciphers
that are available are:
</div><div class="itemizedlist"><ul><li><div
class="para">
AES - Advanced Encryption Standard - <a
href="http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf&qu... PUB
197</a>
</div></li><li><div class="para">
Twofish (A 128-bit Block Cipher)
</div></li><li><div class="para">
Serpent
</div></li><li><div class="para">
cast5 - RFC 2144
</div></li><li><div class="para">
cast6 - RFC 2612
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="Security_Guide-Encryption-Data_in_Motion-Secure_Shell.html"><strong>Prev</strong>3.6. Secure
Shell</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-LUKS_Disk_Encryption-Manually_Encrypting_Directories.html"><strong>Next</strong>3.7.2. Manually
Encrypting Directories</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Option_Fields-Access_Control.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Control</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields"/><link rel="prev"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields"/><link rel="next"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"
title="2.5.2.2.3. Shell Commands"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Document
ation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Option_Fields-Access_Control">2.5.2.2.2. Access
Control</h5></div></div></div><a id="d0e7930"
class="indexterm"/><div class="para">
Option fields also allow administrators to explicitly allow or deny hosts in a single
rule by adding the <code class="option">allow</code> or <code
class="option">deny</code> directive as the final option.
</div><div class="para">
For example, the following two rules allow SSH connections from <code
class="systemitem">client-1.example.com</code>, but deny connections
from <code class="systemitem">client-2.example.com</code>:
</div><pre class="screen">sshd :
client-1.example.com : allow
sshd :
client-2.example.com : deny
</pre><div class="para">
By allowing access control on a per-rule basis, the option field allows
administrators to consolidate all access rules into a single file: either <code
class="filename">hosts.allow</code> or <code
class="filename">hosts.deny</code>. Some administrators consider this
an easier way of organizing access rules.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"><strong>Prev</strong>2.5.2.2. Option
Fields</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"><strong>Next</strong>2.5.2.2.3. Shell
Commands</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Option_Fields-Expansions.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields"/><link rel="prev"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"
title="2.5.2.2.3. Shell Commands"/><link rel="next"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"
title="2.5.3. xinetd"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul clas
s="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Option_Fields-Expansions">2.5.2.2.4. Expansions</h5></div></div></div><a
id="d0e8040" class="indexterm"/><div class="para">
Expansions, when used in conjunction with the <code
class="command">spawn</code> and <code
class="command">twist</code> directives, provide information about the
client, server, and processes involved.
</div><div class="para">
The following is a list of supported expansions:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">%a</code> — Returns the client's IP
address.
</div></li><li><div class="para">
<code class="option">%A</code> — Returns the server's IP
address.
</div></li><li><div class="para">
<code class="option">%c</code> — Returns a variety of client
information, such as the username and hostname, or the username and IP address.
</div></li><li><div class="para">
<code class="option">%d</code> — Returns the daemon process
name.
</div></li><li><div class="para">
<code class="option">%h</code> — Returns the client's
hostname (or IP address, if the hostname is unavailable).
</div></li><li><div class="para">
<code class="option">%H</code> — Returns the server's
hostname (or IP address, if the hostname is unavailable).
</div></li><li><div class="para">
<code class="option">%n</code> — Returns the client's
hostname. If unavailable, <code
class="computeroutput">unknown</code> is printed. If the client's
hostname and host address do not match, <code
class="computeroutput">paranoid</code> is printed.
</div></li><li><div class="para">
<code class="option">%N</code> — Returns the server's
hostname. If unavailable, <code
class="computeroutput">unknown</code> is printed. If the server's
hostname and host address do not match, <code
class="computeroutput">paranoid</code> is printed.
</div></li><li><div class="para">
<code class="option">%p</code> — Returns the daemon's
process ID.
</div></li><li><div class="para">
<code class="option">%s</code> —Returns various types of
server information, such as the daemon process and the host or IP address of the server.
</div></li><li><div class="para">
<code class="option">%u</code> — Returns the client's
username. If unavailable, <code
class="computeroutput">unknown</code> is printed.
</div></li></ul></div><div class="para">
The following sample rule uses an expansion in conjunction with the <code
class="command">spawn</code> command to identify the client host in a
customized log file.
</div><div class="para">
When connections to the SSH daemon (<code
class="systemitem">sshd</code>) are attempted from a host in the
<code class="systemitem">example.com</code> domain, execute the
<code class="command">echo</code> command to log the attempt,
including the client hostname (by using the <code
class="option">%h</code> expansion), to a special file:
</div><pre class="screen">sshd : .example.com \
: spawn /bin/echo `/bin/date` access denied to %h>>/var/log/sshd.log \
: deny
</pre><div class="para">
Similarly, expansions can be used to personalize messages back to the client. In the
following example, clients attempting to access FTP services from the <code
class="systemitem">example.com</code> domain are informed that they
have been banned from the server:
</div><pre class="screen">vsftpd : .example.com \
: twist /bin/echo "421 %h has been banned from this server!"
</pre><div class="para">
For a full explanation of available expansions, as well as additional access control
options, refer to section 5 of the man pages for <code
class="filename">hosts_access</code> (<code
class="command">man 5 hosts_access</code>) and the man page for
<code class="filename">hosts_options</code>.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html"
title="2.5.5. Additional Resources">Section 2.5.5, “Additional
Resources”</a> for more information about TCP Wrappers.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Option_Fields-Shell_Commands.html"><strong>Prev</strong>2.5.2.2.3. Shell
Commands</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"><strong>Next</strong>2.5.3. xinetd</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Option_Fields-Shell_Commands.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Commands</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields"/><link rel="prev"
href="sect-Security_Guide-Option_Fields-Access_Control.html"
title="2.5.2.2.2. Access Control"/><link rel="next"
href="sect-Security_Guide-Option_Fields-Expansions.html"
title="2.5.2.2.4. Expansions"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><u
l class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Option_Fields-Access_Control.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Expansions.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Option_Fields-Shell_Commands">2.5.2.2.3. Shell
Commands</h5></div></div></div><a id="d0e7966"
class="indexterm"/><a id="d0e7973"
class="indexterm"/><a id="d0e7982"
class="indexterm"/><div class="para">
Option fields allow access rules to launch shell commands through the following two
directives:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">spawn</code> — Launches a shell command
as a child process. This directive can perform tasks like using <code
class="command">/usr/sbin/safe_finger</code> to get more information
about the requesting client or create special log files using the <code
class="command">echo</code> command.
</div><div class="para">
In the following example, clients attempting to access Telnet services from the
<code class="systemitem">example.com</code> domain are quietly
logged to a special file:
</div><pre class="screen">in.telnetd : .example.com \
: spawn /bin/echo `/bin/date` from %h>>/var/log/telnet.log \
: allow
</pre></li><li><div class="para">
<code class="command">twist</code> — Replaces the requested
service with the specified command. This directive is often used to set up traps for
intruders (also called "honey pots"). It can also be used to send messages to
connecting clients. The <code class="command">twist</code> directive
must occur at the end of the rule line.
</div><div class="para">
In the following example, clients attempting to access FTP services from the
<code class="systemitem">example.com</code> domain are sent a
message using the <code class="command">echo</code> command:
</div><pre class="screen">vsftpd : .example.com \
: twist /bin/echo "421 This domain has been black-listed. Access denied!"
</pre></li></ul></div><div class="para">
For more information about shell command options, refer to the <code
class="filename">hosts_options</code> man page.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Option_Fields-Access_Control.html"><strong>Prev</strong>2.5.2.2.2. Access
Control</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Expansions.html"><strong>Next</strong>2.5.2.2.4. Expansions</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Flag</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format"/><link rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format"/><link rel="next"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"
title="2.4.3.3. Module Name"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fedorapro
ject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag">2.4.3.2. Control
Flag</h4></div></div></div><a id="d0e6266"
class="indexterm"/><div class="para">
All PAM modules generate a success or failure result when called. Control flags tell
PAM what do with the result. Modules can be stacked in a particular order, and the control
flags determine how important the success or failure of a particular module is to the
overall goal of authenticating the user to the service.
</div><div class="para">
There are four predefined control flags:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">required</code> — The module result must
be successful for authentication to continue. If the test fails at this point, the user is
not notified until the results of all module tests that reference that interface are
complete.
</div></li><li><div class="para">
<code class="command">requisite</code> — The module result
must be successful for authentication to continue. However, if a test fails at this point,
the user is notified immediately with a message reflecting the first failed <code
class="command">required</code> <span
class="emphasis"><em>or</em></span> <code
class="command">requisite</code> module test.
</div></li><li><div class="para">
<code class="command">sufficient</code> — The module result is
ignored if it fails. However, if the result of a module flagged <code
class="command">sufficient</code> is successful <span
class="emphasis"><em>and</em></span> no previous modules
flagged <code class="command">required</code> have failed, then no
other results are required and the user is authenticated to the service.
</div></li><li><div class="para">
<code class="command">optional</code> — The module result is
ignored. A module flagged as <code class="command">optional</code>
only becomes necessary for successful authentication when no other modules reference the
interface.
</div></li></ul></div><div
class="important"><h2>Important</h2><div
class="para">
The order in which <code class="command">required</code>
modules are called is not critical. Only the <code
class="command">sufficient</code> and <code
class="command">requisite</code> control flags cause order to become
important.
</div></div><div class="para">
A newer control flag syntax that allows for more precise control is now available for
PAM.
</div><div class="para">
The <code class="command">pam.d</code> man page, and the PAM
documentation, located in the <code
class="filename">/usr/share/doc/pam-<em
class="replaceable"><code><version-number></code></em>/</code>
directory, where <em
class="replaceable"><code><version-number></code></em>
is the version number for PAM on your system, describe this newer syntax in detail.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"><strong>Prev</strong>2.4.3. PAM
Configuration File Format</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"><strong>Next</strong>2.4.3.3. Module
Name</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Arguments</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format"/><link rel="prev"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"
title="2.4.3.3. Module Name"/><link rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"
title="2.4.4. Sample PAM Configuration Files"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fed
oraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments">2.4.3.4. Module
Arguments</h4></div></div></div><a id="d0e6375"
class="indexterm"/><div class="para">
PAM uses <em class="firstterm">arguments</em> to pass
information to a pluggable module during authentication for some modules.
</div><div class="para">
For example, the <code class="filename">pam_userdb.so</code>
module uses information stored in a Berkeley DB file to authenticate the user. Berkeley DB
is an open source database system embedded in many applications. The module takes a
<code class="filename">db</code> argument so that Berkeley DB knows
which database to use for the requested service.
</div><div class="para">
The following is a typical <code
class="filename">pam_userdb.so</code> line in a PAM configuration. The
<em
class="replaceable"><code><path-to-file></code></em>
is the full path to the Berkeley DB database file:
</div><pre class="screen">auth required pam_userdb.so db=<em
class="replaceable"><code><path-to-file></code></em>
</pre><div class="para">
Invalid arguments are <span
class="emphasis"><em>generally</em></span> ignored and do
not otherwise affect the success or failure of the PAM module. Some modules, however, may
fail on invalid arguments. Most modules report errors to the <code
class="filename">/var/log/secure</code> file.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html"><strong>Prev</strong>2.4.3.3. Module
Name</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"><strong>Next</strong>2.4.4. Sample
PAM Configuration Files</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-PAM_Configuration_File_Format-Module_Name.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Name</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format"/><link rel="prev"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"
title="2.4.3.2. Control Flag"/><link rel="next"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"
title="2.4.3.4. Module Arguments"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Con
tent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_Configuration_File_Format-Module_Name">2.4.3.3. Module
Name</h4></div></div></div><a id="d0e6354"
class="indexterm"/><div class="para">
The module name provides PAM with the name of the pluggable module containing the
specified module interface. In older versions of Fedora, the full path to the module was
provided in the PAM configuration file. However, since the advent of <em
class="firstterm">multilib</em> systems, which store 64-bit PAM modules
in the <code class="filename">/lib64/security/</code> directory, the
directory name is omitted because the application is linked to the appropriate version of
<code class="filename">libpam</code>, which can locate the correct
version of the module.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"><strong>Prev</strong>2.4.3.2. Control
Flag</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"><strong>Next</strong>2.4.3.4. Module
Arguments</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
pam_timestamp Directives</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"
title="2.4.6. PAM and Administrative Credential Caching"/><link
rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"
title="2.4.6. PAM and Administrative Credential Caching"/><link
rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"
title="2.4.7. PAM and Device Ownership"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img src="Common_C
ontent/images/image_left.png" alt="Product Site"/></a><a
class="right" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives">2.4.6.2. Common
pam_timestamp Directives</h4></div></div></div><a
id="d0e6774" class="indexterm"/><div class="para">
The <code class="filename">pam_timestamp.so</code> module
accepts several directives. The following are the two most commonly used options:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">timestamp_timeout</code> — Specifies the
period (in seconds) for which the timestamp file is valid. The default value is 300 (five
minutes).
</div></li><li><div class="para">
<code class="command">timestampdir</code> — Specifies the
directory in which the timestamp file is stored. The default value is <code
class="command">/var/run/sudo/</code>.
</div></li></ul></div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Firewalls-Additional_Resources.html#sect-Security_Guide-Additional_Resources-Installed_Firewall_Documentation"
title="2.8.9.1. Installed Firewall Documentation">Section 2.8.9.1, “Installed
Firewall Documentation”</a> for more information about controlling the <code
class="filename">pam_timestamp.so</code> module.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"><strong>Prev</strong>2.4.6. PAM
and Administrative Credential Caching</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"><strong>Next</strong>2.4.7. PAM
and Device Ownership</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Access</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"
title="2.4.7. PAM and Device Ownership"/><link rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"
title="2.4.7. PAM and Device Ownership"/><link rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"
title="2.4.8. Additional Resources"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.
fedoraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access">2.4.7.2. Application
Access</h4></div></div></div><div class="para">
The console user also has access to certain programs configured for use in the
<code class="filename">/etc/security/console.apps/</code>
directory.
</div><div class="para">
This directory contains configuration files which enable the console user to run
certain applications in <code class="filename">/sbin</code> and
<code class="filename">/usr/sbin</code>.
</div><div class="para">
These configuration files have the same name as the applications that they set up.
</div><div class="para">
One notable group of applications that the console user has access to are three
programs that shut down or reboot the system:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">/sbin/halt</code>
</div></li><li><div class="para">
<code class="command">/sbin/reboot</code>
</div></li><li><div class="para">
<code class="command">/sbin/poweroff</code>
</div></li></ul></div><div class="para">
Because these are PAM-aware applications, they call the <code
class="filename">pam_console.so</code> module as a requirement for
use.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Firewalls-Additional_Resources.html#sect-Security_Guide-Additional_Resources-Installed_Firewall_Documentation"
title="2.8.9.1. Installed Firewall Documentation">Section 2.8.9.1, “Installed
Firewall Documentation”</a> for more information.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html"><strong>Prev</strong>2.4.7. PAM
and Device Ownership</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html"><strong>Next</strong>2.4.8. Additional
Resources</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Resources</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"
title="2.4.7.2. Application Access"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"
title="2.4.8.2. Useful PAM Websites"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/
image_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Additional_Resources">2.4.8. Additional
Resources</h3></div></div></div><a id="d0e7004"
class="indexterm"/><div class="para">
The following resources further explain methods to use and configure PAM. In addition
to these resources, read the PAM configuration files on the system to better understand
how they are structured.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Installed_PAM_Documentation">2.4.8.1. Installed
PAM Documentation</h4></div></div></div><a
id="d0e7014" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
PAM-related man pages — Several man pages exist for the various applications and
configuration files involved with PAM. The following is a list of some of the more
important man pages.
</div><div class="variablelist"><dl><dt><span
class="term">Configuration Files</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">pam</code> — Good introductory
information on PAM, including the structure and purpose of the PAM configuration files.
</div><div class="para">
Note that this man page discusses both <code
class="filename">/etc/pam.conf</code> and individual configuration
files in the <code class="filename">/etc/pam.d/</code> directory. By
default, Fedora uses the individual configuration files in the <code
class="filename">/etc/pam.d/</code> directory, ignoring <code
class="filename">/etc/pam.conf</code> even if it exists.
</div></li><li><div class="para">
<code class="command">pam_console</code> — Describes the
purpose of the <code class="filename">pam_console.so</code> module.
It also describes the appropriate syntax for an entry within a PAM configuration file.
</div></li><li><div class="para">
<code class="command">console.apps</code> — Describes the
format and options available in the <code
class="filename">/etc/security/console.apps</code> configuration file,
which defines which applications are accessible by the console user assigned by PAM.
</div></li><li><div class="para">
<code class="command">console.perms</code> — Describes
the format and options available in the <code
class="filename">/etc/security/console.perms</code> configuration file,
which specifies the console user permissions assigned by PAM.
</div></li><li><div class="para">
<code class="command">pam_timestamp</code> — Describes
the <code class="filename">pam_timestamp.so</code> module.
</div></li></ul></div></dd></dl></div></li><li><div
class="para">
<code class="filename">/usr/share/doc/pam-<em
class="replaceable"><code><version-number></code></em></code>
— Contains a <em class="citetitle">System Administrators'
Guide</em>, a <em class="citetitle">Module Writers'
Manual</em>, and the <em class="citetitle">Application
Developers' Manual</em>, as well as a copy of the PAM standard, DCE-RFC 86.0,
where <em
class="replaceable"><code><version-number></code></em>
is the version number of PAM.
</div></li><li><div class="para">
<code class="filename">/usr/share/doc/pam-<em
class="replaceable"><code><version-number></code></em>/txts/README.pam_timestamp</code>
— Contains information about the <code
class="filename">pam_timestamp.so</code> PAM module, where <em
class="replaceable"><code><version-number></code></em>
is the version number of PAM.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"><strong>Prev</strong>2.4.7.2. Application
Access</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"><strong>Next</strong>2.4.8.2. Useful
PAM Websites</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
PAM Modules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"
title="2.4.4. Sample PAM Configuration Files"/><link rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"
title="2.4.6. PAM and Administrative Credential
Caching"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product Site"
/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules">2.4.5. Creating
PAM Modules</h3></div></div></div><a id="d0e6602"
class="indexterm"/><div class="para">
You can create or add new PAM modules at any time for use by PAM-aware applications.
</div><div class="para">
For example, a developer might create a one-time-password creation method and write a
PAM module to support it. PAM-aware programs can immediately use the new module and
password method without being recompiled or otherwise modified.
</div><div class="para">
This allows developers and system administrators to mix-and-match, as well as test,
authentication methods for different programs without recompiling them.
</div><div class="para">
Documentation on writing modules is included in the <code
class="filename">/usr/share/doc/pam-<em
class="replaceable"><code><version-number></code></em>/</code>
directory, where <em
class="replaceable"><code><version-number></code></em>
is the version number for PAM on your system.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html"><strong>Prev</strong>2.4.4. Sample
PAM Configuration Files</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html"><strong>Next</strong>2.4.6. PAM
and Administrative Credential
Caching</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Configuration File Format</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"
title="2.4.2. PAM Configuration Files"/><link rel="next"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"
title="2.4.3.2. Control Flag"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src
="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format">2.4.3. PAM
Configuration File Format</h3></div></div></div><div
class="para">
Each PAM configuration file contains a group of directives formatted as follows:
</div><pre class="screen"><em
class="replaceable"><code><module
interface></code></em> <em
class="replaceable"><code><control
flag></code></em> <em
class="replaceable"><code><module
name></code></em> <em
class="replaceable"><code><module
arguments></code></em>
</pre><div class="para">
Each of these elements is explained in the following sections.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_Configuration_File_Format-Module_Interface">2.4.3.1. Module
Interface</h4></div></div></div><a id="d0e6130"
class="indexterm"/><a id="d0e6135"
class="indexterm"/><a id="d0e6142"
class="indexterm"/><div class="para">
Four types of PAM module interface are currently available. Each of these corresponds
to a different aspect of the authorization process:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">auth</code> — This module interface
authenticates use. For example, it requests and verifies the validity of a password.
Modules with this interface can also set credentials, such as group memberships or
Kerberos tickets.
</div></li><li><div class="para">
<code class="command">account</code> — This module interface
verifies that access is allowed. For example, it may check if a user account has expired
or if a user is allowed to log in at a particular time of day.
</div></li><li><div class="para">
<code class="command">password</code> — This module interface
is used for changing user passwords.
</div></li><li><div class="para">
<code class="command">session</code> — This module interface
configures and manages user sessions. Modules with this interface can also perform
additional tasks that are needed to allow access, like mounting a user's home
directory and making the user's mailbox available.
</div></li></ul></div><div
class="note"><h2>Note</h2><div class="para">
An individual module can provide any or all module interfaces. For instance, <code
class="filename">pam_unix.so</code> provides all four module
interfaces.
</div></div><div class="para">
In a PAM configuration file, the module interface is the first field defined. For
example, a typical line in a configuration may look like this:
</div><pre class="screen">auth required pam_unix.so
</pre><div class="para">
This instructs PAM to use the <code
class="filename">pam_unix.so</code> module's <code
class="command">auth</code> interface.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Module_Interface-Stacking_Module_Interfaces">2.4.3.1.1. Stacking
Module Interfaces</h5></div></div></div><a
id="d0e6199" class="indexterm"/><div class="para">
Module interface directives can be <span
class="emphasis"><em>stacked</em></span>, or placed upon
one another, so that multiple modules are used together for one purpose. If a module's
control flag uses the "sufficient" or "requisite" value (refer to
<a class="xref"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"
title="2.4.3.2. Control Flag">Section 2.4.3.2, “Control Flag”</a> for
more information on these flags), then the order in which the modules are listed is
important to the authentication process.
</div><div class="para">
Stacking makes it easy for an administrator to require specific conditions to exist
before allowing the user to authenticate. For example, the <code
class="command">reboot</code> command normally uses several stacked
modules, as seen in its PAM configuration file:
</div><pre class="screen">[root@MyServer ~]# cat
/etc/pam.d/reboot
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_console.so
#auth include system-auth
account required pam_permit.so
</pre><div class="itemizedlist"><ul><li><div
class="para">
The first line is a comment and is not processed.
</div></li><li><div class="para">
<code class="command">auth sufficient pam_rootok.so</code> —
This line uses the <code class="filename">pam_rootok.so</code>
module to check whether the current user is root, by verifying that their UID is 0. If
this test succeeds, no other modules are consulted and the command is executed. If this
test fails, the next module is consulted.
</div></li><li><div class="para">
<code class="command">auth required pam_console.so</code> —
This line uses the <code class="filename">pam_console.so</code>
module to attempt to authenticate the user. If this user is already logged in at the
console, <code class="filename">pam_console.so</code> checks whether
there is a file in the <code
class="filename">/etc/security/console.apps/</code> directory with the
same name as the service name (reboot). If such a file exists, authentication succeeds and
control is passed to the next module.
</div></li><li><div class="para">
<code class="command">#auth include system-auth</code> — This
line is commented and is not processed.
</div></li><li><div class="para">
<code class="command">account required pam_permit.so</code> —
This line uses the <code class="filename">pam_permit.so</code>
module to allow the root user or anyone logged in at the console to reboot the system.
</div></li></ul></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"><strong>Prev</strong>2.4.2. PAM
Configuration Files</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_Configuration_File_Format-Control_Flag.html"><strong>Next</strong>2.4.3.2. Control
Flag</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Configuration Files</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fedor
aproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files">2.4.2. PAM
Configuration Files</h3></div></div></div><a
id="d0e6037" class="indexterm"/><a id="d0e6043"
class="indexterm"/><a id="d0e6049"
class="indexterm"/><a id="d0e6055"
class="indexterm"/><a id="d0e6061"
class="indexterm"/><div class="para">
The <code class="filename">/etc/pam.d/</code> directory contains
the PAM configuration files for each PAM-aware application. In earlier versions of PAM,
the <code class="filename">/etc/pam.conf</code> file was used, but
this file is now deprecated and is only used if the <code
class="filename">/etc/pam.d/</code> directory does not exist.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_Configuration_Files-PAM_Service_Files">2.4.2.1. PAM
Service Files</h4></div></div></div><a id="d0e6080"
class="indexterm"/><div class="para">
Each PAM-aware application or <em class="firstterm">service</em>
has a file in the <code class="filename">/etc/pam.d/</code>
directory. Each file in this directory has the same name as the service to which it
controls access.
</div><div class="para">
The PAM-aware program is responsible for defining its service name and installing its
own PAM configuration file in the <code
class="filename">/etc/pam.d/</code> directory. For example, the
<code class="command">login</code> program defines its service name
as <code class="command">login</code> and installs the <code
class="filename">/etc/pam.d/login</code> PAM configuration file.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"><strong>Prev</strong>2.4. Pluggable
Authentication Modules (PAM)</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"><strong>Next</strong>2.4.3. PAM
Configuration File Format</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... and
Administrative Credential Caching</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"
title="2.4.5. Creating PAM Modules"/><link rel="next"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"
title="2.4.6.2. Common pam_timestamp
Directives"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a cla
ss="right" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Administrative_Credential_Caching">2.4.6. PAM
and Administrative Credential Caching</h3></div></div></div><a
id="d0e6629" class="indexterm"/><a id="d0e6637"
class="indexterm"/><a id="d0e6643"
class="indexterm"/><div class="para">
A number of graphical administrative tools in Fedora provide users with elevated
privileges for up to five minutes using the <code
class="filename">pam_timestamp.so</code> module. It is important to
understand how this mechanism works, because a user who walks away from a terminal while
<code class="filename">pam_timestamp.so</code> is in effect leaves
the machine open to manipulation by anyone with physical access to the console.
</div><div class="para">
In the PAM timestamp scheme, the graphical administrative application prompts the user
for the root password when it is launched. When the user has been authenticated, the
<code class="filename">pam_timestamp.so</code> module creates a
timestamp file. By default, this is created in the <code
class="filename">/var/run/sudo/</code> directory. If the timestamp file
already exists, graphical administrative programs do not prompt for a password. Instead,
the <code class="filename">pam_timestamp.so</code> module freshens
the timestamp file, reserving an extra five minutes of unchallenged administrative access
for the user.
</div><div class="para">
You can verify the actual state of the timestamp file by inspecting the <code
class="filename">/var/run/sudo/<user></code> file. For
the desktop, the relevant file is <code
class="filename">unknown:root</code>. If it is present and its
timestamp is less than five minutes old, the credentials are valid.
</div><div class="para">
The existence of the timestamp file is indicated by an authentication icon, which
appears in the notification area of the panel.
</div><div class="figure"
id="figu-Security_Guide-PAM_and_Administrative_Credential_Caching-The_Authentication_Icon"><div
class="figure-contents"><div class="mediaobject"><img
src="images/authicon.png" alt="The Authentication Icon"/><div
class="longdesc"><div class="para">
Illustration of the authentication icon.
</div></div></div></div><h6>Figure 2.7. The
Authentication Icon</h6></div><br
class="figure-break"/><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Removing_the_Timestamp_File">2.4.6.1. Removing
the Timestamp File</h4></div></div></div><a
id="d0e6690" class="indexterm"/><a id="d0e6698"
class="indexterm"/><a id="d0e6706"
class="indexterm"/><div class="para">
Before abandoning a console where a PAM timestamp is active, it is recommended that
the timestamp file be destroyed. To do this from a graphical environment, click the
authentication icon on the panel. This causes a dialog box to appear. Click the <span
class="guibutton"><strong>Forget
Authorization</strong></span> button to destroy the active timestamp file.
</div><div class="figure"
id="figu-Security_Guide-Removing_the_Timestamp_File-Dismiss_Authentication_Dialog"><div
class="figure-contents"><div class="mediaobject"><img
src="images/auth-panel.png" alt="Dismiss Authentication
Dialog"/><div class="longdesc"><div class="para">
Illustration of the authentication dismissal dialog box.
</div></div></div></div><h6>Figure 2.8. Dismiss
Authentication Dialog</h6></div><br
class="figure-break"/><div class="para">
You should be aware of the following with respect to the PAM timestamp file:
</div><div class="itemizedlist"><ul><li><div
class="para">
If logged in to the system remotely using <code
class="command">ssh</code>, use the <code
class="command">/sbin/pam_timestamp_check -k root</code> command to
destroy the timestamp file.
</div></li><li><div class="para">
You need to run the <code class="command">/sbin/pam_timestamp_check
-k root</code> command from the same terminal window from which you launched the
privileged application.
</div></li><li><div class="para">
You must be logged in as the user who originally invoked the <code
class="filename">pam_timestamp.so</code> module in order to use the
<code class="command">/sbin/pam_timestamp_check -k</code> command.
Do not log in as root to use this command.
</div></li><li><div class="para">
If you want to kill the credentials on the desktop (without using the <span
class="guibutton"><strong>Forget
Authorization</strong></span> action on the icon), use the following command:
</div><pre class="screen">/sbin/pam_timestamp_check -k root
</dev/null >/dev/null 2>/dev/null
</pre><div class="para">
Failure to use this command will only remove the credentials (if any) from the pty
where you run the command.
</div></li></ul></div><div class="para">
Refer to the <code class="filename">pam_timestamp_check</code>
man page for more information about destroying the timestamp file using <code
class="command">pam_timestamp_check</code>.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"><strong>Prev</strong>2.4.5. Creating
PAM Modules</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"><strong>Next</strong>2.4.6.2. Common
pam_timestamp Directives</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... and
Device Ownership</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"
title="2.4.6.2. Common pam_timestamp Directives"/><link
rel="next"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"
title="2.4.7.2. Application Access"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fe
doraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_and_Device_Ownership">2.4.7. PAM
and Device Ownership</h3></div></div></div><a
id="d0e6813" class="indexterm"/><a id="d0e6821"
class="indexterm"/><a id="d0e6827"
class="indexterm"/><div class="para">
In Fedora, the first user who logs in at the physical console of the machine can
manipulate certain devices and perform certain tasks normally reserved for the root user.
This is controlled by a PAM module called <code
class="filename">pam_console.so</code>.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-PAM_and_Device_Ownership-Device_Ownership">2.4.7.1. Device
Ownership</h4></div></div></div><div
class="para">
When a user logs in to a Fedora system, the <code
class="filename">pam_console.so</code> module is called by <code
class="command">login</code> or the graphical login programs, <span
class="application"><strong>gdm</strong></span>, <span
class="application"><strong>kdm</strong></span>, and
<span class="application"><strong>xdm</strong></span>.
If this user is the first user to log in at the physical console — referred to as the
<em class="firstterm">console user</em> — the module grants the user
ownership of a variety of devices normally owned by root. The console user owns these
devices until the last local session for that user ends. After this user has logged out,
ownership of the devices reverts back to the root user.
</div><div class="para">
The devices affected include, but are not limited to, sound cards, diskette drives,
and CD-ROM drives.
</div><div class="para">
This facility allows a local user to manipulate these devices without obtaining root
access, thus simplifying common tasks for the console user.
</div><div class="para">
You can modify the list of devices controlled by <code
class="filename">pam_console.so</code> by editing the following files:
<div class="itemizedlist"><ul><li><div
class="para">
<code class="filename">/etc/security/console.perms</code>
</div></li><li><div class="para">
<code
class="filename">/etc/security/console.perms.d/50-default.perms</code>
</div></li></ul></div>
</div><div class="para">
You can change the permissions of different devices than those listed in the above
files, or override the specified defaults. Rather than modify the <code
class="filename">50-default.perms</code> file, you should create a new
file (for example, <code class="filename"><em
class="replaceable"><code>xx</code></em>-name.perms</code>)
and enter the required modifications. The name of the new default file must begin with a
number higher than 50 (for example, <code
class="filename">51-default.perms</code>). This will override the
defaults in the <code class="filename">50-default.perms</code>
file.
</div><div class="warning"><h2>Warning</h2><div
class="para">
If the <span
class="application"><strong>gdm</strong></span>, <span
class="application"><strong>kdm</strong></span>, or
<span class="application"><strong>xdm</strong></span>
display manager configuration file has been altered to allow remote users to log in
<span class="emphasis"><em>and</em></span> the host is
configured to run at runlevel 5, it is advisable to change the <code
class="command"><console></code> and <code
class="command"><xconsole></code> directives in the
<code class="filename">/etc/security/console.perms</code> to the
following values:
</div><pre class="screen"><console>=tty[0-9][0-9]*
vc/[0-9][0-9]* :0\.[0-9] :0
<xconsole>=:0\.[0-9] :0
</pre><div class="para">
This prevents remote users from gaining access to devices and restricted applications
on the machine.
</div><div class="para">
If the <span
class="application"><strong>gdm</strong></span>, <span
class="application"><strong>kdm</strong></span>, or
<span class="application"><strong>xdm</strong></span>
display manager configuration file has been altered to allow remote users to log in
<span class="emphasis"><em>and</em></span> the host is
configured to run at any multiple user runlevel other than 5, it is advisable to remove
the <code class="command"><xconsole></code> directive
entirely and change the <code
class="command"><console></code> directive to the
following value:
</div><pre class="screen"><console>=tty[0-9][0-9]*
vc/[0-9][0-9]*
</pre></div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-PAM_and_Administrative_Credential_Caching-Common_pam_timestamp_Directives.html"><strong>Prev</strong>2.4.6.2. Common
pam_timestamp Directives</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-PAM_and_Device_Ownership-Application_Access.html"><strong>Next</strong>2.4.7.2. Application
Access</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
PAM Configuration Files</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)"/><link
rel="prev"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"
title="2.4.3.4. Module Arguments"/><link rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"
title="2.4.5. Creating PAM Modules"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Sample_PAM_Configuration_Files">2.4.4. Sample
PAM Configuration Files</h3></div></div></div><a
id="d0e6419" class="indexterm"/><a id="d0e6424"
class="indexterm"/><div class="para">
The following is a sample PAM application configuration file:
</div><pre class="screen">#%PAM-1.0
auth required pam_securetty.so
auth required pam_unix.so nullok
auth required pam_nologin.so
account required pam_unix.so
password required pam_cracklib.so retry=3
password required pam_unix.so shadow nullok use_authtok
session required pam_unix.so
</pre><div class="itemizedlist"><ul><li><div
class="para">
The first line is a comment, indicated by the hash mark (<code
class="command">#</code>) at the beginning of the line.
</div></li><li><div class="para">
Lines two through four stack three modules for login authentication.
</div><div class="para">
<code class="command">auth required pam_securetty.so</code> —
This module ensures that <span
class="emphasis"><em>if</em></span> the user is trying to
log in as root, the tty on which the user is logging in is listed in the <code
class="filename">/etc/securetty</code> file, <span
class="emphasis"><em>if</em></span> that file exists.
</div><div class="para">
If the tty is not listed in the file, any attempt to log in as root fails with a
<code class="computeroutput">Login incorrect</code> message.
</div><div class="para">
<code class="command">auth required pam_unix.so nullok</code> —
This module prompts the user for a password and then checks the password using the
information stored in <code class="filename">/etc/passwd</code> and,
if it exists, <code class="filename">/etc/shadow</code>.
</div><div class="itemizedlist"><ul><li><div
class="para">
The argument <code class="command">nullok</code> instructs
the <code class="filename">pam_unix.so</code> module to allow a
blank password.
</div><a id="d0e6485" class="indexterm"/><a
id="d0e6490" class="indexterm"/><a id="d0e6495"
class="indexterm"/><a id="d0e6500"
class="indexterm"/></li></ul></div></li><li><div
class="para">
<code class="command">auth required pam_nologin.so</code> —
This is the final authentication step. It checks whether the <code
class="filename">/etc/nologin</code> file exists. If it exists and the
user is not root, authentication fails.
</div><div class="note"><h2>Note</h2><div
class="para">
In this example, all three <code class="command">auth</code>
modules are checked, even if the first <code
class="command">auth</code> module fails. This prevents the user from
knowing at what stage their authentication failed. Such knowledge in the hands of an
attacker could allow them to more easily deduce how to crack the system.
</div></div></li><li><div class="para">
<code class="command">account required pam_unix.so</code> —
This module performs any necessary account verification. For example, if shadow passwords
have been enabled, the account interface of the <code
class="filename">pam_unix.so</code> module checks to see if the account
has expired or if the user has not changed the password within the allowed grace period.
</div></li><li><div class="para">
<code class="command">password required pam_cracklib.so
retry=3</code> — If a password has expired, the password component of the <code
class="filename">pam_cracklib.so</code> module prompts for a new
password. It then tests the newly created password to see whether it can easily be
determined by a dictionary-based password cracking program.
</div><div class="itemizedlist"><ul><li><div
class="para">
The argument <code class="command">retry=3</code> specifies
that if the test fails the first time, the user has two more chances to create a strong
password.
</div></li></ul></div></li><li><div
class="para">
<code class="command">password required pam_unix.so shadow nullok
use_authtok</code> — This line specifies that if the program changes the user's
password, it should use the <code class="command">password</code>
interface of the <code class="filename">pam_unix.so</code> module to
do so.
</div><div class="itemizedlist"><ul><li><div
class="para">
The argument <code class="command">shadow</code> instructs
the module to create shadow passwords when updating a user's password.
</div></li><li><div class="para">
The argument <code class="command">nullok</code> instructs
the module to allow the user to change their password <span
class="emphasis"><em>from</em></span> a blank password,
otherwise a null password is treated as an account lock.
</div></li><li><div class="para">
The final argument on this line, <code
class="command">use_authtok</code>, provides a good example of the
importance of order when stacking PAM modules. This argument instructs the module not to
prompt the user for a new password. Instead, it accepts any password that was recorded by
a previous password module. In this way, all new passwords must pass the <code
class="filename">pam_cracklib.so</code> test for secure passwords
before being accepted.
</div></li></ul></div></li><li><div
class="para">
<code class="command">session required pam_unix.so</code> — The
final line instructs the session interface of the <code
class="filename">pam_unix.so</code> module to manage the session. This
module logs the user name and the service type to <code
class="filename">/var/log/secure</code> at the beginning and end of
each session. This module can be supplemented by stacking it with other session modules
for additional functionality.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-PAM_Configuration_File_Format-Module_Arguments.html"><strong>Prev</strong>2.4.3.4. Module
Arguments</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Creating_PAM_Modules.html"><strong>Next</strong>2.4.5. Creating
PAM Modules</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Authentication Modules (PAM)</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"
title="2.3.5. Configuring Firefox to use Kerberos for SSO"/><link
rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"
title="2.4.2. PAM Configuration Files"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://d
ocs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM">2.4. Pluggable
Authentication Modules (PAM)</h2></div></div></div><a
id="d0e5985" class="indexterm"/><a id="d0e5990"
class="indexterm"/><div class="para">
Programs that grant users access to a system use <em
class="firstterm">authentication</em> to verify each other's
identity (that is, to establish that a user is who they say they are).
</div><div class="para">
Historically, each program had its own way of authenticating users. In Fedora, many
programs are configured to use a centralized authentication mechanism called <em
class="firstterm">Pluggable Authentication Modules</em> (<acronym
class="acronym">PAM</acronym>).
</div><div class="para">
PAM uses a pluggable, modular architecture, which affords the system administrator a
great deal of flexibility in setting authentication policies for the system.
</div><div class="para">
In most situations, the default PAM configuration file for a PAM-aware application is
sufficient. Sometimes, however, it is necessary to edit a PAM configuration file. Because
misconfiguration of PAM can compromise system security, it is important to understand the
structure of these files before making any modifications. Refer to <a
class="xref"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_File_Format.html"
title="2.4.3. PAM Configuration File Format">Section 2.4.3, “PAM
Configuration File Format”</a> for more information.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-Advantages_of_PAM">2.4.1. Advantages
of PAM</h3></div></div></div><a id="d0e6017"
class="indexterm"/><div class="para">
PAM offers the following advantages:
</div><div class="itemizedlist"><ul><li><div
class="para">
a common authentication scheme that can be used with a wide variety of applications.
</div></li><li><div class="para">
significant flexibility and control over authentication for both system
administrators and application developers.
</div></li><li><div class="para">
a single, fully-documented library which allows developers to write programs without
having to create their own authentication schemes.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"><strong>Prev</strong>2.3.5. Configuring
Firefox to use Kerberos for SSO</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM-PAM_Configuration_Files.html"><strong>Next</strong>2.4.2. PAM
Configuration Files</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
LUKS Partition Encryption</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Secure_Installation.html"
title="Chapter 5. Secure Installation"/><link rel="prev"
href="chap-Security_Guide-Secure_Installation.html"
title="Chapter 5. Secure Installation"/><link rel="next"
href="chap-Security_Guide-Software_Maintenance.html"
title="Chapter 6. Software Maintenance"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="chap-Security_Guide-Secure_Installation.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Software_Maintenance.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Secure_Installation-Utilize_LUKS_Partition_Encryption">5.2. Utilize
LUKS Partition Encryption</h2></div></div></div><div
class="para">
Since Fedora 9, implementation of <a
href="http://fedoraproject.org/wiki/Security_Guide/9/LUKSDiskEncrypt...
Unified Key Setup-on-disk-format</a>(LUKS) encryption has become a lot easier.
During the installation process an option to encrypt your partitions will be presented to
the user. The user must supply a passphrase that will be the key to unlock the bulk
encryption key that will be used to secure the partition's data.
</div><div class="para">
Fedora 8, however, does not have LUKS support built-in; however it is easily
implemented. <a
href="http://fedoraproject.org/wiki/Security_Guide/9/LUKSDiskEncrypt...
procedures</a> are available that allow the user to implement partition encryption
on their Fedora 8 installation.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Secure_Installation.html"><strong>Prev</strong>Chapter 5. Secure
Installation</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Software_Maintenance.html"><strong>Next</strong>Chapter 6. Software
Maintenance</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_FTP-Anonymous_Access.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Access</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP"/><link rel="next"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"
title="2.2.6.3. User Accounts"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li cla
ss="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_FTP-Anonymous_Access">2.2.6.2. Anonymous
Access</h4></div></div></div><a id="d0e5148"
class="indexterm"/><a id="d0e5153"
class="indexterm"/><div class="para">
The presence of the <code class="filename">/var/ftp/</code>
directory activates the anonymous account.
</div><div class="para">
The easiest way to create this directory is to install the <code
class="filename">vsftpd</code> package. This package establishes a
directory tree for anonymous users and configures the permissions on directories to
read-only for anonymous users.
</div><div class="para">
By default the anonymous user cannot write to any directories.
</div><div class="caution"><h2>Caution</h2><div
class="para">
If enabling anonymous access to an FTP server, be aware of where sensitive data is
stored.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Anonymous_Access-Anonymous_Upload">2.2.6.2.1. Anonymous
Upload</h5></div></div></div><a id="d0e5180"
class="indexterm"/><a id="d0e5185"
class="indexterm"/><div class="para">
To allow anonymous users to upload files, it is recommended that a write-only
directory be created within <code
class="filename">/var/ftp/pub/</code>.
</div><div class="para">
To do this, type the following command:
</div><pre class="screen">mkdir /var/ftp/pub/upload
</pre><div class="para">
Next, change the permissions so that anonymous users cannot view the contents of the
directory:
</div><pre class="screen">chmod 730 /var/ftp/pub/upload
</pre><div class="para">
A long format listing of the directory should look like this:
</div><pre class="screen">drwx-wx--- 2 root ftp
4096 Feb 13 20:05 upload
</pre><div class="warning"><h2>Warning</h2><div
class="para">
Administrators who allow anonymous users to read and write in directories often find
that their servers become a repository of stolen software.
</div></div><div class="para">
Additionally, under <code class="command">vsftpd</code>, add
the following line to the <code
class="filename">/etc/vsftpd/vsftpd.conf</code> file:
</div><pre class="screen">anon_upload_enable=YES
</pre></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"><strong>Prev</strong>2.2.6. Securing
FTP</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"><strong>Next</strong>2.2.6.3. User
Accounts</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
TCP Wrappers To Control Access</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP"/><link rel="prev"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"
title="2.2.6.3. User Accounts"/><link rel="next"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"
title="2.2.7. Securing Sendmail"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></
p><ul class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access">2.2.6.4. Use
TCP Wrappers To Control Access</h4></div></div></div><a
id="d0e5280" class="indexterm"/><a id="d0e5285"
class="indexterm"/><a id="d0e5290"
class="indexterm"/><div class="para">
Use TCP Wrappers to control access to either FTP daemon as outlined in <a
class="xref"
href="sect-Security_Guide-Server_Security.html#sect-Security_Guide-Securing_Services_With_TCP_Wrappers_and_xinetd-Enhancing_Security_With_TCP_Wrappers"
title="2.2.1.1. Enhancing Security With TCP Wrappers">Section 2.2.1.1,
“Enhancing Security With TCP Wrappers”</a>.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_FTP-User_Accounts.html"><strong>Prev</strong>2.2.6.3. User
Accounts</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"><strong>Next</strong>2.2.7. Securing
Sendmail</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_FTP-User_Accounts.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Accounts</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP"/><link rel="prev"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"
title="2.2.6.2. Anonymous Access"/><link rel="next"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"
title="2.2.6.4. Use TCP Wrappers To Control
Access"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documenta
tion Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_FTP-User_Accounts">2.2.6.3. User
Accounts</h4></div></div></div><a id="d0e5227"
class="indexterm"/><a id="d0e5232"
class="indexterm"/><div class="para">
Because FTP transmits unencrypted usernames and passwords over insecure networks for
authentication, it is a good idea to deny system users access to the server from their
user accounts.
</div><div class="para">
To disable all user accounts in <code
class="command">vsftpd</code>, add the following directive to <code
class="filename">/etc/vsftpd/vsftpd.conf</code>:
</div><pre class="screen">local_enable=NO
</pre><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-User_Accounts-Restricting_User_Accounts">2.2.6.3.1. Restricting
User Accounts</h5></div></div></div><div
class="para">
To disable FTP access for specific accounts or specific groups of accounts, such as
the root user and those with <code class="command">sudo</code>
privileges, the easiest way is to use a PAM list file as described in <a
class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Disallowing_Root_Access-Disabling_Root_Using_PAM"
title="2.1.4.2.4. Disabling Root Using PAM">Section 2.1.4.2.4, “Disabling
Root Using PAM”</a>. The PAM configuration file for <code
class="command">vsftpd</code> is <code
class="filename">/etc/pam.d/vsftpd</code>.
</div><div class="para">
It is also possible to disable user accounts within each service directly.
</div><div class="para">
To disable specific user accounts in <code
class="command">vsftpd</code>, add the username to <code
class="filename">/etc/vsftpd.ftpusers</code>
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"><strong>Prev</strong>2.2.6.2. Anonymous
Access</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"><strong>Next</strong>2.2.6.4. Use
TCP Wrappers To Control Access</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
of Syntax Errors</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"
title="2.2.4. Securing NFS"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"
title="2.2.4. Securing NFS"/><link rel="next"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"
title="2.2.4.3. Do Not Use the no_root_squash
Option"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Do
cumentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors">2.2.4.2. Beware
of Syntax Errors</h4></div></div></div><a
id="d0e4823" class="indexterm"/><a id="d0e4828"
class="indexterm"/><div class="para">
The NFS server determines which file systems to export and which hosts to export these
directories to by consulting the <code
class="filename">/etc/exports</code> file. Be careful not to add
extraneous spaces when editing this file.
</div><div class="para">
For instance, the following line in the <code
class="filename">/etc/exports</code> file shares the directory <code
class="command">/tmp/nfs/</code> to the host <code
class="command">bob.example.com</code> with read/write permissions.
</div><pre class="screen">/tmp/nfs/ bob.example.com(rw)
</pre><div class="para">
The following line in the <code
class="filename">/etc/exports</code> file, on the other hand, shares
the same directory to the host <code
class="computeroutput">bob.example.com</code> with read-only
permissions and shares it to the <span
class="emphasis"><em>world</em></span> with read/write
permissions due to a single space character after the hostname.
</div><pre class="screen">/tmp/nfs/
bob.example.com (rw)
</pre><div class="para">
It is good practice to check any configured NFS shares by using the <code
class="command">showmount</code> command to verify what is being
shared:
</div><pre class="screen">showmount -e <em
class="replaceable"><code><hostname></code></em>
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"><strong>Prev</strong>2.2.4. Securing
NFS</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"><strong>Next</strong>2.2.4.3. Do
Not Use the no_root_squash
Option</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... Not
Use the no_root_squash Option</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"
title="2.2.4. Securing NFS"/><link rel="prev"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"
title="2.2.4.2. Beware of Syntax Errors"/><link rel="next"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP
Server"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/images
/image_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option">2.2.4.3. Do
Not Use the <code class="command">no_root_squash</code>
Option</h4></div></div></div><div class="para">
By default, NFS shares change the root user to the <code
class="command">nfsnobody</code> user, an unprivileged user account.
This changes the owner of all root-created files to <code
class="command">nfsnobody</code>, which prevents uploading of programs
with the setuid bit set.
</div><div class="para">
If <code class="command">no_root_squash</code> is used, remote
root users are able to change any file on the shared file system and leave applications
infected by trojans for other users to inadvertently execute.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"><strong>Prev</strong>2.2.4.2. Beware
of Syntax Errors</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"><strong>Next</strong>2.2.5. Securing
the Apache HTTP Server</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Static Ports and Use iptables Rules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/><link rel="prev"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"
title="2.2.3.3. Edit the /var/yp/securenets File"/><link
rel="next"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"
title="2.2.3.5. Use Kerberos Authentication"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Co
ntent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules">2.2.3.4. Assign
Static Ports and Use iptables Rules</h4></div></div></div><a
id="d0e4689" class="indexterm"/><a id="d0e4694"
class="indexterm"/><a id="d0e4701"
class="indexterm"/><a id="d0e4706"
class="indexterm"/><div class="para">
All of the servers related to NIS can be assigned specific ports except for <code
class="command">rpc.yppasswdd</code> — the daemon that allows users to
change their login passwords. Assigning ports to the other two NIS server daemons,
<code class="command">rpc.ypxfrd</code> and <code
class="command">ypserv</code>, allows for the creation of firewall
rules to further protect the NIS server daemons from intruders.
</div><div class="para">
To do this, add the following lines to <code
class="filename">/etc/sysconfig/network</code>:
</div><pre class="screen">YPSERV_ARGS="-p 834"
YPXFRD_ARGS="-p 835"
</pre><div class="para">
The following iptables rules can then be used to enforce which network the server
listens to for these ports:
</div><pre class="screen">iptables -A INPUT -p ALL -s!
192.168.0.0/24 --dport 834 -j DROP
iptables -A INPUT -p ALL -s! 192.168.0.0/24 --dport 835 -j DROP
</pre><div class="para">
This means that the server only allows connections to ports 834 and 835 if the
requests come from the 192.168.0.0/24 network, regardless of the protocol.
</div><div class="tip"><h2>Tip</h2><div
class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls">Section 2.8, “Firewalls”</a> for more
information about implementing firewalls with iptables commands.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"><strong>Prev</strong>2.2.3.3. Edit
the /var/yp/securenets File</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"><strong>Next</strong>2.2.3.5. Use
Kerberos Authentication</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the /var/yp/securenets File</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/><link rel="prev"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"
title="2.2.3.2. Use a Password-like NIS Domain Name and Hostname"/><link
rel="next"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"
title="2.2.3.4. Assign Static Ports and Use iptables
Rules"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" h
ref="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File">2.2.3.3. Edit
the <code class="filename">/var/yp/securenets</code>
File</h4></div></div></div><a id="d0e4647"
class="indexterm"/><a id="d0e4653"
class="indexterm"/><div class="para">
If the <code class="filename">/var/yp/securenets</code> file is
blank or does not exist (as is the case after a default installation), NIS listens to all
networks. One of the first things to do is to put netmask/network pairs in the file so
that <code class="command">ypserv</code> only responds to requests
from the appropriate network.
</div><div class="para">
Below is a sample entry from a <code
class="filename">/var/yp/securenets</code> file:
</div><pre class="screen">255.255.255.0 192.168.0.0
</pre><div class="warning"><h2>Warning</h2><div
class="para">
Never start an NIS server for the first time without creating the <code
class="filename">/var/yp/securenets</code> file.
</div></div><div class="para">
This technique does not provide protection from an IP spoofing attack, but it does at
least place limits on what networks the NIS server services.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"><strong>Prev</strong>2.2.3.2. Use
a Password-like NIS Domain Name and ...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"><strong>Next</strong>2.2.3.4. Assign
Static Ports and Use iptables
Rul...</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Kerberos Authentication</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/><link rel="prev"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"
title="2.2.3.4. Assign Static Ports and Use iptables Rules"/><link
rel="next"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"
title="2.2.4. Securing NFS"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_ri
ght.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication">2.2.3.5. Use
Kerberos Authentication</h4></div></div></div><a
id="d0e4747" class="indexterm"/><a id="d0e4752"
class="indexterm"/><a id="d0e4759"
class="indexterm"/><div class="para">
One of the issues to consider when NIS is used for authentication is that whenever a
user logs into a machine, a password hash from the <code
class="filename">/etc/shadow</code> map is sent over the network. If an
intruder gains access to an NIS domain and sniffs network traffic, they can collect
usernames and password hashes. With enough time, a password cracking program can guess
weak passwords, and an attacker can gain access to a valid account on the network.
</div><div class="para">
Since Kerberos uses secret-key cryptography, no password hashes are ever sent over the
network, making the system far more secure. Refer to <a class="xref"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos">Section 2.6, “Kerberos”</a> for more information
about Kerberos.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Assign_Static_Ports_and_Use_iptables_Rules.html"><strong>Prev</strong>2.2.3.4. Assign
Static Ports and Use iptables Rul...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_NFS.html"><strong>Next</strong>2.2.4. Securing
NFS</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... a
Password-like NIS Domain Name and Hostname</title><link
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/><link rel="next"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"
title="2.2.3.3. Edit the /var/yp/securenets
File"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_righ
t.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname">2.2.3.2. Use
a Password-like NIS Domain Name and
Hostname</h4></div></div></div><a id="d0e4585"
class="indexterm"/><a id="d0e4590"
class="indexterm"/><div class="para">
Any machine within an NIS domain can use commands to extract information from the
server without authentication, as long as the user knows the NIS server's DNS hostname
and NIS domain name.
</div><div class="para">
For instance, if someone either connects a laptop computer into the network or breaks
into the network from outside (and manages to spoof an internal IP address), the following
command reveals the <code class="command">/etc/passwd</code> map:
</div><pre class="screen">ypcat -d <em
class="replaceable"><code><NIS_domain></code></em>
-h <em
class="replaceable"><code><DNS_hostname></code></em>
passwd
</pre><div class="para">
If this attacker is a root user, they can obtain the <code
class="command">/etc/shadow</code> file by typing the following
command:
</div><pre class="screen">ypcat -d <em
class="replaceable"><code><NIS_domain></code></em>
-h <em
class="replaceable"><code><DNS_hostname></code></em>
shadow
</pre><div class="note"><h2>Note</h2><div
class="para">
If Kerberos is used, the <code
class="command">/etc/shadow</code> file is not stored within an NIS
map.
</div></div><div class="para">
To make access to NIS maps harder for an attacker, create a random string for the DNS
hostname, such as <code
class="filename">o7hfawtgmhwg.domain.com</code>. Similarly, create a
<span class="emphasis"><em>different</em></span>
randomized NIS domain name. This makes it much more difficult for an attacker to access
the NIS server.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"><strong>Prev</strong>2.2.3. Securing
NIS</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Edit_the_varypsecurenets_File.html"><strong>Next</strong>2.2.3.3. Edit
the /var/yp/securenets File</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
portmap With iptables</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"
title="2.2.2. Securing Portmap"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"
title="2.2.2. Securing Portmap"/><link rel="next"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"
title="2.2.3. Securing NIS"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></
p><ul class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables">2.2.2.2. Protect
portmap With iptables</h4></div></div></div><a
id="d0e4461" class="indexterm"/><div class="para">
To further restrict access to the <code
class="command">portmap</code> service, it is a good idea to add
iptables rules to the server and restrict access to specific networks.
</div><div class="para">
Below are two example iptables commands. The first allows TCP connections to the port
111 (used by the <code class="command">portmap</code> service) from
the 192.168.0.0/24 network. The second allows TCP connections to the same port from the
localhost. This is necessary for the <code
class="command">sgi_fam</code> service used by <span
class="application"><strong>Nautilus</strong></span>. All
other packets are dropped.
</div><pre class="screen">iptables -A INPUT -p tcp -s!
192.168.0.0/24 --dport 111 -j DROP
iptables -A INPUT -p tcp -s 127.0.0.1 --dport 111 -j ACCEPT
</pre><div class="para">
To similarly limit UDP traffic, use the following command.
</div><pre class="screen">iptables -A INPUT -p udp -s!
192.168.0.0/24 --dport 111 -j DROP
</pre><div class="tip"><h2>Tip</h2><div
class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls">Section 2.8, “Firewalls”</a> for more
information about implementing firewalls with iptables commands.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"><strong>Prev</strong>2.2.2. Securing
Portmap</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_NIS.html"><strong>Next</strong>2.2.3. Securing
NIS</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Users</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"
title="2.2.7. Securing Sendmail"/><link rel="prev"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"
title="2.2.7.2. NFS and Sendmail"/><link rel="next"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"
title="2.2.8. Verifying Which Ports Are
Listening"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right
.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Sendmail-Mail_only_Users">2.2.7.3. Mail-only
Users</h4></div></div></div><div class="para">
To help prevent local user exploits on the Sendmail server, it is best for mail users
to only access the Sendmail server using an email program. Shell accounts on the mail
server should not be allowed and all user shells in the <code
class="filename">/etc/passwd</code> file should be set to <code
class="command">/sbin/nologin</code> (with the possible exception of
the root user).
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"><strong>Prev</strong>2.2.7.2. NFS
and Sendmail</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"><strong>Next</strong>2.2.8. Verifying
Which Ports Are Listening</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Sendmail</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"
title="2.2.7. Securing Sendmail"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"
title="2.2.7. Securing Sendmail"/><link rel="next"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"
title="2.2.7.3. Mail-only Users"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a><
/p><ul class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail">2.2.7.2. NFS and
Sendmail</h4></div></div></div><a id="d0e5372"
class="indexterm"/><a id="d0e5377"
class="indexterm"/><a id="d0e5382"
class="indexterm"/><div class="para">
Never put the mail spool directory, <code
class="filename">/var/spool/mail/</code>, on an NFS shared volume.
</div><div class="para">
Because NFSv2 and NFSv3 do not maintain control over user and group IDs, two or more
users can have the same UID, and receive and read each other's mail.
</div><div class="note"><h2>Note</h2><div
class="para">
With NFSv4 using Kerberos, this is not the case, since the <code
class="filename">SECRPC_GSS</code> kernel module does not utilize
UID-based authentication. However, it is considered good practice <span
class="emphasis"><em>not</em></span> to put the mail spool
directory on NFS shared volumes.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_Sendmail.html"><strong>Prev</strong>2.2.7. Securing
Sendmail</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"><strong>Next</strong>2.2.7.3. Mail-only
Users</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... Not
Remove the IncludesNoExec Directive</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP Server"/><link rel="prev"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"
title="2.2.5.3. The UserDir Directive"/><link rel="next"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"
title="2.2.5.5. Restrict Permissions for Executable
Directories"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png"
alt="Product Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive">2.2.5.4. Do
Not Remove the <code class="command">IncludesNoExec</code>
Directive</h4></div></div></div><div
class="para">
By default, the <em class="firstterm">Server-Side Includes</em>
(<abbr class="abbrev">SSI</abbr>) module cannot execute commands. It
is recommended that you do not change this setting unless absolutely necessary, as it
could potentially enable an attacker to execute commands on the system.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"><strong>Prev</strong>2.2.5.3. The
UserDir Directive</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"><strong>Next</strong>2.2.5.5. Restrict
Permissions for Executable
Dire...</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Permissions for Executable Directories</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP Server"/><link rel="prev"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"
title="2.2.5.4. Do Not Remove the IncludesNoExec Directive"/><link
rel="next"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"
title="2.2.6. Securing FTP"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories">2.2.5.5. Restrict
Permissions for Executable Directories</h4></div></div></div><a
id="d0e4979" class="indexterm"/><a id="d0e4984"
class="indexterm"/><div class="para">
Ensure that only the root user has write permissions to any directory containing
scripts or CGIs. To do this, type the following commands:
</div><pre class="screen">chown root <em
class="replaceable"><code><directory_name></code></em>chmod
755 <em
class="replaceable"><code><directory_name></code></em>
</pre><div class="important"><h2>Important</h2><div
class="para">
Always verify that any scripts running on the system work as intended <span
class="emphasis"><em>before</em></span> putting them into
production.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"><strong>Prev</strong>2.2.5.4. Do
Not Remove the IncludesNoExec Directi...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_FTP.html"><strong>Next</strong>2.2.6. Securing
FTP</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Indexes Directive</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP Server"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP Server"/><link rel="next"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"
title="2.2.5.3. The UserDir Directive"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraprojec
t.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive">2.2.5.2. The
<code class="command">Indexes</code>
Directive</h4></div></div></div><div
class="para">
This directive is enabled by default, but may not be desirable. To prevent visitors
from browsing files on the server, remove this directive.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"><strong>Prev</strong>2.2.5. Securing
the Apache HTTP Server</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html"><strong>Next</strong>2.2.5.3. The
UserDir Directive</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
UserDir Directive</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html"
title="2.2.5. Securing the Apache HTTP Server"/><link rel="prev"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"
title="2.2.5.2. The Indexes Directive"/><link rel="next"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"
title="2.2.5.4. Do Not Remove the IncludesNoExec
Directive"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a clas
s="right" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_UserDir_Directive">2.2.5.3. The
<code class="command">UserDir</code>
Directive</h4></div></div></div><div
class="para">
The <code class="command">UserDir</code> directive is disabled
by default because it can confirm the presence of a user account on the system. To enable
user directory browsing on the server, use the following directives:
</div><pre class="screen">UserDir enabled
UserDir disabled root
</pre><div class="para">
These directives activate user directory browsing for all user directories other than
<code class="filename">/root/</code>. To add users to the list of
disabled accounts, add a space-delimited list of users on the <code
class="command">UserDir disabled</code> line.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"><strong>Prev</strong>2.2.5.2. The
Indexes Directive</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Do_Not_Remove_the_IncludesNoExec_Directive.html"><strong>Next</strong>2.2.5.4. Do
Not Remove the IncludesNoExec
Directi...</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Security_Updates.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Updates</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/><link rel="prev"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html"
title="1.4. Common Exploits and Attacks"/><link rel="next"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="do
cnav"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Securing_Your_Network.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Security_Updates">1.5. Security
Updates</h2></div></div></div><a id="d0e1367"
class="indexterm"/><a id="d0e1372"
class="indexterm"/><div class="para">
As security vulnerabilities are discovered, the affected software must be updated in
order to limit any potential security risks. If the software is part of a package within a
Fedora distribution that is currently supported, Fedora. is committed to releasing updated
packages that fix the vulnerability as soon as possible. Often, announcements about a
given security exploit are accompanied with a patch (or source code that fixes the
problem). This patch is then applied to the Fedora package, tested by the Red Hat quality
assurance team, and released as an errata update. However, if an announcement does not
include a patch, a Red Hat developer works with the maintainer of the software to fix the
problem. Once the problem is fixed, the package is tested and released as an errata
update.
</div><div class="para">
If an errata update is released for software used on your system, it is highly
recommended that you update the effected packages as soon as possible to minimize the
amount of time the system is potentially vulnerable.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Security_Updates-Updating_Packages">1.5.1. Updating
Packages</h3></div></div></div><div class="para">
When updating software on a system, it is important to download the update from a
trusted source. An attacker can easily rebuild a package with the same version number as
the one that is supposed to fix the problem but with a different security exploit and
release it on the Internet. If this happens, using security measures such as verifying
files against the original RPM does not detect the exploit. Thus, it is very important to
only download RPMs from trusted sources, such as from Fedora. and check the signature of
the package to verify its integrity.
</div><div class="para">
Red Hat offers two ways to find information on errata updates:
</div><div class="orderedlist"><ol><li><div
class="para">
Listed and available for download on Red Hat Network
</div></li><li><div class="para">
Listed and unlinked on the Red Hat Errata website
</div></li></ol></div><div
class="note"><h2>Note</h2><div class="para">
Beginning with the Fedora product line, updated packages can be downloaded only from
Red Hat Network. Although the Red Hat Errata website contains updated information, it does
not contain the actual packages for download.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Updating_Packages-Using_Red_Hat_Network">1.5.1.1. Using
Red Hat Network</h4></div></div></div><a id="d0e1401"
class="indexterm"/><div class="para">
Red Hat Network allows the majority of the update process to be automated. It
determines which RPM packages are necessary for the system, downloads them from a secure
repository, verifies the RPM signature to make sure they have not been tampered with, and
updates them. The package install can occur immediately or can be scheduled during a
certain time period.
</div><div class="para">
Red Hat Network requires a <em class="firstterm">System
Profile</em> for each machine to be updated. The System Profile contains hardware
and software information about the system. This information is kept confidential and is
not given to anyone else. It is only used to determine which errata updates are applicable
to each system, and, without it, Red Hat Network can not determine whether a given system
needs updates. When a security errata (or any type of errata) is released, Red Hat Network
sends an email with a description of the errata as well as a list of systems which are
affected. To apply the update, use the <span
class="application"><strong>Red Hat Update
Agent</strong></span> or schedule the package to be updated through the
website <a href="http://rhn.redhat.com">http://rhn.redhat.com</a>.
</div><div class="tip"><h2>Tip</h2><div
class="para">
Fedora includes the <span class="application"><strong>Red Hat
Network Alert Notification Tool</strong></span>, a convenient panel icon that
displays visible alerts when there is an update for a registered Fedora system. Refer to
the following URL for more information about the applet: <a
href="https://rhn.redhat.com/rhn/help/quickstart.jsp">https:...
</div></div><div
class="important"><h2>Important</h2><div
class="para">
Before installing any security errata, be sure to read any special instructions
contained in the errata report and execute them accordingly. Refer to <a
class="xref"
href="sect-Security_Guide-Security_Updates.html#sect-Security_Guide-Updating_Packages-Applying_the_Changes"
title="1.5.1.5. Applying the Changes">Section 1.5.1.5, “Applying the
Changes”</a> for general instructions about applying the changes made by an errata
update.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Updating_Packages-Using_the_Red_Hat_Errata_Website">1.5.1.2. Using
the Red Hat Errata Website</h4></div></div></div><a
id="d0e1440" class="indexterm"/><a id="d0e1445"
class="indexterm"/><div class="para">
When security errata reports are released, they are published on the Red Hat Errata
website available at <a
href="http://www.redhat.com/security/">http://www.redhat.com...;.
From this page, select the product and version for your system, and then select <span
class="guilabel"><strong>security</strong></span> at the
top of the page to display only Fedora Security Advisories. If the synopsis of one of the
advisories describes a package used on your system, click on the synopsis for more
details.
</div><div class="para">
The details page describes the security exploit and any special instructions that must
be performed in addition to updating the package to fix the security hole.
</div><div class="para">
To download the updated package(s), click on the link to login to Red Hat Network,
click the package name(s) and save to the hard drive. It is highly recommended that you
create a new directory, such as <code
class="filename">/tmp/updates</code>, and save all the downloaded
packages to it.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Updating_Packages-Verifying_Signed_Packages">1.5.1.3. Verifying
Signed Packages</h4></div></div></div><a id="d0e1468"
class="indexterm"/><div class="para">
All Fedora packages are signed with the Fedora. <em
class="firstterm">GPG</em> key. GPG stands for GNU Privacy Guard, or
GnuPG, a free software package used for ensuring the authenticity of distributed files.
For example, a private key (secret key) held by Red Hat locks the package while the public
key unlocks and verifies the package. If the public key distributed by Red Hat does not
match the private key during RPM verification, the package may have been altered and
therefore cannot be trusted.
</div><div class="para">
The RPM utility within Fedora automatically tries to verify the GPG signature of an
RPM package before installing it. If the Red Hat GPG key is not installed, install it from
a secure, static location, such as an Fedora installation CD-ROM.
</div><div class="para">
Assuming the CD-ROM is mounted in <code
class="filename">/mnt/cdrom</code>, use the following command to import
it into the <em class="firstterm">keyring</em> (a database of
trusted keys on the system):
</div><pre class="screen"><code
class="command">rpm --import /mnt/cdrom/RPM-GPG-KEY</code>
</pre><div class="para">
To display a list of all keys installed for RPM verification, execute the following
command:
</div><pre class="screen"><code
class="command">rpm -qa gpg-pubkey*</code>
</pre><div class="para">
For the Red Hat key, the output includes the following:
</div><pre class="screen"><code
class="computeroutput">gpg-pubkey-db42a60e-37ea5438</code>
</pre><div class="para">
To display details about a specific key, use the <code
class="command">rpm -qi</code> command followed by the output from the
previous command, as in this example:
</div><pre class="screen"><code
class="command">rpm -qi gpg-pubkey-db42a60e-37ea5438</code>
</pre><div class="para">
It is extremely important to verify the signature of the RPM files before installing
them to ensure that they have not been altered from the Fedora. release of the packages.
To verify all the downloaded packages at once, issue the following command:
</div><pre class="screen"><code
class="command">rpm -K /tmp/updates/*.rpm</code>
</pre><div class="para">
For each package, if the GPG key verifies successfully, the command returns <code
class="computeroutput">gpg OK</code>. If it doesn't, make sure you
are using the correct Red Hat public key, as well as verifying the source of the content.
Packages that do not pass GPG verifications should not be installed, as they may have been
altered by a third party.
</div><div class="para">
After verifying the GPG key and downloading all the packages associated with the
errata report, install the packages as root at a shell prompt.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Updating_Packages-Installing_Signed_Packages">1.5.1.4. Installing
Signed Packages</h4></div></div></div><a id="d0e1529"
class="indexterm"/><div class="para">
Installation for most packages can be done safely (except kernel packages) by issuing
the following command:
</div><pre class="screen"><code
class="command">rpm -Uvh /tmp/updates/*.rpm</code>
</pre><div class="para">
For kernel packages use the following command:
</div><pre class="screen"><code
class="command">rpm -ivh /tmp/updates/<em
class="replaceable"><code><kernel-package></code></em></code>
</pre><div class="para">
Replace <em
class="replaceable"><code><kernel-package></code></em>
in the previous example with the name of the kernel RPM.
</div><div class="para">
Once the machine has been safely rebooted using the new kernel, the old kernel may be
removed using the following command:
</div><pre class="screen"><code
class="command">rpm -e <em
class="replaceable"><code><old-kernel-package></code></em></code>
</pre><div class="para">
Replace <em
class="replaceable"><code><old-kernel-package></code></em>
in the previous example with the name of the older kernel RPM.
</div><div class="note"><h2>Note</h2><div
class="para">
It is not a requirement that the old kernel be removed. The default boot loader,
GRUB, allows for multiple kernels to be installed, then chosen from a menu at boot time.
</div></div><div
class="important"><h2>Important</h2><div
class="para">
Before installing any security errata, be sure to read any special instructions
contained in the errata report and execute them accordingly. Refer to <a
class="xref"
href="sect-Security_Guide-Security_Updates.html#sect-Security_Guide-Updating_Packages-Applying_the_Changes"
title="1.5.1.5. Applying the Changes">Section 1.5.1.5, “Applying the
Changes”</a> for general instructions about applying the changes made by an errata
update.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Updating_Packages-Applying_the_Changes">1.5.1.5. Applying
the Changes</h4></div></div></div><a id="d0e1581"
class="indexterm"/><a id="d0e1586"
class="indexterm"/><div class="para">
After downloading and installing security errata via Red Hat Network or the Red Hat
errata website, it is important to halt usage of the older software and begin using the
new software. How this is done depends on the type of software that has been updated. The
following list itemizes the general categories of software and provides instructions for
using the updated versions after a package upgrade.
</div><div class="note"><h2>Note</h2><div
class="para">
In general, rebooting the system is the surest way to ensure that the latest version
of a software package is used; however, this option is not always available to the system
administrator.
</div></div><div
class="variablelist"><dl><dt><span
class="term">Applications</span></dt><dd><div
class="para">
User-space applications are any programs that can be initiated by a system user.
Typically, such applications are used only when a user, script, or automated task utility
launches them and they do not persist for long periods of time.
</div><div class="para">
Once such a user-space application is updated, halt any instances of the
application on the system and launch the program again to use the updated version.
</div></dd><dt><span
class="term">Kernel</span></dt><dd><div
class="para">
The kernel is the core software component for the Fedora operating system. It
manages access to memory, the processor, and peripherals as well as schedules all tasks.
</div><div class="para">
Because of its central role, the kernel cannot be restarted without also stopping
the computer. Therefore, an updated version of the kernel cannot be used until the system
is rebooted.
</div></dd><dt><span class="term">Shared
Libraries</span></dt><dd><div class="para">
Shared libraries are units of code, such as <code
class="filename">glibc</code>, which are used by a number of
applications and services. Applications utilizing a shared library typically load the
shared code when the application is initialized, so any applications using the updated
library must be halted and relaunched.
</div><div class="para">
To determine which running applications link against a particular library, use the
<code class="command">lsof</code> command as in the following
example:
</div><pre class="screen"><code
class="command">lsof /usr/lib/libwrap.so*</code>
</pre><div class="para">
This command returns a list of all the running programs which use TCP wrappers for
host access control. Therefore, any program listed must be halted and relaunched if the
<code class="filename">tcp_wrappers</code> package is updated.
</div></dd><dt><span class="term">SysV
Services</span></dt><dd><div class="para">
SysV services are persistent server programs launched during the boot process.
Examples of SysV services include <code class="command">sshd</code>,
<code class="command">vsftpd</code>, and <code
class="command">xinetd</code>.
</div><div class="para">
Because these programs usually persist in memory as long as the machine is booted,
each updated SysV service must be halted and relaunched after the package is upgraded.
This can be done using the <span
class="application"><strong>Services Configuration
Tool</strong></span> or by logging into a root shell prompt and issuing the
<code class="command">/sbin/service</code> command as in the
following example:
</div><pre class="screen"><code
class="command">/sbin/service <em
class="replaceable"><code><service-name></code></em>
restart</code>
</pre><div class="para">
In the previous example, replace <em
class="replaceable"><code><service-name></code></em>
with the name of the service, such as <code
class="command">sshd</code>.
</div></dd><dt><span class="term"><code
class="command">xinetd</code>
Services</span></dt><dd><div class="para">
Services controlled by the <code
class="command">xinetd</code> super service only run when a there is an
active connection. Examples of services controlled by <code
class="command">xinetd</code> include Telnet, IMAP, and POP3.
</div><div class="para">
Because new instances of these services are launched by <code
class="command">xinetd</code> each time a new request is received,
connections that occur after an upgrade are handled by the updated software. However, if
there are active connections at the time the <code
class="command">xinetd</code> controlled service is upgraded, they are
serviced by the older version of the software.
</div><div class="para">
To kill off older instances of a particular <code
class="command">xinetd</code> controlled service, upgrade the package
for the service then halt all processes currently running. To determine if the process is
running, use the <code class="command">ps</code> command and then
use the <code class="command">kill</code> or <code
class="command">killall</code> command to halt current instances of the
service.
</div><div class="para">
For example, if security errata <code
class="filename">imap</code> packages are released, upgrade the
packages, then type the following command as root into a shell prompt:
</div><pre class="screen"><code
class="command">ps -aux | grep imap</code>
</pre><div class="para">
This command returns all active IMAP sessions. Individual sessions can then be
terminated by issuing the following command:
</div><pre class="screen"><code
class="command">kill <em
class="replaceable"><code><PID></code></em></code>
</pre><div class="para">
If this fails to terminate the session, use the following command instead:
</div><pre class="screen"><code
class="command">kill -9 <em
class="replaceable"><code><PID></code></em></code>
</pre><div class="para">
In the previous examples, replace <em
class="replaceable"><code><PID></code></em>
with the process identification number (found in the second column of the <code
class="command">ps</code> command) for an IMAP session.
</div><div class="para">
To kill all active IMAP sessions, issue the following command:
</div><pre class="screen"><code
class="command">killall imapd</code>
</pre></dd></dl></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html"><strong>Prev</strong>1.4. Common
Exploits and Attacks</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-Securing_Your_Network.html"><strong>Next</strong>Chapter 2. Securing
Your Network</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_FTP.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
FTP</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"
title="2.2.5.5. Restrict Permissions for Executable Directories"/><link
rel="next"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"
title="2.2.6.2. Anonymous Access"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/i
mage_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_FTP">2.2.6. Securing
FTP</h3></div></div></div><a id="d0e5012"
class="indexterm"/><a id="d0e5017"
class="indexterm"/><div class="para">
The <em class="firstterm">File Transport Protocol</em> (<abbr
class="abbrev">FTP</abbr>) is an older TCP protocol designed to
transfer files over a network. Because all transactions with the server, including user
authentication, are unencrypted, it is considered an insecure protocol and should be
carefully configured.
</div><div class="para">
Fedora provides three FTP servers.
</div><a id="d0e5032" class="indexterm"/><a
id="d0e5038" class="indexterm"/><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">gssftpd</code> — A Kerberos-aware
<code class="command">xinetd</code>-based FTP daemon that does not
transmit authentication information over the network.
</div></li><li><div class="para">
<span class="application"><strong>Red Hat Content
Accelerator</strong></span> (<code
class="command">tux</code>) — A kernel-space Web server with FTP
capabilities.
</div></li><li><div class="para">
<code class="command">vsftpd</code> — A standalone, security
oriented implementation of the FTP service.
</div></li></ul></div><div class="para">
The following security guidelines are for setting up the <code
class="command">vsftpd</code> FTP service.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_FTP-FTP_Greeting_Banner">2.2.6.1. FTP
Greeting Banner</h4></div></div></div><a id="d0e5079"
class="indexterm"/><a id="d0e5084"
class="indexterm"/><div class="para">
Before submitting a username and password, all users are presented with a greeting
banner. By default, this banner includes version information useful to crackers trying to
identify weaknesses in a system.
</div><div class="para">
To change the greeting banner for <code
class="command">vsftpd</code>, add the following directive to the
<code class="filename">/etc/vsftpd/vsftpd.conf</code> file:
</div><pre class="screen">ftpd_banner=<em
class="replaceable"><code><insert_greeting_here></code></em>
</pre><div class="para">
Replace <em
class="replaceable"><code><insert_greeting_here></code></em>
in the above directive with the text of the greeting message.
</div><div class="para">
For mutli-line banners, it is best to use a banner file. To simplify management of
multiple banners, place all banners in a new directory called <code
class="filename">/etc/banners/</code>. The banner file for FTP
connections in this example is <code
class="filename">/etc/banners/ftp.msg</code>. Below is an example of
what such a file may look like:
</div><pre class="screen">######### # Hello, all activity on
ftp.example.com is logged. #########
</pre><div class="note"><h2>Note</h2><div
class="para">
It is not necessary to begin each line of the file with <code
class="command">220</code> as specified in <a class="xref"
href="sect-Security_Guide-Server_Security.html#sect-Security_Guide-Enhancing_Security_With_TCP_Wrappers-TCP_Wrappers_and_Connection_Banners"
title="2.2.1.1.1. TCP Wrappers and Connection Banners">Section 2.2.1.1.1,
“TCP Wrappers and Connection Banners”</a>.
</div></div><div class="para">
To reference this greeting banner file for <code
class="command">vsftpd</code>, add the following directive to the
<code class="filename">/etc/vsftpd/vsftpd.conf</code> file:
</div><pre class="screen">banner_file=/etc/banners/ftp.msg
</pre><div class="para">
It also is possible to send additional banners to incoming connections using TCP
Wrappers as described in <a class="xref"
href="sect-Security_Guide-Server_Security.html#sect-Security_Guide-Enhancing_Security_With_TCP_Wrappers-TCP_Wrappers_and_Connection_Banners"
title="2.2.1.1.1. TCP Wrappers and Connection Banners">Section 2.2.1.1.1,
“TCP Wrappers and Connection Banners”</a>.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-Restrict_Permissions_for_Executable_Directories.html"><strong>Prev</strong>2.2.5.5. Restrict
Permissions for Executable Dire...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_FTP-Anonymous_Access.html"><strong>Next</strong>2.2.6.2. Anonymous
Access</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_NFS.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
NFS</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"
title="2.2.3.5. Use Kerberos Authentication"/><link rel="next"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"
title="2.2.4.2. Beware of Syntax Errors"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a
</p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_NFS">2.2.4. Securing
NFS</h3></div></div></div><a id="d0e4776"
class="indexterm"/><a id="d0e4781"
class="indexterm"/><div
class="important"><h2>Important</h2><div
class="para">
The version of NFS included in Fedora, NFSv4, no
longer requires the <code class="command">portmap</code> service as
outlined in <a class="xref"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"
title="2.2.2. Securing Portmap">Section 2.2.2, “Securing Portmap”</a>.
NFS traffic now utilizes TCP in all versions, rather than UDP, and requires it when using
NFSv4. NFSv4 now includes Kerberos user and group authentication, as part of the <code
class="filename">RPCSEC_GSS</code> kernel module. Information on
<code class="command">portmap</code> is still included, since Fedora
supports NFSv2 and NFSv3, both of which utilize <code
class="command">portmap</code>.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NFS-Carefully_Plan_the_Network">2.2.4.1. Carefully
Plan the Network</h4></div></div></div><a
id="d0e4806" class="indexterm"/><a id="d0e4811"
class="indexterm"/><div class="para">
Now that NFSv4 has the ability to pass all information encrypted using Kerberos over a
network, it is important that the service be configured correctly if it is behind a
firewall or on a segmented network. NFSv2 and NFSv3 still pass data insecurely, and this
should be taken into consideration. Careful network design in all of these regards can
help prevent security breaches.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NIS-Use_Kerberos_Authentication.html"><strong>Prev</strong>2.2.3.5. Use
Kerberos Authentication</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NFS-Beware_of_Syntax_Errors.html"><strong>Next</strong>2.2.4.2. Beware
of Syntax Errors</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_NIS.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
NIS</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"
title="2.2.2.2. Protect portmap With iptables"/><link rel="next"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"
title="2.2.3.2. Use a Password-like NIS Domain Name and
Hostname"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Con
tent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_NIS">2.2.3. Securing
NIS</h3></div></div></div><a id="d0e4499"
class="indexterm"/><a id="d0e4504"
class="indexterm"/><div class="para">
The <em class="firstterm">Network Information Service</em>
(<acronym class="acronym">NIS</acronym>) is an RPC service, called
<code class="command">ypserv</code>,--> which is used in
conjunction with <code class="command">portmap</code> and other
related services to distribute maps of usernames, passwords, and other sensitive
information to any computer claiming to be within its domain.
</div><div class="para">
An NIS server is comprised of several applications. They include the following:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">/usr/sbin/rpc.yppasswdd</code> — Also
called the <code class="command">yppasswdd</code> service, this
daemon allows users to change their NIS passwords.
</div></li><li><div class="para">
<code class="command">/usr/sbin/rpc.ypxfrd</code> — Also called
the <code class="command">ypxfrd</code> service, this daemon is
responsible for NIS map transfers over the network.
</div></li><li><div class="para">
<code class="command">/usr/sbin/yppush</code> — This
application propagates changed NIS databases to multiple NIS servers.
</div></li><li><div class="para">
<code class="command">/usr/sbin/ypserv</code> — This is the NIS
server daemon.
</div></li></ul></div><div class="para">
NIS is somewhat insecure by today's standards. It has no host authentication
mechanisms and transmits all of its information over the network unencrypted, including
password hashes. As a result, extreme care must be taken when setting up a network that
uses NIS. This is further complicated by the fact that the default configuration of NIS is
inherently insecure.
</div><div class="para">
It is recommended that anyone planning to implement an NIS server first secure the
<code class="command">portmap</code> service as outlined in <a
class="xref"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"
title="2.2.2. Securing Portmap">Section 2.2.2, “Securing Portmap”</a>,
then address the following issues, such as network planning.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_NIS-Carefully_Plan_the_Network">2.2.3.1. Carefully
Plan the Network</h4></div></div></div><a
id="d0e4568" class="indexterm"/><a id="d0e4573"
class="indexterm"/><div class="para">
Because NIS transmits sensitive information unencrypted over the network, it is
important the service be run behind a firewall and on a segmented and secure network.
Whenever NIS information is transmitted over an insecure network, it risks being
intercepted. Careful network design can help prevent severe security breaches.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"><strong>Prev</strong>2.2.2.2. Protect
portmap With iptables</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_NIS-Use_a_Password_like_NIS_Domain_Name_and_Hostname.html"><strong>Next</strong>2.2.3.2. Use
a Password-like NIS Domain Name and
...</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_Portmap.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Portmap</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="next"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"
title="2.2.2.2. Protect portmap With
iptables"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docna
v"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_Portmap">2.2.2. Securing
Portmap</h3></div></div></div><a id="d0e4408"
class="indexterm"/><div class="para">
The <code class="command">portmap</code> service is a dynamic
port assignment daemon for RPC services such as NIS and NFS. It has weak authentication
mechanisms and has the ability to assign a wide range of ports for the services it
controls. For these reasons, it is difficult to secure.
</div><div class="note"><h2>Note</h2><div
class="para">
Securing <code class="command">portmap</code> only affects NFSv2
and NFSv3 implementations, since NFSv4 no longer requires it. If you plan to implement an
NFSv2 or NFSv3 server, then <code class="command">portmap</code> is
required, and the following section applies.
</div></div><div class="para">
If running RPC services, follow these basic rules.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_TCP_Wrappers">2.2.2.1. Protect
portmap With TCP Wrappers</h4></div></div></div><a
id="d0e4435" class="indexterm"/><a id="d0e4441"
class="indexterm"/><div class="para">
It is important to use TCP Wrappers to limit which networks or hosts have access to
the <code class="command">portmap</code> service since it has no
built-in form of authentication.
</div><div class="para">
Further, use <span
class="emphasis"><em>only</em></span> IP addresses when
limiting access to the service. Avoid using hostnames, as they can be forged by DNS
poisoning and other methods.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Server_Security.html"><strong>Prev</strong>2.2. Server
Security</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Portmap-Protect_portmap_With_iptables.html"><strong>Next</strong>2.2.2.2. Protect
portmap With iptables</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_Sendmail.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Sendmail</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"
title="2.2.6.4. Use TCP Wrappers To Control Access"/><link
rel="next"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"
title="2.2.7.2. NFS and Sendmail"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_Sendmail">2.2.7. Securing
Sendmail</h3></div></div></div><a id="d0e5304"
class="indexterm"/><a id="d0e5309"
class="indexterm"/><div class="para">
Sendmail is a Mail Transport Agent (MTA) that uses the Simple Mail Transport Protocol
(SMTP) to deliver electronic messages between other MTAs and to email clients or delivery
agents. Although many MTAs are capable of encrypting traffic between one another, most do
not, so sending email over any public networks is considered an inherently insecure form
of communication.
</div><div class="para">
It is recommended that anyone planning to implement a Sendmail server address the
following issues.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Sendmail-Limiting_a_Denial_of_Service_Attack">2.2.7.1. Limiting
a Denial of Service Attack</h4></div></div></div><a
id="d0e5321" class="indexterm"/><a id="d0e5326"
class="indexterm"/><div class="para">
Because of the nature of email, a determined attacker can flood the server with mail
fairly easily and cause a denial of service. By setting limits to the following directives
in <code class="filename">/etc/mail/sendmail.mc</code>, the
effectiveness of such attacks is limited.
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">confCONNECTION_RATE_THROTTLE</code> —
The number of connections the server can receive per second. By default, Sendmail does not
limit the number of connections. If a limit is set and reached, further connections are
delayed.
</div></li><li><div class="para">
<code class="command">confMAX_DAEMON_CHILDREN</code> — The
maximum number of child processes that can be spawned by the server. By default, Sendmail
does not assign a limit to the number of child processes. If a limit is set and reached,
further connections are delayed.
</div></li><li><div class="para">
<code class="command">confMIN_FREE_BLOCKS</code> — The minimum
number of free blocks which must be available for the server to accept mail. The default
is 100 blocks.
</div></li><li><div class="para">
<code class="command">confMAX_HEADERS_LENGTH</code> — The
maximum acceptable size (in bytes) for a message header.
</div></li><li><div class="para">
<code class="command">confMAX_MESSAGE_SIZE</code> — The
maximum acceptable size (in bytes) for a single message.
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Securing_FTP-Use_TCP_Wrappers_To_Control_Access.html"><strong>Prev</strong>2.2.6.4. Use
TCP Wrappers To Control Access</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_Sendmail-NFS_and_Sendmail.html"><strong>Next</strong>2.2.7.2. NFS
and Sendmail</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the Apache HTTP Server</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"
title="2.2.4.3. Do Not Use the no_root_squash Option"/><link
rel="next"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"
title="2.2.5.2. The Indexes Directive"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/i
mages/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_the_Apache_HTTP_Server">2.2.5. Securing
the Apache HTTP Server</h3></div></div></div><a
id="d0e4898" class="indexterm"/><a id="d0e4903"
class="indexterm"/><div class="para">
The Apache HTTP Server is one of the most stable and secure services that ships with
Fedora. A large number of options and techniques are available to secure the Apache HTTP
Server — too numerous to delve into deeply here.
</div><div class="para">
System Administrators should be careful when using the following configuration
options:
</div><a id="d0e4912" class="indexterm"/><a
id="d0e4917" class="indexterm"/><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_the_Apache_HTTP_Server-FollowSymLinks">2.2.5.1. <code
class="command">FollowSymLinks</code></h4></div></div></div><div
class="para">
This directive is enabled by default, so be sure to use caution when creating symbolic
links to the document root of the Web server. For instance, it is a bad idea to provide a
symbolic link to <code class="filename">/</code>.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_NFS-Do_Not_Use_the_no_root_squash_Option.html"><strong>Prev</strong>2.2.4.3. Do
Not Use the no_root_squash Option</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Securing_the_Apache_HTTP_Server-The_Indexes_Directive.html"><strong>Next</strong>2.2.5.2. The
Indexes Directive</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Which Ports Are Listening</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security"/><link rel="prev"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"
title="2.2.7.3. Mail-only Users"/><link rel="next"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docna
v"><li class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening">2.2.8. Verifying
Which Ports Are Listening</h3></div></div></div><a
id="d0e5421" class="indexterm"/><a id="d0e5426"
class="indexterm"/><a id="d0e5433"
class="indexterm"/><a id="d0e5437"
class="indexterm"/><a id="d0e5441"
class="indexterm"/><a id="d0e5444"
class="indexterm"/><div class="para">
After configuring network services, it is important to pay attention to which ports are
actually listening on the system's network interfaces. Any open ports can be evidence
of an intrusion.
</div><div class="para">
There are two basic approaches for listing the ports that are listening on the network.
The less reliable approach is to query the network stack using commands such as <code
class="command">netstat -an</code> or <code
class="command">lsof -i</code>. This method is less reliable since
these programs do not connect to the machine from the network, but rather check to see
what is running on the system. For this reason, these applications are frequent targets
for replacement by attackers. Crackers attempt to cover their tracks if they open
unauthorized network ports by replacing <code
class="command">netstat</code> and <code
class="command">lsof</code> with their own, modified versions.
</div><div class="para">
A more reliable way to check which ports are listening on the network is to use a port
scanner such as <code class="command">nmap</code>.
</div><div class="para">
The following command issued from the console determines which ports are listening for
TCP connections from the network:
</div><pre class="screen">nmap -sT -O localhost
</pre><div class="para">
The output of this command appears as follows:
</div><pre class="screen">Starting nmap 3.55 (
http://www.insecure.org/nmap/ ) at 2004-09-24 13:49 EDT
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1653 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
113/tcp open auth
631/tcp open ipp
834/tcp open unknown
2601/tcp open zebra
32774/tcp open sometimes-rpc11
Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X OS details: Linux 2.5.25 - 2.6.3 or Gentoo 1.2 Linux
2.4.19 rc1-rc7)
Uptime 12.857 days (since Sat Sep 11 17:16:20 2004)
Nmap run completed -- 1 IP address (1 host up) scanned in 5.190 seconds
</pre><div class="para">
This output shows the system is running <code
class="command">portmap</code> due to the presence of the <code
class="computeroutput">sunrpc</code> service. However, there is also a
mystery service on port 834. To check if the port is associated with the official list of
known services, type:
</div><pre class="screen">cat /etc/services | grep 834
</pre><div class="para">
This command returns no output. This indicates that while the port is in the reserved
range (meaning 0 through 1023) and requires root access to open, it is not associated with
a known service.
</div><div class="para">
Next, check for information about the port using <code
class="command">netstat</code> or <code
class="command">lsof</code>. To check for port 834 using <code
class="command">netstat</code>, use the following command:
</div><pre class="screen">netstat -anp | grep 834
</pre><div class="para">
The command returns the following output:
</div><pre class="screen">tcp 0 0 0.0.0.0:834 0.0.0.0:*
LISTEN 653/ypbind
</pre><div class="para">
The presence of the open port in <code
class="command">netstat</code> is reassuring because a cracker opening
a port surreptitiously on a hacked system is not likely to allow it to be revealed through
this command. Also, the <code class="option">[p]</code> option
reveals the process ID (PID) of the service that opened the port. In this case, the open
port belongs to <code class="command">ypbind</code> (<abbr
class="abbrev">NIS</abbr>), which is an <abbr
class="abbrev">RPC</abbr> service handled in conjunction with the
<code class="command">portmap</code> service.
</div><div class="para">
The <code class="command">lsof</code> command reveals similar
information to <code class="command">netstat</code> since it is also
capable of linking open ports to services:
</div><pre class="screen">lsof -i | grep 834
</pre><div class="para">
The relevant portion of the output from this command follows:
</div><pre class="screen">ypbind 653 0 7u IPv4
1319 TCP *:834 (LISTEN)
ypbind 655 0 7u IPv4 1319 TCP *:834 (LISTEN)
ypbind 656 0 7u IPv4 1319 TCP *:834 (LISTEN)
ypbind 657 0 7u IPv4 1319 TCP *:834 (LISTEN)
</pre><div class="para">
These tools reveal a great deal about the status of the services running on a machine.
These tools are flexible and can provide a wealth of information about network services
and configuration. Refer to the man pages for <code
class="command">lsof</code>, <code
class="command">netstat</code>, <code
class="command">nmap</code>, and <code
class="filename">services</code> for more information.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Securing_Sendmail-Mail_only_Users.html"><strong>Prev</strong>2.2.7.3. Mail-only
Users</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO.html"><strong>Next</strong>2.3. Single
Sign-on (SSO)</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Server_Security.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Security</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="next"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"
title="2.2.2. Securing Portmap"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class=
"docnav"><li class="previous"><a accesskey="p"
href="chap-Security_Guide-Securing_Your_Network.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Server_Security">2.2. Server
Security</h2></div></div></div><a id="d0e3991"
class="indexterm"/><div class="para">
When a system is used as a server on a public network, it becomes a target for attacks.
Hardening the system and locking down services is therefore of paramount importance for
the system administrator.
</div><div class="para">
Before delving into specific issues, review the following general tips for enhancing
server security:
</div><div class="itemizedlist"><ul><li><div
class="para">
Keep all services current, to protect against the latest threats.
</div></li><li><div class="para">
Use secure protocols whenever possible.
</div></li><li><div class="para">
Serve only one type of network service per machine whenever possible.
</div></li><li><div class="para">
Monitor all servers carefully for suspicious activity.
</div></li></ul></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Server_Security-Securing_Services_With_TCP_Wrappers_and_xinetd">2.2.1. Securing
Services With TCP Wrappers and
xinetd</h3></div></div></div><div class="para">
<em class="firstterm">TCP Wrappers</em> provide access control to
a variety of services. Most modern network services, such as SSH, Telnet, and FTP, make
use of TCP Wrappers, which stand guard between an incoming request and the requested
service.
</div><div class="para">
The benefits offered by TCP Wrappers are enhanced when used in conjunction with
<code class="command">xinetd</code>, a super server that provides
additional access, logging, binding, redirection, and resource utilization control.
</div><div class="tip"><h2>Tip</h2><div
class="para">
It is a good idea to use iptables firewall rules in conjunction with TCP Wrappers and
<code class="command">xinetd</code> to create redundancy within
service access controls. Refer to <a class="xref"
href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls">Section 2.8, “Firewalls”</a> for more
information about implementing firewalls with iptables commands.
</div></div><div class="para">
The following subsections assume a basic knowledge of each topic and focus on specific
security options.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Services_With_TCP_Wrappers_and_xinetd-Enhancing_Security_With_TCP_Wrappers">2.2.1.1. Enhancing
Security With TCP Wrappers</h4></div></div></div><a
id="d0e4041" class="indexterm"/><div class="para">
TCP Wrappers are capable of much more than denying access to services. This section
illustrates how they can be used to send connection banners, warn of attacks from
particular hosts, and enhance logging functionality. Refer to the <code
class="filename">hosts_options</code> man page for information about
the TCP Wrapper functionality and control language.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Enhancing_Security_With_TCP_Wrappers-TCP_Wrappers_and_Connection_Banners">2.2.1.1.1. TCP
Wrappers and Connection Banners</h5></div></div></div><a
id="d0e4054" class="indexterm"/><a id="d0e4059"
class="indexterm"/><div class="para">
Displaying a suitable banner when users connect to a service is a good way to let
potential attackers know that the system administrator is being vigilant. You can also
control what information about the system is presented to users. To implement a TCP
Wrappers banner for a service, use the <code
class="option">banner</code> option.
</div><div class="para">
This example implements a banner for <code
class="command">vsftpd</code>. To begin, create a banner file. It can
be anywhere on the system, but it must have same name as the daemon. For this example, the
file is called <code class="filename">/etc/banners/vsftpd</code> and
contains the following line:
</div><pre class="screen"><code
class="computeroutput"> 220-Hello, %c 220-All activity on
ftp.example.com is
logged. 220-Inappropriate use will result in your access privileges being removed.
</code>
</pre><div class="para">
The <code class="command">%c</code> token supplies a variety of
client information, such as the username and hostname, or the username and IP address to
make the connection even more intimidating.
</div><div class="para">
For this banner to be displayed to incoming connections, add the following line to
the <code class="filename">/etc/hosts.allow</code> file:
</div><pre class="screen"><code class="command">
vsftpd : ALL : banners /etc/banners/ </code>
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Enhancing_Security_With_TCP_Wrappers-TCP_Wrappers_and_Attack_Warnings">2.2.1.1.2. TCP
Wrappers and Attack Warnings</h5></div></div></div><a
id="d0e4100" class="indexterm"/><a id="d0e4107"
class="indexterm"/><div class="para">
If a particular host or network has been detected attacking the server, TCP Wrappers
can be used to warn the administrator of subsequent attacks from that host or network
using the <code class="command">spawn</code> directive.
</div><div class="para">
In this example, assume that a cracker from the 206.182.68.0/24 network has been
detected attempting to attack the server. Place the following line in the <code
class="filename">/etc/hosts.deny</code> file to deny any connection
attempts from that network, and to log the attempts to a special file:
</div><pre class="screen"><code class="command">
ALL : 206.182.68.0 : spawn /bin/ 'date' %c %d >>
/var/log/intruder_alert </code>
</pre><div class="para">
The <code class="command">%d</code> token supplies the name of
the service that the attacker was trying to access.
</div><div class="para">
To allow the connection and log it, place the <code
class="command">spawn</code> directive in the <code
class="filename">/etc/hosts.allow</code> file.
</div><div class="note"><h2>Note</h2><div
class="para">
Because the <code class="command">spawn</code> directive
executes any shell command, create a special script to notify the administrator or execute
a chain of commands in the event that a particular client attempts to connect to the
server.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Enhancing_Security_With_TCP_Wrappers-TCP_Wrappers_and_Enhanced_Logging">2.2.1.1.3. TCP
Wrappers and Enhanced Logging</h5></div></div></div><a
id="d0e4150" class="indexterm"/><a id="d0e4155"
class="indexterm"/><div class="para">
If certain types of connections are of more concern than others, the log level can be
elevated for that service using the <code
class="command">severity</code> option.
</div><div class="para">
For this example, assume that anyone attempting to connect to port 23 (the Telnet
port) on an FTP server is a cracker. To denote this, place an <code
class="command">emerg</code> flag in the log files instead of the
default flag, <code class="command">info</code>, and deny the
connection.
</div><div class="para">
To do this, place the following line in <code
class="filename">/etc/hosts.deny</code>:
</div><pre class="screen"><code class="command">
in.telnetd : ALL : severity emerg </code>
</pre><div class="para">
This uses the default <code class="command">authpriv</code>
logging facility, but elevates the priority from the default value of <code
class="command">info</code> to <code
class="command">emerg</code>, which posts log messages directly to the
console.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Securing_Services_With_TCP_Wrappers_and_xinetd-Enhancing_Security_With_xinetd">2.2.1.2. Enhancing
Security With xinetd</h4></div></div></div><a
id="d0e4198" class="indexterm"/><div class="para">
This section focuses on using <code
class="command">xinetd</code> to set a trap service and using it to
control resource levels available to any given <code
class="command">xinetd</code> service. Setting resource limits for
services can help thwart <em class="firstterm">Denial of
Service</em> (<acronym class="acronym">DoS</acronym>) attacks.
Refer to the man pages for <code class="command">xinetd</code> and
<code class="filename">xinetd.conf</code> for a list of available
options.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Enhancing_Security_With_xinetd-Setting_a_Trap">2.2.1.2.1. Setting
a Trap</h5></div></div></div><a id="d0e4227"
class="indexterm"/><a id="d0e4233"
class="indexterm"/><div class="para">
One important feature of <code class="command">xinetd</code> is
its ability to add hosts to a global <code
class="filename">no_access</code> list. Hosts on this list are denied
subsequent connections to services managed by <code
class="command">xinetd</code> for a specified period or until <code
class="command">xinetd</code> is restarted. You can do this using the
<code class="command">SENSOR</code> attribute. This is an easy way
to block hosts attempting to scan the ports on the server.
</div><div class="para">
The first step in setting up a <code
class="command">SENSOR</code> is to choose a service you do not plan on
using. For this example, Telnet is used.
</div><div class="para">
Edit the file <code
class="filename">/etc/xinetd.d/telnet</code> and change the <code
class="option">flags</code> line to read:
</div><pre class="screen">flags = SENSOR
</pre><div class="para">
Add the following line:
</div><pre class="screen">deny_time = 30
</pre><div class="para">
This denies any further connection attempts to that port by that host for 30 minutes.
Other acceptable values for the <code
class="command">deny_time</code> attribute are FOREVER, which keeps the
ban in effect until <code class="command">xinetd</code> is
restarted, and NEVER, which allows the connection and logs it.
</div><div class="para">
Finally, the last line should read:
</div><pre class="screen">disable = no
</pre><div class="para">
This enables the trap itself.
</div><div class="para">
While using <code class="option">SENSOR</code> is a good way to
detect and stop connections from undesirable hosts, it has two drawbacks:
</div><div class="itemizedlist"><ul><li><div
class="para">
It does not work against stealth scans.
</div></li><li><div class="para">
An attacker who knows that a <code
class="option">SENSOR</code> is running can mount a Denial of Service
attack against particular hosts by forging their IP addresses and connecting to the
forbidden port.
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Enhancing_Security_With_xinetd-Controlling_Server_Resources">2.2.1.2.2. Controlling
Server Resources</h5></div></div></div><a
id="d0e4309" class="indexterm"/><a id="d0e4315"
class="indexterm"/><a id="d0e4323"
class="indexterm"/><a id="d0e4329"
class="indexterm"/><div class="para">
Another important feature of <code
class="command">xinetd</code> is its ability to set resource limits for
services under its control.
</div><div class="para">
It does this using the following directives:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">cps = <number_of_connections>
<wait_period></code> — Limits the rate of incoming connections. This
directive takes two arguments:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code
class="option"><number_of_connections></code> — The
number of connections per second to handle. If the rate of incoming connections is higher
than this, the service is temporarily disabled. The default value is fifty (50).
</div></li><li><div class="para">
<code class="option"><wait_period></code> —
The number of seconds to wait before re-enabling the service after it has been disabled.
The default interval is ten (10) seconds.
</div></li></ul></div></li><li><div
class="para">
<code class="option">instances =
<number_of_connections></code> — Specifies the total number of
connections allowed to a service. This directive accepts either an integer value or
<code class="command">UNLIMITED</code>.
</div></li><li><div class="para">
<code class="option">per_source =
<number_of_connections></code> — Specifies the number of connections
allowed to a service by each host. This directive accepts either an integer value or
<code class="command">UNLIMITED</code>.
</div></li><li><div class="para">
<code class="option">rlimit_as =
<number[K|M]></code> — Specifies the amount of memory address space
the service can occupy in kilobytes or megabytes. This directive accepts either an integer
value or <code class="command">UNLIMITED</code>.
</div></li><li><div class="para">
<code class="option">rlimit_cpu =
<number_of_seconds></code> — Specifies the amount of time in seconds
that a service may occupy the CPU. This directive accepts either an integer value or
<code class="command">UNLIMITED</code>.
</div></li></ul></div><div class="para">
Using these directives can help prevent any single <code
class="command">xinetd</code> service from overwhelming the system,
resulting in a denial of service.
</div></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="chap-Security_Guide-Securing_Your_Network.html"><strong>Prev</strong>Chapter 2. Securing
Your Network</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Server_Security-Securing_Portmap.html"><strong>Next</strong>2.2.2. Securing
Portmap</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Firefox to use Kerberos for SSO</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/><link rel="prev"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"
title="2.3.4. How Smart Card Login Works"/><link rel="next"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules
(PAM)"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/i
mages/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO">2.3.5. Configuring
Firefox to use Kerberos for SSO</h3></div></div></div><div
class="para">
You can configure Firefox to use Kerberos for Single Sign-on. In order for this
functionality to work correctly, you need to configure your web browser to send your
Kerberos credentials to the appropriate <abbr
class="abbrev">KDC</abbr>.The following section describes the
configuration changes and other requirements to achieve this.
</div><div class="orderedlist"><ol><li><div
class="para">
In the address bar of Firefox, type <strong
class="userinput"><code>about:config</code></strong> to
display the list of current configuration options.
</div></li><li><div class="para">
In the <span
class="guilabel"><strong>Filter</strong></span> field, type
<strong
class="userinput"><code>negotiate</code></strong> to
restrict the list of options.
</div></li><li><div class="para">
Double-click the <span
class="emphasis"><em>network.negotiate-auth.trusted-uris</em></span>
entry to display the <span class="emphasis"><em>Enter string
value</em></span> dialog box.
</div></li><li><div class="para">
Enter the name of the domain against which you want to authenticate, for example,
<em class="replaceable"><code>.example.com</code></em>.
</div></li><li><div class="para">
Repeat the above procedure for the <span
class="emphasis"><em>network.negotiate-auth.delegation-uris</em></span>
entry, using the same domain.
</div><div class="para">
<div class="note"><h2>Note</h2><div
class="para">
You can leave this value blank, as it allows Kerberos ticket passing, which is not
required.
</div><div class="para">
If you do not see these two configuration options listed, your version of Firefox
may be too old to support Negotiate authentication, and you should consider upgrading.
</div></div>
</div></li></ol></div><div class="figure"
id="figu-Security_Guide-Configuring_Firefox_to_use_Kerberos_for_SSO-Configuring_Firefox_for_SSO_with_Kerberos"><div
class="figure-contents"><div class="mediaobject"><img
src="images/FirefoxWithKerberosSSO.png" alt="Configuring Firefox for SSO
with Kerberos"/><div class="longdesc"><div
class="para">
Configuring Firefox to use Kerberos for SSO.
</div></div></div></div><h6>Figure 2.6. Configuring
Firefox for SSO with Kerberos</h6></div><br
class="figure-break"/><div class="para">
You now need to ensure that you have Kerberos tickets. In a command shell, type
<code class="command">kinit</code> to retrieve Kerberos tickets. To
display the list of available tickets, type <code
class="command">klist</code>. The following shows an example output
from these commands:
</div><pre class="screen">[user@host ~] $ kinit
Password for user(a)EXAMPLE.COM:
[user@host ~] $ klist
Ticket cache: FILE:/tmp/krb5cc_10920
Default principal: user(a)EXAMPLE.COM
Valid starting Expires Service principal
10/26/06 23:47:54 10/27/06 09:47:54 krbtgt/USER.COM(a)USER.COM
renew until 10/26/06 23:47:54
Kerberos 4 ticket cache: /tmp/tkt10920
klist: You have no tickets cached
</pre><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Configuring_Firefox_to_use_Kerberos_for_SSO-Troubleshooting">2.3.5.1. Troubleshooting</h4></div></div></div><div
class="para">
If you have followed the configuration steps above and Negotiate authentication is not
working, you can turn on verbose logging of the authentication process. This could help
you find the cause of the problem. To enable verbose logging, use the following
procedure:
</div><div class="orderedlist"><ol><li><div
class="para">
Close all instances of Firefox.
</div></li><li><div class="para">
Open a command shell, and enter the following commands:
</div><pre class="screen">export
NSPR_LOG_MODULES=negotiateauth:5
export NSPR_LOG_FILE=/tmp/moz.log
</pre></li><li><div class="para">
Restart Firefox <span class="emphasis"><em>from that
shell</em></span>, and visit the website you were unable to authenticate to
earlier. Information will be logged to <code
class="filename">/tmp/moz.log</code>, and may give a clue to the
problem. For example:
</div><pre class="screen">-1208550944[90039d0]: entering
nsNegotiateAuth::GetNextToken()
-1208550944[90039d0]: gss_init_sec_context() failed: Miscellaneous failure
No credentials cache found
</pre><div class="para">
This indicates that you do not have Kerberos tickets, and need to run <code
class="command">kinit</code>.
</div></li></ol></div><div class="para">
If you are able to run <code class="command">kinit</code>
successfully from your machine but you are unable to authenticate, you might see something
like this in the log file:
</div><pre class="screen">-1208994096[8d683d8]: entering
nsAuthGSSAPI::GetNextToken()
-1208994096[8d683d8]: gss_init_sec_context() failed: Miscellaneous failure
Server not found in Kerberos database
</pre><div class="para">
This generally indicates a Kerberos configuration problem. Make sure that you have the
correct entries in the [domain_realm] section of the <code
class="filename">/etc/krb5.conf</code> file. For example:
</div><pre
class="screen">.example.com =
EXAMPLE.COM
example.com =
EXAMPLE.COM
</pre><div class="para">
If nothing appears in the log it is possible that you are behind a proxy, and that
proxy is stripping off the HTTP headers required for Negotiate authentication. As a
workaround, you can try to connect to the server using HTTPS instead, which allows the
request to pass through unmodified. Then proceed to debug using the log file, as described
above.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"><strong>Prev</strong>2.3.4. How
Smart Card Login Works</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"><strong>Next</strong>2.4. Pluggable
Authentication Modules (PAM)</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Started with your new Smart Card</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/><link rel="prev"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/><link rel="next"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"
title="2.3.3. How Smart Card Enrollment
Works"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="D
ocumentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card">2.3.2. Getting
Started with your new Smart Card</h3></div></div></div><div
class="para">
Before you can use your smart card to log in to your system and take advantage of the
increased security options this technology provides, you need to perform some basic
installation and configuration steps. These are described below.
</div><div class="note"><h2>Note</h2><div
class="para">
This section provides a high-level view of getting started with your smart card. More
detailed information is available in the Red Hat Certificate System Enterprise Security
Client Guide.
</div></div><div class="procedure"><ol
class="1"><li><div class="para">
Log in with your Kerberos name and password
</div></li><li><div class="para">
Make sure you have the <code class="filename">nss-tools</code>
package loaded.
</div></li><li><div class="para">
Download and install your corporate-specific root certificates. Use the following
command to install the root CA certificate:
</div><pre class="screen">certutil -A -d /etc/pki/nssdb -n
"root ca cert" -t "CT,C,C" -i ./ca_cert_in_base64_format.crt
</pre></li><li><div class="para">
Verify that you have the following RPMs installed on your system: esc, pam_pkcs11,
coolkey, ifd-egate, ccid, gdm, authconfig, and authconfig-gtk.
</div></li><li><div class="para">
Enable Smart Card Login Support
</div><ol class="a"><li><div
class="para">
On the Gnome Title Bar, select
System->Administration->Authentication.
</div></li><li><div class="para">
Type your machine's root password if necessary.
</div></li><li><div class="para">
In the Authentication Configuration dialog, click the <span
class="guilabel"><strong>Authentication</strong></span>
tab.
</div></li><li><div class="para">
Select the <span class="guilabel"><strong>Enable Smart Card
Support</strong></span> check box.
</div></li><li><div class="para">
Click the <span class="guibutton"><strong>Configure Smart
Card...</strong></span> button to display the Smartcard Settings dialog, and
specify the required settings:
</div><div class="para">
<div class="itemizedlist"><ul><li><div
class="para">
<span class="guilabel"><strong>Require smart card for
login</strong></span> — Clear this check box. After you have successfully
logged in with the smart card you can select this option to prevent users from logging in
without a smart card.
</div></li><li><div class="para">
<span class="guilabel"><strong>Card Removal
Action</strong></span> — This controls what happens when you remove the smart
card after you have logged in. The available options are:
</div><div class="para">
<div class="itemizedlist"><ul><li><div
class="para">
<span
class="guilabel"><strong>Lock</strong></span> — Removing
the smart card locks the X screen.
</div></li><li><div class="para">
<span
class="guilabel"><strong>Ignore</strong></span> — Removing
the smart card has no effect.
</div></li></ul></div>
</div></li></ul></div>
</div></li></ol></li><li><div
class="para">
If you need to enable the Online Certificate Status Protocol (<abbr
class="abbrev">OCSP</abbr>), open the <code
class="filename">/etc/pam_pkcs11/pam_pkcs11.conf</code> file, and
locate the following line:
</div><div class="para">
<code class="command">enable_ocsp = false;</code>
</div><div class="para">
Change this value to true, as follows:
</div><div class="para">
<code class="command">enable_ocsp = true;</code>
</div></li><li><div class="para">
Enroll your smart card
</div></li><li><div class="para">
If you are using a CAC card, you also need to perform the following steps:
</div><ol class="a"><li><div
class="para">
Change to the root account and create a file called <code
class="filename">/etc/pam_pkcs11/cn_map</code>.
</div></li><li><div class="para">
Add the following entry to the <code
class="filename">cn_map</code> file:
</div><div class="para">
<em
class="replaceable"><code>MY.CAC_CN.123454</code></em>
-> <em
class="replaceable"><code>myloginid</code></em>
</div><div class="para">
where <em
class="replaceable"><code>MY.CAC_CN.123454</code></em> is
the Common Name on your CAC and <em
class="replaceable"><code>myloginid</code></em> is your
UNIX login ID.
</div></li></ol></li><li><div
class="para">
Logout
</div></li></ol></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Getting_Started_with_your_new_Smart_Card-Troubleshooting">2.3.2.1. Troubleshooting</h4></div></div></div><div
class="para">
If you have trouble getting your smart card to work, try using the following command
to locate the source of the problem:
</div><pre class="screen">pklogin_finder debug
</pre><div class="para">
If you run the <code class="command">pklogin_finder</code> tool
in debug mode while an enrolled smart card is plugged in, it attempts to output
information about the validity of certificates, and if it is successful in attempting to
map a login ID from the certificates that are on the card.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO.html"><strong>Prev</strong>2.3. Single
Sign-on (SSO)</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"><strong>Next</strong>2.3.3. How
Smart Card Enrollment Works</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Smart Card Enrollment Works</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/><link rel="prev"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"
title="2.3.2. Getting Started with your new Smart Card"/><link
rel="next"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"
title="2.3.4. How Smart Card Login Works"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="C
ommon_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works">2.3.3. How
Smart Card Enrollment Works</h3></div></div></div><div
class="para">
Smart cards are said to be <em class="firstterm">enrolled</em>
when they have received an appropriate certificate signed by a valid Certificate Authority
(<abbr class="abbrev">CA</abbr>). This involves several steps,
described below:
</div><div class="orderedlist"><ol><li><div
class="para">
The user inserts their smart card into the smart card reader on their workstation.
This event is recognized by the Enterprise Security Client (<abbr
class="abbrev">ESC</abbr>).
</div></li><li><div class="para">
The enrollment page is displayed on the user's desktop. The user completes the
required details and the user's system then connects to the Token Processing System
(<abbr class="abbrev">TPS</abbr>) and the <abbr
class="abbrev">CA</abbr>.
</div></li><li><div class="para">
The <abbr class="abbrev">TPS</abbr> enrolls the smart card
using a certificate signed by the <abbr class="abbrev">CA</abbr>.
</div></li></ol></div><div class="figure"
id="figu-Security_Guide-How_Smart_Card_Enrollment_Works-How_Smart_Card_Enrollment_Works"><div
class="figure-contents"><div class="mediaobject"><img
src="images/SCLoginEnrollment.png" alt="How Smart Card Enrollment
Works"/><div class="longdesc"><div class="para">
How Smart Card Enrollment Works.
</div></div></div></div><h6>Figure 2.4. How Smart Card
Enrollment Works</h6></div><br
class="figure-break"/></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"><strong>Prev</strong>2.3.2. Getting
Started with your new Smart Card</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html"><strong>Next</strong>2.3.4. How
Smart Card Login Works</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Smart Card Login Works</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Single_Sign_on_SSO.html" title="2.3. Single
Sign-on (SSO)"/><link rel="prev"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"
title="2.3.3. How Smart Card Enrollment Works"/><link rel="next"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"
title="2.3.5. Configuring Firefox to use Kerberos for
SSO"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org">
<img src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Login_Works">2.3.4. How
Smart Card Login Works</h3></div></div></div><div
class="para">
This section provides a brief overview of the process of logging in using a smart
card.
</div><div class="orderedlist"><ol><li><div
class="para">
When the user inserts their smart card into the smart card reader, this event is
recognized by the PAM facility, which prompts for the user's PIN.
</div></li><li><div class="para">
The system then looks up the user's current certificates and verifies their
validity. The certificate is then mapped to the user's UID.
</div></li><li><div class="para">
This is validated against the KDC and login granted.
</div></li></ol></div><div class="figure"
id="figu-Security_Guide-How_Smart_Card_Login_Works-How_Smart_Card_Login_Works"><div
class="figure-contents"><div class="mediaobject"><img
src="images/SCLogin.png" alt="How Smart Card Login Works"/><div
class="longdesc"><div class="para">
How Smart Card Login Works.
</div></div></div></div><h6>Figure 2.5. How Smart Card
Login Works</h6></div><br class="figure-break"/><div
class="note"><h2>Note</h2><div class="para">
You cannot log in with a card that has not been enrolled, even if it has been
formatted. You need to log in with a formatted, enrolled card, or not using a smart card,
before you can enroll a new card.
</div></div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Kerberos.html"
title="2.6. Kerberos">Section 2.6, “Kerberos”</a> and <a
class="xref"
href="sect-Security_Guide-Pluggable_Authentication_Modules_PAM.html"
title="2.4. Pluggable Authentication Modules (PAM)">Section 2.4, “Pluggable
Authentication Modules (PAM)”</a> for more information on Kerberos and <acronym
class="acronym">PAM</acronym>.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Single_Sign_on_SSO-How_Smart_Card_Enrollment_Works.html"><strong>Prev</strong>2.3.3. How
Smart Card Enrollment Works</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-Configuring_Firefox_to_use_Kerberos_for_SSO.html"><strong>Next</strong>2.3.5. Configuring
Firefox to use Kerberos for SSO</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Single_Sign_on_SSO.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Sign-on (SSO)</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"
title="2.2.8. Verifying Which Ports Are Listening"/><link
rel="next"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"
title="2.3.2. Getting Started with your new Smart
Card"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org
"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO">2.3. Single Sign-on
(SSO)</h2></div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Single_Sign_on_SSO-Introduction">2.3.1. Introduction</h3></div></div></div><div
class="para">
The Fedora SSO functionality reduces the number of times Fedora desktop users have to
enter their passwords. Several major applications leverage the same underlying
authentication and authorization mechanisms so that users can log in to Fedora from the
log-in screen, and then not need to re-enter their passwords. These applications are
detailed below.
</div><div class="para">
In addition, users can log in to their machines even when there is no network (<em
class="firstterm">offline mode</em>) or where network connectivity is
unreliable, for example, wireless access. In the latter case, services will degrade
gracefully.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Introduction-Supported_Applications">2.3.1.1. Supported
Applications</h4></div></div></div><div
class="para">
The following applications are currently supported by the unified log-in scheme in
Fedora:
</div><div class="itemizedlist"><ul><li><div
class="para">
Login
</div></li><li><div class="para">
Screensaver
</div></li><li><div class="para">
Firefox and Thunderbird
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Introduction-Supported_Authentication_Mechanisms">2.3.1.2. Supported
Authentication Mechanisms</h4></div></div></div><div
class="para">
Fedora currently supports the following authentication mechanisms:
</div><div class="itemizedlist"><ul><li><div
class="para">
Kerberos name/password login
</div></li><li><div class="para">
Smart card/PIN login
</div></li></ul></div></div><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Introduction-Supported_Smart_Cards">2.3.1.3. Supported
Smart Cards</h4></div></div></div><div
class="para">
Fedora has been tested with the Cyberflex e-gate card and reader, but any card that
complies with both Java card 2.1.1 and Global Platform 2.0.1 specifications should operate
correctly, as should any reader that is supported by PCSC-lite.
</div><div class="para">
Fedora has also been tested with Common Access Cards (CAC). The supported reader for
CAC is the SCM SCR 331 USB Reader.
</div><div class="para">
As of Fedora 5.2, Gemalto smart cards (Cyberflex Access 64k v2, standard with DER SHA1
value configured as in PKCSI v2.1) are now supported. These smart cards now use readers
compliant with Chip/Smart Card Interface Devices (CCID).
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Introduction-Advantages_of_PROD_Single_Sign_on">2.3.1.4. Advantages
of Fedora Single Sign-on</h4></div></div></div><div
class="para">
Numerous security mechanisms currently exist that utilize a large number of protocols
and credential stores. Examples include SSL, SSH, IPsec, and Kerberos. Fedora SSO aims to
unify these schemes to support the requirements listed above. This does not mean replacing
Kerberos with X.509v3 certificates, but rather uniting them to reduce the burden on both
system users and the administrators who manage them.
</div><div class="para">
To achieve this goal, Fedora:
</div><div class="itemizedlist"><ul><li><div
class="para">
Provides a single, shared instance of the NSS crypto libraries on each operating
system.
</div></li><li><div class="para">
Ships the Certificate System's Enterprise Security Client (ESC) with the base
operating system. The ESC application monitors smart card insertion events. If it detects
that the user has inserted a smart card that was designed to be used with the Fedora
Certificate System server product, it displays a user interface instructing the user how
to enroll that smart card.
</div></li><li><div class="para">
Unifies Kerberos and NSS so that users who log in to the operating system using a
smart card also obtain a Kerberos credential (which allows them to log in to file servers,
etc.)
</div></li></ul></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Server_Security-Verifying_Which_Ports_Are_Listening.html"><strong>Prev</strong>2.2.8. Verifying
Which Ports Are Listening</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Single_Sign_on_SSO-Getting_Started_with_your_new_Smart_Card.html"><strong>Next</strong>2.3.2. Getting
Started with your new Smart
Card</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Signed Packages from Well Known Repositories</title><link
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Software_Maintenance.html"
title="Chapter 6. Software Maintenance"/><link rel="prev"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"
title="6.3. Adjusting Automatic Updates"/><link rel="next"
href="chap-Security_Guide-References.html"
title="Chapter 7. References"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Co
ntent/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-References.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories">6.4. Install
Signed Packages from Well Known
Repositories</h2></div></div></div><div
class="para">
Software packages are published through repositories. All well known repositories
support package signing. Package signing uses public key technology to prove that the
package that was published by the repository has not been changed since the signature was
applied. This provides some protection against installing software that may have been
maliciously altered after the package was created but before you downloaded it.
</div><div class="para">
Using too many repositories, untrustworthy repositories, or repositories with unsigned
packages has a higher risk of introducing malicious or vulnerable code into your system.
Use caution when adding repositories to yum/software update.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"><strong>Prev</strong>6.3. Adjusting
Automatic Updates</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="chap-Security_Guide-References.html"><strong>Next</strong>Chapter 7. References</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Automatic Updates</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Software_Maintenance.html"
title="Chapter 6. Software Maintenance"/><link rel="prev"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"
title="6.2. Plan and Configure Security Updates"/><link
rel="next"
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html"
title="6.4. Install Signed Packages from Well Known
Repositories"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" hre
f="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates">6.3. Adjusting
Automatic Updates</h2></div></div></div><div
class="para">
Fedora 9 is configured to apply all updates on a daily schedule. If you want to change
the how your system installs updates you must do so via '''Software Update
Preferences'''. You can change the schedule, the type of updates to apply or
to notify you of available updates.
</div><div class="para">
In Gnome, you can find controls for your updates at: <code
class="code">System -> Preferences -> System -> Software
Updates</code>. In KDE it is located at: <code
class="code">Applications -> Settings -> Software
Updates</code>.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html"><strong>Prev</strong>6.2. Plan
and Configure Security Updates</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Install_Signed_Packages_from_Well_Known_Repositories.html"><strong>Next</strong>6.4. Install
Signed Packages from Well Known
Repo...</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... and
Configure Security Updates</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Software_Maintenance.html"
title="Chapter 6. Software Maintenance"/><link rel="prev"
href="chap-Security_Guide-Software_Maintenance.html"
title="Chapter 6. Software Maintenance"/><link rel="next"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"
title="6.3. Adjusting Automatic Updates"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common
_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Software_Maintenance.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates">6.2. Plan
and Configure Security Updates</h2></div></div></div><div
class="para">
All software contains bugs. Often, these bugs can result in a vulnerability that can
expose your system to malicious users. Unpatched systems are a common cause of computer
intrusions. You should have a plan to install security patches in a timely manner to close
those vulnerabilities so they can not be exploited.
</div><div class="para">
For home users, security updates should be installed as soon as possible. Configuring
automatic installation of security updates is one way to avoid having to remember, but
does carry a slight risk that something can cause a conflict with your configuration or
with other software on the system.
</div><div class="para">
For business or advanced home users, security updates should be tested and schedule for
installation. Additional controls will need to be used to protect the system during the
time between the patch release and its installation on the system. These controls would
depend on the exact vulnerability, but could include additional firewall rules, the use of
external firewalls, or changes in software settings.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Software_Maintenance.html"><strong>Prev</strong>Chapter 6. Software
Maintenance</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Software_Maintenance-Plan_and_Configure_Security_Updates-Adjusting_Automatic_Updates.html"><strong>Next</strong>6.3. Adjusting
Automatic Updates</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Fields</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"
title="2.5.2. TCP Wrappers Configuration Files"/><link
rel="prev"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"
title="2.5.2. TCP Wrappers Configuration Files"/><link
rel="next"
href="sect-Security_Guide-Option_Fields-Access_Control.html"
title="2.5.2.2.2. Access Control"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="C
ommon_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Access_Control.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields">2.5.2.2. Option
Fields</h4></div></div></div><a id="d0e7854"
class="indexterm"/><div class="para">
In addition to basic rules that allow and deny access, the Fedora implementation of
TCP Wrappers supports extensions to the access control language through <em
class="firstterm">option fields</em>. By using option fields in hosts
access rules, administrators can accomplish a variety of tasks such as altering log
behavior, consolidating access control, and launching shell commands.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Option_Fields-Logging">2.5.2.2.1. Logging</h5></div></div></div><a
id="d0e7869" class="indexterm"/><div class="para">
Option fields let administrators easily change the log facility and priority level
for a rule by using the <code class="option">severity</code>
directive.
</div><div class="para">
In the following example, connections to the SSH daemon from any host in the <code
class="systemitem">example.com</code> domain are logged to the default
<code class="option">authpriv</code> <code
class="option">syslog</code> facility (because no facility value is
specified) with a priority of <code class="option">emerg</code>:
</div><pre class="screen">sshd : .example.com : severity emerg
</pre><div class="para">
It is also possible to specify a facility using the <code
class="option">severity</code> option. The following example logs any
SSH connection attempts by hosts from the <code
class="systemitem">example.com</code> domain to the <code
class="option">local0</code> facility with a priority of <code
class="option">alert</code>:
</div><pre class="screen">sshd : .example.com : severity
local0.alert
</pre><div class="note"><h2>Note</h2><div
class="para">
In practice, this example does not work until the syslog daemon (<code
class="systemitem">syslogd</code>) is configured to log to the <code
class="command">local0</code> facility. Refer to the <code
class="filename">syslog.conf</code> man page for information about
configuring custom log facilities.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"><strong>Prev</strong>2.5.2. TCP
Wrappers Configuration Files</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Option_Fields-Access_Control.html"><strong>Next</strong>2.5.2.2.2. Access
Control</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Resources</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/><link rel="prev"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"
title="2.5.4.3.4. Resource Management Options"/><link rel="next"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"
title="2.5.5.2. Useful TCP Wrappers Websites"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="C
ommon_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd-Additional_Resources">2.5.5. Additional
Resources</h3></div></div></div><a id="d0e8998"
class="indexterm"/><div class="para">
More information about TCP Wrappers and <code
class="systemitem">xinetd</code> is available from system documentation
and on the Internet.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Additional_Resources-Installed_TCP_Wrappers_Documentation">2.5.5.1. Installed
TCP Wrappers Documentation</h4></div></div></div><a
id="d0e9011" class="indexterm"/><a id="d0e9018"
class="indexterm"/><div class="para">
The documentation on your system is a good place to start looking for additional
configuration options for TCP Wrappers, <code
class="systemitem">xinetd</code>, and access control.
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="filename">/usr/share/doc/tcp_wrappers-<em
class="replaceable"><code><version></code></em>/</code>
— This directory contains a <code class="filename">README</code>
file that discusses how TCP Wrappers work and the various hostname and host address
spoofing risks that exist.
</div></li><li><div class="para">
<code class="filename">/usr/share/doc/xinetd-<em
class="replaceable"><code><version></code></em>/</code>
— This directory contains a <code class="filename">README</code>
file that discusses aspects of access control and a <code
class="filename">sample.conf</code> file with various ideas for
modifying service-specific configuration files in the <code
class="filename">/etc/xinetd.d/</code> directory.
</div></li><li><div class="para">
TCP Wrappers and <code
class="systemitem">xinetd</code>-related man pages — A number of man
pages exist for the various applications and configuration files involved with TCP
Wrappers and <code class="systemitem">xinetd</code>. The following
are some of the more important man pages:
</div><div class="variablelist"><dl><dt><span
class="term">Server Applications</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man xinetd</code> — The man page
for <code class="systemitem">xinetd</code>.
</div></li></ul></div></dd><dt><span
class="term">Configuration Files</span></dt><dd><div
class="itemizedlist"><ul><li><div class="para">
<code class="command">man 5 hosts_access</code> — The man
page for the TCP Wrappers hosts access control files.
</div></li><li><div class="para">
<code class="command">man hosts_options</code> — The man
page for the TCP Wrappers options fields.
</div></li><li><div class="para">
<code class="command">man xinetd.conf</code> — The man
page listing <code class="systemitem">xinetd</code> configuration
options.
</div></li></ul></div></dd></dl></div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Resource_Management_Options.html"><strong>Prev</strong>2.5.4.3.4. Resource
Management Options</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Additional_Resources-Useful_TCP_Wrappers_Websites.html"><strong>Next</strong>2.5.5.2. Useful
TCP Wrappers Websites</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Wrappers Configuration Files</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/><link rel="prev"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/><link rel="next"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files">2.5.2. TCP
Wrappers Configuration Files</h3></div></div></div><a
id="d0e7335" class="indexterm"/><a id="d0e7343"
class="indexterm"/><a id="d0e7351"
class="indexterm"/><a id="d0e7357"
class="indexterm"/><a id="d0e7363"
class="indexterm"/><div class="para">
To determine if a client is allowed to connect to a service, TCP Wrappers reference the
following two files, which are commonly referred to as <em
class="firstterm">hosts access</em> files:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="filename">/etc/hosts.allow</code>
</div></li><li><div class="para">
<code class="filename">/etc/hosts.deny</code>
</div></li></ul></div><div class="para">
When a TCP-wrapped service receives a client request, it performs the following steps:
</div><div class="orderedlist"><ol><li><div
class="para">
<span class="emphasis"><em>It references <code
class="filename">/etc/hosts.allow</code>.</em></span> — The
TCP-wrapped service sequentially parses the <code
class="filename">/etc/hosts.allow</code> file and applies the first
rule specified for that service. If it finds a matching rule, it allows the connection. If
not, it moves on to the next step.
</div></li><li><div class="para">
<span class="emphasis"><em>It references <code
class="filename">/etc/hosts.deny</code>.</em></span> — The
TCP-wrapped service sequentially parses the <code
class="filename">/etc/hosts.deny</code> file. If it finds a matching
rule, it denies the connection. If not, it grants access to the service.
</div></li></ol></div><div class="para">
The following are important points to consider when using TCP Wrappers to protect
network services:
</div><div class="itemizedlist"><ul><li><div
class="para">
Because access rules in <code
class="filename">hosts.allow</code> are applied first, they take
precedence over rules specified in <code
class="filename">hosts.deny</code>. Therefore, if access to a service
is allowed in <code class="filename">hosts.allow</code>, a rule
denying access to that same service in <code
class="filename">hosts.deny</code> is ignored.
</div></li><li><div class="para">
The rules in each file are read from the top down and the first matching rule for a
given service is the only one applied. The order of the rules is extremely important.
</div></li><li><div class="para">
If no rules for the service are found in either file, or if neither file exists,
access to the service is granted.
</div></li><li><div class="para">
TCP-wrapped services do not cache the rules from the hosts access files, so any
changes to <code class="filename">hosts.allow</code> or <code
class="filename">hosts.deny</code> take effect immediately, without
restarting network services.
</div></li></ul></div><div
class="warning"><h2>Warning</h2><div
class="para">
If the last line of a hosts access file is not a newline character (created by
pressing the <span
class="keycap"><strong>Enter</strong></span> key), the last
rule in the file fails and an error is logged to either <code
class="filename">/var/log/messages</code> or <code
class="filename">/var/log/secure</code>. This is also the case for a
rule that spans multiple lines without using the backslash character. The following
example illustrates the relevant portion of a log message for a rule failure due to either
of these circumstances:
</div><pre class="screen">warning: /etc/hosts.allow, line 20:
missing newline or line too long
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Formatting_Access_Rules">2.5.2.1. Formatting
Access Rules</h4></div></div></div><a id="d0e7467"
class="indexterm"/><div class="para">
The format for both <code
class="filename">/etc/hosts.allow</code> and <code
class="filename">/etc/hosts.deny</code> is identical. Each rule must be
on its own line. Blank lines or lines that start with a hash (#) are ignored.
</div><div class="para">
Each rule uses the following basic format to control access to network services:
</div><pre class="screen"><em
class="replaceable"><code><daemon
list></code></em>: <em
class="replaceable"><code><client
list></code></em> [: <em
class="replaceable"><code><option></code></em>:
<em
class="replaceable"><code><option></code></em>:
...]
</pre><div class="itemizedlist"><ul><li><div
class="para">
<em class="replaceable"><code><daemon
list></code></em> — A comma-separated list of process names (<span
class="emphasis"><em>not</em></span> service names) or the
<code class="option">ALL</code> wildcard. The daemon list also
accepts operators (refer to <a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html#sect-Security_Guide-Formatting_Access_Rules-Operators"
title="2.5.2.1.4. Operators">Section 2.5.2.1.4, “Operators”</a>) to
allow greater flexibility.
</div></li><li><div class="para">
<em class="replaceable"><code><client
list></code></em> — A comma-separated list of hostnames, host IP
addresses, special patterns, or wildcards which identify the hosts affected by the rule.
The client list also accepts operators listed in <a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html#sect-Security_Guide-Formatting_Access_Rules-Operators"
title="2.5.2.1.4. Operators">Section 2.5.2.1.4, “Operators”</a> to
allow greater flexibility.
</div></li><li><div class="para">
<em
class="replaceable"><code><option></code></em>
— An optional action or colon-separated list of actions performed when the rule is
triggered. Option fields support expansions, launch shell commands, allow or deny access,
and alter logging behavior.
</div></li></ul></div><div
class="note"><h2>Note</h2><div class="para">
More information on the specialist terms above can be found elsewhere in this Guide:
</div><div class="itemizedlist"><ul><li><div
class="para">
<a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html#sect-Security_Guide-Formatting_Access_Rules-Wildcards"
title="2.5.2.1.1. Wildcards">Section 2.5.2.1.1, “Wildcards”</a>
</div></li><li><div class="para">
<a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html#sect-Security_Guide-Formatting_Access_Rules-Patterns"
title="2.5.2.1.2. Patterns">Section 2.5.2.1.2, “Patterns”</a>
</div></li><li><div class="para">
<a class="xref"
href="sect-Security_Guide-Option_Fields-Expansions.html"
title="2.5.2.2.4. Expansions">Section 2.5.2.2.4, “Expansions”</a>
</div></li><li><div class="para">
<a class="xref"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields">Section 2.5.2.2, “Option Fields”</a>
</div></li></ul></div></div><div
class="para">
The following is a basic sample hosts access rule:
</div><pre class="screen">vsftpd : .example.com
</pre><div class="para">
This rule instructs TCP Wrappers to watch for connections to the FTP daemon (<code
class="systemitem">vsftpd</code>) from any host in the <code
class="systemitem">example.com</code> domain. If this rule appears in
<code class="filename">hosts.allow</code>, the connection is
accepted. If this rule appears in <code
class="filename">hosts.deny</code>, the connection is rejected.
</div><div class="para">
The next sample hosts access rule is more complex and uses two option fields:
</div><pre class="screen">sshd : .example.com \ : spawn
/bin/echo `/bin/date` access denied>>/var/log/sshd.log \ : deny
</pre><div class="para">
Note that each option field is preceded by the backslash (\). Use of the backslash
prevents failure of the rule due to length.
</div><div class="para">
This sample rule states that if a connection to the SSH daemon (<code
class="systemitem">sshd</code>) is attempted from a host in the
<code class="systemitem">example.com</code> domain, execute the
<code class="command">echo</code> command to append the attempt to a
special log file, and deny the connection. Because the optional <code
class="command">deny</code> directive is used, this line denies access
even if it appears in the <code class="filename">hosts.allow</code>
file. Refer to <a class="xref"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"
title="2.5.2.2. Option Fields">Section 2.5.2.2, “Option Fields”</a> for
a more detailed look at available options.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Formatting_Access_Rules-Wildcards">2.5.2.1.1. Wildcards</h5></div></div></div><a
id="d0e7598" class="indexterm"/><div class="para">
Wildcards allow TCP Wrappers to more easily match groups of daemons or hosts. They
are used most frequently in the client list field of access rules.
</div><div class="para">
The following wildcards are available:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">ALL</code> — Matches everything. It can
be used for both the daemon list and the client list.
</div></li><li><div class="para">
<code class="option">LOCAL</code> — Matches any host that
does not contain a period (.), such as localhost.
</div></li><li><div class="para">
<code class="option">KNOWN</code> — Matches any host where
the hostname and host address are known or where the user is known.
</div></li><li><div class="para">
<code class="option">UNKNOWN</code> — Matches any host where
the hostname or host address are unknown or where the user is unknown.
</div></li><li><div class="para">
<code class="option">PARANOID</code> — Matches any host where
the hostname does not match the host address.
</div></li></ul></div><div
class="caution"><h2>Caution</h2><div
class="para">
The <code class="option">KNOWN</code>, <code
class="option">UNKNOWN</code>, and <code
class="option">PARANOID</code> wildcards should be used with care,
because they rely on functioning DNS server for correct operation. Any disruption to name
resolution may prevent legitimate users from gaining access to a service.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Formatting_Access_Rules-Patterns">2.5.2.1.2. Patterns</h5></div></div></div><a
id="d0e7657" class="indexterm"/><div class="para">
Patterns can be used in the client field of access rules to more precisely specify
groups of client hosts.
</div><div class="para">
The following is a list of common patterns for entries in the client field:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Hostname beginning with a period
(.)</em></span> — Placing a period at the beginning of a hostname matches all
hosts sharing the listed components of the name. The following example applies to any host
within the <code class="systemitem">example.com</code> domain:
</div><pre class="screen">ALL : .example.com
</pre></li><li><div class="para">
<span class="emphasis"><em>IP address ending with a period
(.)</em></span> — Placing a period at the end of an IP address matches all
hosts sharing the initial numeric groups of an IP address. The following example applies
to any host within the <code class="systemitem">192.168.x.x</code>
network:
</div><pre class="screen">ALL : 192.168.
</pre></li><li><div class="para">
<span class="emphasis"><em>IP address/netmask
pair</em></span> — Netmask expressions can also be used as a pattern to
control access to a particular group of IP addresses. The following example applies to any
host with an address range of <code
class="systemitem">192.168.0.0</code> through <code
class="systemitem">192.168.1.255</code>:
</div><pre class="screen">ALL : 192.168.0.0/255.255.254.0
</pre><div class="important"><h2>Important</h2><div
class="para">
When working in the IPv4 address space, the address/prefix length (<em
class="firstterm">prefixlen</em>) pair declarations (<abbr
class="abbrev">CIDR</abbr> notation) are not supported. Only IPv6 rules
can use this format.
</div></div></li><li><div class="para">
<span class="emphasis"><em>[IPv6 address]/prefixlen
pair</em></span> — [net]/prefixlen pairs can also be used as a pattern to
control access to a particular group of IPv6 addresses. The following example would apply
to any host with an address range of <code
class="systemitem">3ffe:505:2:1::</code> through <code
class="systemitem">3ffe:505:2:1:ffff:ffff:ffff:ffff</code>:
</div><pre class="screen">ALL : [3ffe:505:2:1::]/64
</pre></li><li><div class="para">
<span class="emphasis"><em>The asterisk
(*)</em></span> — Asterisks can be used to match entire groups of hostnames or
IP addresses, as long as they are not mixed in a client list containing other types of
patterns. The following example would apply to any host within the <code
class="systemitem">example.com</code> domain:
</div><pre class="screen">ALL : *.example.com
</pre></li><li><div class="para">
<span class="emphasis"><em>The slash
(/)</em></span> — If a client list begins with a slash, it is treated as a
file name. This is useful if rules specifying large numbers of hosts are necessary. The
following example refers TCP Wrappers to the <code
class="filename">/etc/telnet.hosts</code> file for all Telnet
connections:
</div><pre class="screen">in.telnetd : /etc/telnet.hosts
</pre></li></ul></div><div class="para">
Other, lesser used, patterns are also accepted by TCP Wrappers. Refer to the <code
class="filename">hosts_access</code> man 5 page for more information.
</div><div class="warning"><h2>Warning</h2><div
class="para">
Be very careful when using hostnames and domain names. Attackers can use a variety
of tricks to circumvent accurate name resolution. In addition, disruption to DNS service
prevents even authorized users from using network services. It is, therefore, best to use
IP addresses whenever possible.
</div></div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Formatting_Access_Rules-Portmap_and_TCP_Wrappers">2.5.2.1.3. Portmap
and TCP Wrappers</h5></div></div></div><div
class="para">
<code class="command">Portmap</code>'s implementation of
TCP Wrappers does not support host look-ups, which means <code
class="command">portmap</code> can not use hostnames to identify hosts.
Consequently, access control rules for portmap in <code
class="filename">hosts.allow</code> or <code
class="filename">hosts.deny</code> must use IP addresses, or the
keyword <code class="option">ALL</code>, for specifying hosts.
</div><div class="para">
Changes to <code class="command">portmap</code> access control
rules may not take effect immediately. You may need to restart the <code
class="command">portmap</code> service.
</div><div class="para">
Widely used services, such as NIS and NFS, depend on <code
class="command">portmap</code> to operate, so be aware of these
limitations.
</div></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Formatting_Access_Rules-Operators">2.5.2.1.4. Operators</h5></div></div></div><a
id="d0e7798" class="indexterm"/><div class="para">
At present, access control rules accept one operator, <code
class="option">EXCEPT</code>. It can be used in both the daemon list
and the client list of a rule.
</div><div class="para">
The <code class="option">EXCEPT</code> operator allows specific
exceptions to broader matches within the same rule.
</div><div class="para">
In the following example from a <code
class="filename">hosts.allow</code> file, all <code
class="systemitem">example.com</code> hosts are allowed to connect to
all services except <code
class="systemitem">cracker.example.com</code>:
</div><pre class="screen">ALL: .example.com EXCEPT
cracker.example.com
</pre><div class="para">
In another example from a <code
class="filename">hosts.allow</code> file, clients from the <code
class="systemitem">192.168.0.<em
class="replaceable"><code>x</code></em></code>
network can use all services except for FTP:
</div><pre class="screen">ALL EXCEPT vsftpd: 192.168.0.
</pre><div class="note"><h2>Note</h2><div
class="para">
Organizationally, it is often easier to avoid using <code
class="option">EXCEPT</code> operators. This allows other
administrators to quickly scan the appropriate files to see what hosts are allowed or
denied access to services, without having to sort through <code
class="option">EXCEPT</code> operators.
</div></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html"><strong>Prev</strong>2.5. TCP
Wrappers and xinetd</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_Configuration_Files-Option_Fields.html"><strong>Next</strong>2.5.2.2. Option
Fields</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/><link rel="prev"
href="sect-Security_Guide-Option_Fields-Expansions.html"
title="2.5.2.2.4. Expansions"/><link rel="next"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"
title="2.5.4. xinetd Configuration Files"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><
ul class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Option_Fields-Expansions.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd">2.5.3. xinetd</h3></div></div></div><a
id="d0e8185" class="indexterm"/><a id="d0e8191"
class="indexterm"/><a id="d0e8197"
class="indexterm"/><div class="para">
The <code class="systemitem">xinetd</code> daemon is a
TCP-wrapped <em class="firstterm">super service</em> which controls
access to a subset of popular network services, including FTP, IMAP, and Telnet. It also
provides service-specific configuration options for access control, enhanced logging,
binding, redirection, and resource utilization control.
</div><div class="para">
When a client attempts to connect to a network service controlled by <code
class="systemitem">xinetd</code>, the super service receives the
request and checks for any TCP Wrappers access control rules.
</div><div class="para">
If access is allowed, <code class="systemitem">xinetd</code>
verifies that the connection is allowed under its own access rules for that service. It
also checks that the service can have more resources allotted to it and that it is not in
breach of any defined rules.
</div><div class="para">
If all these conditions are met (that is, access is allowed to the service; the service
has not reached its resource limit; and the service is not in breach of any defined rule),
<code class="systemitem">xinetd</code> then starts an instance of
the requested service and passes control of the connection to it. After the connection has
been established, <code class="systemitem">xinetd</code> takes no
further part in the communication between the client and the server.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Option_Fields-Expansions.html"><strong>Prev</strong>2.5.2.2.4. Expansions</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"><strong>Next</strong>2.5.4. xinetd
Configuration Files</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Configuration Files</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html" title="2.5. TCP
Wrappers and xinetd"/><link rel="prev"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"
title="2.5.3. xinetd"/><link rel="next"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"
title="2.5.4.2. The /etc/xinetd.d/ Directory"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Docume
ntation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files">2.5.4. xinetd
Configuration Files</h3></div></div></div><a
id="d0e8232" class="indexterm"/><div class="para">
The configuration files for <code
class="systemitem">xinetd</code> are as follows:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="filename">/etc/xinetd.conf</code> — The global
<code class="systemitem">xinetd</code> configuration file.
</div></li><li><div class="para">
<code class="filename">/etc/xinetd.d/</code> — The directory
containing all service-specific files.
</div></li></ul></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.conf_File">2.5.4.1. The
/etc/xinetd.conf File</h4></div></div></div><a
id="d0e8262" class="indexterm"/><a id="d0e8271"
class="indexterm"/><div class="para">
The <code class="filename">/etc/xinetd.conf</code> file contains
general configuration settings which affect every service under <code
class="systemitem">xinetd</code>'s control. It is read when the
<code class="systemitem">xinetd</code> service is first started, so
for configuration changes to take effect, you need to restart the <code
class="systemitem">xinetd</code> service. The following is a sample
<code class="filename">/etc/xinetd.conf</code> file:
</div><pre class="screen">defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d
</pre><div class="para">
These lines control the following aspects of <code
class="systemitem">xinetd</code>:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">instances</code> — Specifies the maximum
number of simultaneous requests that <code
class="systemitem">xinetd</code> can process.
</div></li><li><div class="para">
<code class="option">log_type</code> — Configures <code
class="systemitem">xinetd</code> to use the <code
class="command">authpriv</code> log facility, which writes log entries
to the <code class="filename">/var/log/secure</code> file. Adding a
directive such as <code class="option">FILE
/var/log/xinetdlog</code> would create a custom log file called <code
class="filename">xinetdlog</code> in the <code
class="filename">/var/log/</code> directory.
</div></li><li><div class="para">
<code class="option">log_on_success</code> — Configures
<code class="systemitem">xinetd</code> to log successful connection
attempts. By default, the remote host's IP address and the process ID of the server
processing the request are recorded.
</div></li><li><div class="para">
<code class="option">log_on_failure</code> — Configures
<code class="systemitem">xinetd</code> to log failed connection
attempts or if the connection was denied.
</div></li><li><div class="para">
<code class="option">cps</code> — Configures <code
class="systemitem">xinetd</code> to allow no more than 25 connections
per second to any given service. If this limit is exceeded, the service is retired for 30
seconds.
</div></li><li><div class="para">
<code class="option">includedir</code> <code
class="filename">/etc/xinetd.d/</code> — Includes options declared in
the service-specific configuration files located in the <code
class="filename">/etc/xinetd.d/</code> directory. Refer to <a
class="xref"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"
title="2.5.4.2. The /etc/xinetd.d/ Directory">Section 2.5.4.2, “The
/etc/xinetd.d/ Directory”</a> for more information.
</div></li></ul></div><div
class="note"><h2>Note</h2><div class="para">
Often, both the <code class="option">log_on_success</code> and
<code class="option">log_on_failure</code> settings in <code
class="filename">/etc/xinetd.conf</code> are further modified in the
service-specific configuration files. More information may therefore appear in a given
service's log file than the <code
class="filename">/etc/xinetd.conf</code> file may indicate. Refer to
<a class="xref"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html#sect-Security_Guide-Altering_xinetd_Configuration_Files-Logging_Options"
title="2.5.4.3.1. Logging Options">Section 2.5.4.3.1, “Logging
Options”</a> for further information.
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd.html"><strong>Prev</strong>2.5.3. xinetd</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"><strong>Next</strong>2.5.4.2. The
/etc/xinetd.d/ Directory</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-TCP_Wrappers_and_xinetd.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Wrappers and xinetd</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"
title="2.4.8.2. Useful PAM Websites"/><link rel="next"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"
title="2.5.2. TCP Wrappers Configuration
Files"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img src="Common_Content/images
/image_right.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd">2.5. TCP Wrappers and
xinetd</h2></div></div></div><a id="d0e7147"
class="indexterm"/><a id="d0e7152"
class="indexterm"/><a id="d0e7158"
class="indexterm"/><div class="para">
Controlling access to network services is one of the most important security tasks
facing a server administrator. Fedora provides several tools for this purpose. For
example, an <code class="command">iptables</code>-based firewall
filters out unwelcome network packets within the kernel's network stack. For network
services that utilize it, <em class="firstterm">TCP Wrappers</em>
add an additional layer of protection by defining which hosts are or are not allowed to
connect to "<span
class="emphasis"><em>wrapped</em></span>" network
services. One such wrapped network service is the <code
class="systemitem">xinetd</code> <span
class="emphasis"><em>super server</em></span>. This service
is called a super server because it controls connections to a subset of network services
and further refines access control.
</div><div class="para">
<a class="xref"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd.html#figu-Security_Guide-TCP_Wrappers_and_xinetd-Access_Control_to_Network_Services"
title="Figure 2.9. Access Control to Network Services">Figure 2.9, “Access
Control to Network Services”</a> is a basic illustration of how these tools work
together to protect network services.
</div><div class="figure"
id="figu-Security_Guide-TCP_Wrappers_and_xinetd-Access_Control_to_Network_Services"><div
class="figure-contents"><div class="mediaobject"><img
src="images/tcp_wrap_diagram.png" alt="Access Control to Network
Services"/><div class="longdesc"><div
class="para">
Exhibit A: Access Control to Network Services Flowchart
</div></div></div></div><h6>Figure 2.9. Access Control
to Network Services</h6></div><br
class="figure-break"/><div class="para">
This chapter focuses on the role of TCP Wrappers and <code
class="systemitem">xinetd</code> in controlling access to network
services and reviews how these tools can be used to enhance both logging and utilization
management. Refer to <a class="xref"
href="sect-Security_Guide-IPTables.html"
title="2.9. IPTables">Section 2.9, “IPTables”</a> for information about
using firewalls with <code class="command">iptables</code>.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers">2.5.1. TCP
Wrappers</h3></div></div></div><a id="d0e7204"
class="indexterm"/><a id="d0e7209"
class="indexterm"/><a id="d0e7214"
class="indexterm"/><a id="d0e7222"
class="indexterm"/><div class="para">
The TCP Wrappers package (<code
class="filename">tcp_wrappers</code>) is installed by default and
provides host-based access control to network services. The most important component
within the package is the <code
class="filename">/usr/lib/libwrap.a</code> library. In general terms, a
TCP-wrapped service is one that has been compiled against the <code
class="filename">libwrap.a</code> library.
</div><div class="para">
When a connection attempt is made to a TCP-wrapped service, the service first
references the host's access files (<code
class="filename">/etc/hosts.allow</code> and <code
class="filename">/etc/hosts.deny</code>) to determine whether or not
the client is allowed to connect. In most cases, it then uses the syslog daemon (<code
class="systemitem">syslogd</code>) to write the name of the requesting
client and the requested service to <code
class="filename">/var/log/secure</code> or <code
class="filename">/var/log/messages</code>.
</div><div class="para">
If a client is allowed to connect, TCP Wrappers release control of the connection to
the requested service and take no further part in the communication between the client and
the server.
</div><div class="para">
In addition to access control and logging, TCP Wrappers can execute commands to
interact with the client before denying or releasing control of the connection to the
requested network service.
</div><div class="para">
Because TCP Wrappers are a valuable addition to any server administrator's arsenal
of security tools, most network services within Fedora are linked to the <code
class="filename">libwrap.a</code> library. Some such applications
include <code class="systemitem">/usr/sbin/sshd</code>, <code
class="command">/usr/sbin/sendmail</code>, and <code
class="systemitem">/usr/sbin/xinetd</code>.
</div><div class="note"><h2>Note</h2><div
class="para">
To determine if a network service binary is linked to <code
class="filename">libwrap.a</code>, type the following command as the
root user:
</div><pre class="screen">ldd <binary-name> | grep
libwrap
</pre><div class="para">
Replace <em
class="replaceable"><code><binary-name></code></em>
with the name of the network service binary.
</div><div class="para">
If the command returns straight to the prompt with no output, then the network service
is <span class="emphasis"><em>not</em></span> linked to
<code class="filename">libwrap.a</code>.
</div><div class="para">
The following example indicates that <code
class="systemitem">/usr/sbin/sshd</code> is linked to <code
class="filename">libwrap.a</code>:
</div><pre class="screen">[root@myserver ~]# ldd /usr/sbin/sshd |
grep libwrap
libwrap.so.0 => /usr/lib/libwrap.so.0 (0x00655000)
[root@myserver ~]#
</pre></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-TCP_Wrappers-Advantages_of_TCP_Wrappers">2.5.1.1. Advantages
of TCP Wrappers</h4></div></div></div><a id="d0e7312"
class="indexterm"/><div class="para">
TCP Wrappers provide the following advantages over other network service control
techniques:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="emphasis"><em>Transparency to both the client and
the wrapped network service</em></span> — Both the connecting client and the
wrapped network service are unaware that TCP Wrappers are in use. Legitimate users are
logged and connected to the requested service while connections from banned clients fail.
</div></li><li><div class="para">
<span class="emphasis"><em>Centralized management of multiple
protocols</em></span> — TCP Wrappers operate separately from the network
services they protect, allowing many server applications to share a common set of access
control configuration files, making for simpler management.
</div></li></ul></div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_PAM_Websites.html"><strong>Prev</strong>2.4.8.2. Useful
PAM Websites</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-TCP_Wrappers_Configuration_Files.html"><strong>Next</strong>2.5.2. TCP
Wrappers Configuration Files</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Administration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"
title="1.3.3. Threats to Server Security"/><link rel="prev"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"
title="1.3.3.2. Unpatched Services"/><link rel="next"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"
title="1.3.3.4. Inherently Insecure Services"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fedorap
roject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration">1.3.3.3. Inattentive
Administration</h4></div></div></div><a id="d0e1122"
class="indexterm"/><div class="para">
Administrators who fail to patch their systems are one of the greatest threats to
server security. According to the <em class="firstterm">System
Administration Network and Security Institute</em> (<em
class="firstterm">SANS</em>), the primary cause of computer security
vulnerability is to "assign untrained people to maintain security and provide neither
the training nor the time to make it possible to do the job."<sup>[<a
id="d0e1137" href="#ftn.d0e1137"
class="footnote">4</a>]</sup> This applies as much to
inexperienced administrators as it does to overconfident or amotivated administrators.
</div><div class="para">
Some administrators fail to patch their servers and workstations, while others fail to
watch log messages from the system kernel or network traffic. Another common error is when
default passwords or keys to services are left unchanged. For example, some databases have
default administration passwords because the database developers assume that the system
administrator changes these passwords immediately after installation. If a database
administrator fails to change this password, even an inexperienced cracker can use a
widely-known default password to gain administrative privileges to the database. These are
only a few examples of how inattentive administration can lead to compromised servers.
</div><div class="footnotes"><br/><hr/><div
class="footnote"><p><sup>[<a id="ftn.d0e1137"
href="#d0e1137" class="para">4</a>] </sup>
Source: <a
href="http://www.sans.org/newlook/resources/errors.htm">http...
</p></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html"><strong>Prev</strong>1.3.3.2. Unpatched
Services</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html"><strong>Next</strong>1.3.3.4. Inherently
Insecure Services</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Insecure Services</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"
title="1.3.3. Threats to Server Security"/><link rel="prev"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"
title="1.3.3.3. Inattentive Administration"/><link rel="next"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"
title="1.3.4. Threats to Workstation and Home PC
Security"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product Site
"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Server_Security-Inherently_Insecure_Services">1.3.3.4. Inherently
Insecure Services</h4></div></div></div><a
id="d0e1149" class="indexterm"/><div class="para">
Even the most vigilant organization can fall victim to vulnerabilities if the network
services they choose are inherently insecure. For instance, there are many services
developed under the assumption that they are used over trusted networks; however, this
assumption fails as soon as the service becomes available over the Internet — which is
itself inherently untrusted.
</div><div class="para">
One category of insecure network services are those that require unencrypted usernames
and passwords for authentication. Telnet and FTP are two such services. If packet sniffing
software is monitoring traffic between the remote user and such a service usernames and
passwords can be easily intercepted.
</div><div class="para">
Inherently, such services can also more easily fall prey to what the security industry
terms the <em class="firstterm">man-in-the-middle</em> attack. In
this type of attack, a cracker redirects network traffic by tricking a cracked name server
on the network to point to his machine instead of the intended server. Once someone opens
a remote session to the server, the attacker's machine acts as an invisible conduit,
sitting quietly between the remote service and the unsuspecting user capturing
information. In this way a cracker can gather administrative passwords and raw data
without the server or the user realizing it.
</div><div class="para">
Another category of insecure services include network file systems and information
services such as NFS or NIS, which are developed explicitly for LAN usage but are,
unfortunately, extended to include WANs (for remote users). NFS does not, by default, have
any authentication or security mechanisms configured to prevent a cracker from mounting
the NFS share and accessing anything contained therein. NIS, as well, has vital
information that must be known by every computer on a network, including passwords and
file permissions, within a plain text ASCII or DBM (ASCII-derived) database. A cracker who
gains access to this database can then access every user account on a network, including
the administrator's account.
</div><div class="para">
By default, Fedora is released with all such services turned off. However, since
administrators often find themselves forced to use these services, careful configuration
is critical. Refer to <a class="xref"
href="sect-Security_Guide-Server_Security.html" title="2.2. Server
Security">Section 2.2, “Server Security”</a> for more information about
setting up services in a safe manner.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"><strong>Prev</strong>1.3.3.3. Inattentive
Administration</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"><strong>Next</strong>1.3.4. Threats
to Workstation and Home PC
Security</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Services</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"
title="1.3.3. Threats to Server Security"/><link rel="prev"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"
title="1.3.3. Threats to Server Security"/><link rel="next"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"
title="1.3.3.3. Inattentive Administration"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fe
doraproject.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Server_Security-Unpatched_Services">1.3.3.2. Unpatched
Services</h4></div></div></div><a id="d0e1098"
class="indexterm"/><div class="para">
Most server applications that are included in a default installation are solid,
thoroughly tested pieces of software. Having been in use in production environments for
many years, their code has been thoroughly refined and many of the bugs have been found
and fixed.
</div><div class="para">
However, there is no such thing as perfect software and there is always room for
further refinement. Moreover, newer software is often not as rigorously tested as one
might expect, because of its recent arrival to production environments or because it may
not be as popular as other server software.
</div><div class="para">
Developers and system administrators often find exploitable bugs in server
applications and publish the information on bug tracking and security-related websites
such as the Bugtraq mailing list (<a
href="http://www.securityfocus.com">http://www.securityfocus.com</a>)
or the Computer Emergency Response Team (CERT) website (<a
href="http://www.cert.org">http://www.cert.org</a>). Although these
mechanisms are an effective way of alerting the community to security vulnerabilities, it
is up to system administrators to patch their systems promptly. This is particularly true
because crackers have access to these same vulnerability tracking services and will use
the information to crack unpatched systems whenever they can. Good system administration
requires vigilance, constant bug tracking, and proper system maintenance to ensure a more
secure computing environment.
</div><div class="para">
Refer to <a class="xref"
href="sect-Security_Guide-Security_Updates.html" title="1.5. Security
Updates">Section 1.5, “Security Updates”</a> for more information about
keeping a system up-to-date.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Server_Security.html"><strong>Prev</strong>1.3.3. Threats
to Server Security</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Threats_to_Server_Security-Inattentive_Administration.html"><strong>Next</strong>1.3.3.3. Inattentive
Administration</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Client Applications</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"
title="1.3.4. Threats to Workstation and Home PC Security"/><link
rel="prev"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"
title="1.3.4. Threats to Workstation and Home PC Security"/><link
rel="next" href="sect-Security_Guide-Common_Exploits_and_Attacks.html"
title="1.4. Common Exploits and Attacks"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Produ
ct Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Threats_to_Workstation_and_Home_PC_Security-Vulnerable_Client_Applications">1.3.4.2. Vulnerable
Client Applications</h4></div></div></div><a
id="d0e1194" class="indexterm"/><div class="para">
Although an administrator may have a fully secure and patched server, that does not
mean remote users are secure when accessing it. For instance, if the server offers Telnet
or FTP services over a public network, an attacker can capture the plain text usernames
and passwords as they pass over the network, and then use the account information to
access the remote user's workstation.
</div><div class="para">
Even when using secure protocols, such as SSH, a remote user may be vulnerable to
certain attacks if they do not keep their client applications updated. For instance, v.1
SSH clients are vulnerable to an X-forwarding attack from malicious SSH servers. Once
connected to the server, the attacker can quietly capture any keystrokes and mouse clicks
made by the client over the network. This problem was fixed in the v.2 SSH protocol, but
it is up to the user to keep track of what applications have such vulnerabilities and
update them as necessary.
</div><div class="para">
<a class="xref"
href="chap-Security_Guide-Securing_Your_Network.html#sect-Security_Guide-Workstation_Security"
title="2.1. Workstation Security">Section 2.1, “Workstation
Security”</a> discusses in more detail what steps administrators and home users
should take to limit the vulnerability of computer workstations.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Attackers_and_Vulnerabilities-Threats_to_Workstation_and_Home_PC_Security.html"><strong>Prev</strong>1.3.4. Threats
to Workstation and Home PC Security</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Common_Exploits_and_Attacks.html"><strong>Next</strong>1.4. Common
Exploits and Attacks</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Firewall Policies</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"
title="2.8.3. Using IPTables"/><link rel="prev"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"
title="2.8.3. Using IPTables"/><link rel="next"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"
title="2.8.3.3. Saving and Restoring IPTables
Rules"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Docume
ntation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies">2.8.3.2. Basic
Firewall Policies</h4></div></div></div><a
id="d0e13289" class="indexterm"/><a id="d0e13294"
class="indexterm"/><div class="para">
Establishing basic firewall policies creates a foundation for building more detailed,
user-defined rules.
</div><div class="para">
Each <code class="command">iptables</code> chain is comprised of
a default policy, and zero or more rules which work in concert with the default policy to
define the overall ruleset for the firewall.
</div><div class="para">
The default policy for a chain can be either DROP or ACCEPT. Security-minded
administrators typically implement a default policy of DROP, and only allow specific
packets on a case-by-case basis. For example, the following policies block all incoming
and outgoing packets on a network gateway:
</div><pre class="screen">[root@myServer ~ ] # iptables -P INPUT
DROP
[root@myServer ~ ] # iptables -P OUTPUT DROP
</pre><div class="para">
It is also recommended that any <em class="firstterm">forwarded
packets</em> — network traffic that is to be routed from the firewall to its
destination node — be denied as well, to restrict internal clients from inadvertent
exposure to the Internet. To do this, use the following rule:
</div><pre class="screen">[root@myServer ~ ] # iptables -P
FORWARD DROP
</pre><div class="para">
When you have established the default policies for each chain, you can create and save
further rules for your particular network and security requirements.
</div><div class="para">
The following sections describe how to save iptables rules and outline some of the
rules you might implement in the course of building your iptables firewall.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"><strong>Prev</strong>2.8.3. Using
IPTables</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html"><strong>Next</strong>2.8.3.3. Saving
and Restoring IPTables Rules</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Restoring IPTables Rules</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Firewalls-Using_IPTables.html"
title="2.8.3. Using IPTables"/><link rel="prev"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"
title="2.8.3.2. Basic Firewall Policies"/><link rel="next"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"
title="2.8.4. Common IPTables Filtering"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" a
lt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Using_IPTables-Saving_and_Restoring_IPTables_Rules">2.8.3.3. Saving
and Restoring IPTables Rules</h4></div></div></div><a
id="d0e13325" class="indexterm"/><a id="d0e13331"
class="indexterm"/><a id="d0e13339"
class="indexterm"/><div class="para">
Changes to <code class="command">iptables</code> are transitory;
if the system is rebooted or if the <code
class="command">iptables</code> service is restarted, the rules are
automatically flushed and reset. To save the rules so that they are loaded when the
<code class="command">iptables</code> service is started, use the
following command:
</div><pre class="screen">[root@myServer ~ ] # service iptables
save
</pre><div class="para">
The rules are stored in the file <code
class="filename">/etc/sysconfig/iptables</code> and are applied
whenever the service is started or the machine is rebooted.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Using_IPTables-Basic_Firewall_Policies.html"><strong>Prev</strong>2.8.3.2. Basic
Firewall Policies</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls-Common_IPTables_Filtering.html"><strong>Next</strong>2.8.4. Common
IPTables Filtering</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
an IPsec Connection</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"
title="2.7.3. IPsec"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"
title="2.7.5. IPsec Installation"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Do
cumentation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection">2.7.4. Creating
an <abbr class="abbrev">IPsec</abbr>
Connection</h3></div></div></div><div
class="para">
An <abbr class="abbrev">IPsec</abbr> connection is split into two
logical phases. In phase 1, an <abbr class="abbrev">IPsec</abbr>
node initializes the connection with the remote node or network. The remote node or
network checks the requesting node's credentials and both parties negotiate the
authentication method for the connection.
</div><div class="para">
On Fedora systems, an <abbr class="abbrev">IPsec</abbr>
connection uses the <em class="firstterm">pre-shared key</em> method
of <abbr class="abbrev">IPsec</abbr> node authentication. In a
pre-shared key <abbr class="abbrev">IPsec</abbr> connection, both
hosts must use the same key in order to move to Phase 2 of the <abbr
class="abbrev">IPsec</abbr> connection.
</div><div class="para">
Phase 2 of the <abbr class="abbrev">IPsec</abbr> connection is
where the <em class="firstterm">Security Association</em>
(<acronym class="acronym">SA</acronym>) is created between <abbr
class="abbrev">IPsec</abbr> nodes. This phase establishes an <abbr
class="abbrev">SA</abbr> database with configuration information, such
as the encryption method, secret session key exchange parameters, and more. This phase
manages the actual <abbr class="abbrev">IPsec</abbr> connection
between remote nodes and networks.
</div><div class="para">
The Fedora implementation of <abbr class="abbrev">IPsec</abbr>
uses IKE for sharing keys between hosts across the Internet. The <code
class="command">racoon</code> keying daemon handles the IKE key
distribution and exchange. Refer to the <code
class="command">racoon</code> man page for more information about this
daemon.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"><strong>Prev</strong>2.7.3. IPsec</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"><strong>Next</strong>2.7.5. IPsec
Installation</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
rel="stylesheet" href="./Common_Content/css/default.css"
type="text/css"/><meta name="generator"
content="publican"/><meta name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"
title="2.7.2. VPNs and Fedora"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"
title="2.7.4. Creating an IPsec Connection"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_rig
ht.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec">2.7.3. IPsec</h3></div></div></div><a
id="d0e11051" class="indexterm"/><a id="d0e11056"
class="indexterm"/><div class="para">
Fedora supports <abbr class="abbrev">IPsec</abbr> for connecting
remote hosts and networks to each other using a secure tunnel on a common carrier network
such as the Internet. <abbr class="abbrev">IPsec</abbr> can be
implemented using a host-to-host (one computer workstation to another) or
network-to-network (one <acronym
class="acronym">LAN</acronym>/<acronym
class="acronym">WAN</acronym> to another) configuration.
</div><div class="para">
The <abbr class="abbrev">IPsec</abbr> implementation in Fedora
uses <em class="firstterm">Internet Key Exchange</em> (<em
class="firstterm">IKE</em>), a protocol implemented by the Internet
Engineering Task Force (<acronym class="acronym">IETF</acronym>),
used for mutual authentication and secure associations between connecting systems.
</div><a id="d0e11087"
class="indexterm"/></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"><strong>Prev</strong>2.7.2. VPNs
and Fedora</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"><strong>Next</strong>2.7.4. Creating
an IPsec Connection</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Host-to-Host Configuration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"
title="2.7.5. IPsec Installation"/><link rel="next"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"
title="2.7.6.2. Manual IPsec Host-to-Host
Configuration"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://doc
s.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration">2.7.6. IPsec
Host-to-Host Configuration</h3></div></div></div><a
id="d0e11251" class="indexterm"/><a id="d0e11258"
class="indexterm"/><a id="d0e11265"
class="indexterm"/><div class="para">
IPsec can be configured to connect one desktop or workstation (host) to another using a
host-to-host connection. This type of connection uses the network to which each host is
connected to create a secure tunnel between each host. The requirements of a host-to-host
connection are minimal, as is the configuration of <abbr
class="abbrev">IPsec</abbr> on each host. The hosts need only a
dedicated connection to a carrier network (such as the Internet) and Fedora to create the
<abbr class="abbrev">IPsec</abbr> connection.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Host_to_Host_Connection">2.7.6.1. Host-to-Host
Connection</h4></div></div></div><a id="d0e11281"
class="indexterm"/><a id="d0e11286"
class="indexterm"/><div class="para">
A host-to-host <abbr class="abbrev">IPsec</abbr> connection is
an encrypted connection between two systems, both running <abbr
class="abbrev">IPsec</abbr> with the same authentication key. With the
<abbr class="abbrev">IPsec</abbr> connection active, any network
traffic between the two hosts is encrypted.
</div><div class="para">
To configure a host-to-host <abbr class="abbrev">IPsec</abbr>
connection, use the following steps for each host:
</div><div class="note"><h2>Note</h2><div
class="para">
You should perform the following procedures on the actual machine that you are
configuring. Avoid attempting to configure and establish <abbr
class="abbrev">IPsec</abbr> connections remotely.
</div></div><div
class="orderedlist"><ol><li><div class="para">
In a command shell, type <code
class="command">system-config-network</code> to start the <span
class="application"><strong>Network Administration
Tool</strong></span>.
</div></li><li><div class="para">
On the <span
class="guilabel"><strong>IPsec</strong></span> tab, click
<span class="guibutton"><strong>New</strong></span> to
start the <abbr class="abbrev">IPsec</abbr> configuration wizard.
</div></li><li><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to start
configuring a host-to-host <abbr class="abbrev">IPsec</abbr>
connection.
</div></li><li><div class="para">
Enter a unique name for the connection, for example, <strong
class="userinput"><code>ipsec0</code></strong>. If
required, select the check box to automatically activate the connection when the computer
starts. Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li><li><div class="para">
Select <span class="guilabel"><strong>Host to Host
encryption</strong></span> as the connection type, and then click <span
class="guibutton"><strong>Forward</strong></span>.
</div></li><li><div class="para">
Select the type of encryption to use: manual or automatic.
</div><a id="d0e11367" class="indexterm"/><a
id="d0e11371" class="indexterm"/><div
class="para">
If you select manual encryption, an encryption key must be provided later in the
process. If you select automatic encryption, the <code
class="command">racoon</code> daemon manages the encryption key. The
<code class="filename">ipsec-tools</code> package must be installed
if you want to use automatic encryption.
</div><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li><li><div class="para">
Enter the IP address of the remote host.
</div><div class="para">
To determine the IP address of the remote host, use the following command <span
class="emphasis"><em>on the remote host</em></span>:
</div><pre class="screen">[root@myServer ~] # /sbin/ifconfig
<em
class="replaceable"><code><device></code></em>
</pre><div class="para">
where <em
class="replaceable"><code><device></code></em>
is the Ethernet device that you want to use for the <abbr
class="abbrev">VPN</abbr> connection.
</div><div class="para">
If only one Ethernet card exists in the system, the device name is typically eth0.
The following example shows the relevant information from this command (note that this is
an example output only):
</div><pre class="screen">eth0 Link encap:Ethernet HWaddr
00:0C:6E:E8:98:1D
inet addr:172.16.44.192 Bcast:172.16.45.255 Mask:255.255.254.0
</pre><div class="para">
The IP address is the number following the <code
class="computeroutput">inet addr:</code> label.
</div><div class="note"><h2>Note</h2><div
class="para">
For host-to-host connections, both hosts should have a public, routable address.
Alternatively, both hosts can have a private, non-routable address (for example, from the
10.x.x.x or 192.168.x.x ranges) as long as they are on the sam LAN.
</div><div class="para">
If the hosts are on different LANs, or one has a public address while the other has
a private address, refer to <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"
title="2.7.7. IPsec Network-to-Network Configuration">Section 2.7.7, “IPsec
Network-to-Network Configuration”</a>.
</div></div><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li><li><div class="para">
If manual encryption was selected in step <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html#list-Security_Guide-list-Security_Guide-list-Security_Guide-st-host-encrypt-type">6</a>,
specify the encryption key to use, or click <span
class="guibutton"><strong>Generate</strong></span> to
create one.
</div><div class="orderedlist"><ol><li><div
class="para">
Specify an authentication key or click <span
class="guibutton"><strong>Generate</strong></span> to
generate one. It can be any combination of numbers and letters.
</div></li><li><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li></ol></div></li><li><div
class="para">
Verify the information on the <span
class="guilabel"><strong>IPsec — Summary</strong></span>
page, and then click <span
class="guibutton"><strong>Apply</strong></span>.
</div></li><li><div class="para">
Click <span
class="guimenu"><strong>File</strong></span> =>
<span class="guimenuitem"><strong>Save</strong></span>
to save the configuration.
</div><div class="para">
You may need to restart the network for the changes to take effect. To restart the
network, use the following command:
</div><pre class="screen">[root@myServer ~]# service network
restart
</pre></li><li><div class="para">
Select the <abbr class="abbrev">IPsec</abbr> connection from
the list and click the <span
class="guibutton"><strong>Activate</strong></span> button.
</div></li><li><div class="para">
Repeat the entire procedure for the other host. It is essential that the same keys
from step <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html#list-Security_Guide-list-Security_Guide-list-Security_Guide-st-host-to-host-keys">8</a>
be used on the other hosts. Otherwise, <abbr
class="abbrev">IPsec</abbr> will not work.
</div></li></ol></div><div class="para">
After configuring the <abbr class="abbrev">IPsec</abbr>
connection, it appears in the <abbr class="abbrev">IPsec</abbr> list
as shown in <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html#figu-Security_Guide-Host_to_Host_Connection-IPsec_Connection"
title="Figure 2.10. IPsec Connection">Figure 2.10, “IPsec
Connection”</a>.
</div><div class="figure"
id="figu-Security_Guide-Host_to_Host_Connection-IPsec_Connection"><div
class="figure-contents"><div class="mediaobject"><img
src="images/sec-ipsec-host2host.png" alt="IPsec
Connection"/><div class="longdesc"><div
class="para">
IPsec Connection
</div></div></div></div><h6>Figure 2.10. IPsec
Connection</h6></div><br class="figure-break"/><div
class="para">
The following files are created when the <abbr
class="abbrev">IPsec</abbr> connection is configured:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="filename">/etc/sysconfig/network-scripts/ifcfg-<em
class="replaceable"><code><nickname></code></em></code>
</div></li><li><div class="para">
<code class="filename">/etc/sysconfig/network-scripts/keys-<em
class="replaceable"><code><nickname></code></em></code>
</div></li><li><div class="para">
<code class="filename">/etc/racoon/<em
class="replaceable"><code><remote-ip></code></em>.conf</code>
</div></li><li><div class="para">
<code class="filename">/etc/racoon/psk.txt</code>
</div></li></ul></div><div class="para">
If automatic encryption is selected, <code
class="filename">/etc/racoon/racoon.conf</code> is also created.
</div><div class="para">
When the interface is up, <code
class="filename">/etc/racoon/racoon.conf</code> is modified to include
<code class="filename"><em
class="replaceable"><code><remote-ip></code></em>.conf</code>.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html"><strong>Prev</strong>2.7.5. IPsec
Installation</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"><strong>Next</strong>2.7.6.2. Manual
IPsec Host-to-Host
Configuration</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Installation</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"
title="2.7.4. Creating an IPsec Connection"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"
title="2.7.6. IPsec Host-to-Host
Configuration"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="http://docs.fedoraproje
ct.org"><img src="Common_Content/images/image_right.png"
alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Installation">2.7.5. IPsec
Installation</h3></div></div></div><a id="d0e11157"
class="indexterm"/><a id="d0e11164"
class="indexterm"/><div class="para">
Implementing <abbr class="abbrev">IPsec</abbr> requires that the
<code class="filename">ipsec-tools</code> RPM package be installed
on all <abbr class="abbrev">IPsec</abbr> hosts (if using a
host-to-host configuration) or routers (if using a network-to-network configuration). The
RPM package contains essential libraries, daemons, and configuration files for setting up
the <abbr class="abbrev">IPsec</abbr> connection, including:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="command">/sbin/setkey</code> — manipulates the key
management and security attributes of <abbr
class="abbrev">IPsec</abbr> in the kernel. This executable is
controlled by the <code class="command">racoon</code> key management
daemon. Refer to the <code class="command">setkey</code>(8) man page
for more information.
</div></li><li><div class="para">
<code class="command">/sbin/racoon</code> — the IKE key
management daemon, used to manage and control security associations and key sharing
between IPsec-connected systems.
</div></li><li><div class="para">
<code class="filename">/etc/racoon/racoon.conf</code> — the
<code class="command">racoon</code> daemon configuration file used
to configure various aspects of the <abbr
class="abbrev">IPsec</abbr> connection, including authentication
methods and encryption algorithms used in the connection. Refer to the <code
class="filename">racoon.conf</code>(5) man page for a complete listing
of available directives.
</div></li></ul></div><div class="para">
To configure <abbr class="abbrev">IPsec</abbr> on Fedora, you can
use the <span class="application"><strong>Network Administration
Tool</strong></span>, or manually edit the networking and <abbr
class="abbrev">IPsec</abbr> configuration files.
</div><div class="itemizedlist"><ul><li><div
class="para">
To connect two network-connected hosts via IPsec, refer to <a
class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"
title="2.7.6. IPsec Host-to-Host Configuration">Section 2.7.6, “IPsec
Host-to-Host Configuration”</a>.
</div></li><li><div class="para">
To connect one <acronym
class="acronym">LAN</acronym>/<acronym
class="acronym">WAN</acronym> to another via IPsec, refer to <a
class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html"
title="2.7.7. IPsec Network-to-Network Configuration">Section 2.7.7, “IPsec
Network-to-Network Configuration”</a>.
</div></li></ul></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-Creating_an_IPsec_Connection.html"><strong>Prev</strong>2.7.4. Creating
an IPsec Connection</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Host_to_Host_Configuration.html"><strong>Next</strong>2.7.6. IPsec
Host-to-Host Configuration</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Network-to-Network Configuration</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"
title="2.7.6.2. Manual IPsec Host-to-Host Configuration"/><link
rel="next"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"
title="2.7.7.2. Manual IPsec Network-to-Network
Configuration"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/im
age_left.png" alt="Product Site"/></a><a
class="right" href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration">2.7.7. IPsec
Network-to-Network Configuration</h3></div></div></div><a
id="d0e11898" class="indexterm"/><a id="d0e11905"
class="indexterm"/><a id="d0e11910"
class="indexterm"/><div class="para">
IPsec can also be configured to connect an entire network (such as a <acronym
class="acronym">LAN</acronym> or <acronym
class="acronym">WAN</acronym>) to a remote network using a
network-to-network connection. A network-to-network connection requires the setup of
<abbr class="abbrev">IPsec</abbr> routers on each side of the
connecting networks to transparently process and route information from one node on a
<acronym class="acronym">LAN</acronym> to a node on a remote
<acronym class="acronym">LAN</acronym>. <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html#figu-Security_Guide-IPsec_Network_to_Network_Configuration-A_network_to_network_IPsec_tunneled_connection"
title="Figure 2.11. A network-to-network IPsec tunneled
connection">Figure 2.11, “A network-to-network IPsec tunneled
connection”</a> shows a network-to-network <abbr
class="abbrev">IPsec</abbr> tunneled connection.
</div><div class="figure"
id="figu-Security_Guide-IPsec_Network_to_Network_Configuration-A_network_to_network_IPsec_tunneled_connection"><div
class="figure-contents"><div class="mediaobject"><img
src="images/n-t-n-ipsec-diagram.png" alt="A network-to-network IPsec
tunneled connection"/><div class="longdesc"><div
class="para">
A network-to-network <abbr class="abbrev">IPsec</abbr>
tunneled connection
</div></div></div></div><h6>Figure 2.11. A
network-to-network <abbr class="abbrev">IPsec</abbr> tunneled
connection</h6></div><br class="figure-break"/><div
class="para">
This diagram shows two separate <acronym
class="acronym">LAN</acronym>s separated by the Internet. These
<acronym class="acronym">LAN</acronym>s use <abbr
class="abbrev">IPsec</abbr> routers to authenticate and initiate a
connection using a secure tunnel through the Internet. Packets that are intercepted in
transit would require brute-force decryption in order to crack the cipher protecting the
packets between these <acronym class="acronym">LAN</acronym>s. The
process of communicating from one node in the 192.168.1.0/24 IP range to another in the
192.168.2.0/24 range is completely transparent to the nodes as the processing,
encryption/decryption, and routing of the <abbr
class="abbrev">IPsec</abbr> packets are completely handled by the
<abbr class="abbrev">IPsec</abbr> router.
</div><div class="para">
The information needed for a network-to-network connection include:
</div><div class="itemizedlist"><ul><li><div
class="para">
The externally-accessible IP addresses of the dedicated <abbr
class="abbrev">IPsec</abbr> routers
</div></li><li><div class="para">
The network address ranges of the <acronym
class="acronym">LAN</acronym>/<acronym
class="acronym">WAN</acronym> served by the <abbr
class="abbrev">IPsec</abbr> routers (such as 192.168.1.0/24 or
10.0.1.0/24)
</div></li><li><div class="para">
The IP addresses of the gateway devices that route the data from the network nodes to
the Internet
</div></li><li><div class="para">
A unique name, for example, <code
class="computeroutput">ipsec1</code>. This is used to identify the
<abbr class="abbrev">IPsec</abbr> connection and to distinguish it
from other devices or connections.
</div></li><li><div class="para">
A fixed encryption key or one automatically generated by <code
class="command">racoon</code>
</div></li><li><div class="para">
A pre-shared authentication key that is used during the initial stage of the
connection and to exchange encryption keys during the session.
</div></li></ul></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Network_to_Network_VPN_Connection">2.7.7.1. Network-to-Network
(<abbr class="abbrev">VPN</abbr>)
Connection</h4></div></div></div><a id="d0e12020"
class="indexterm"/><a id="d0e12025"
class="indexterm"/><div class="para">
A network-to-network <abbr class="abbrev">IPsec</abbr>
connection uses two <abbr class="abbrev">IPsec</abbr> routers, one
for each network, through which the network traffic for the private subnets is routed.
</div><div class="para">
For example, as shown in <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html#figu-Security_Guide-Network_to_Network_VPN_Connection-Network_to_Network_IPsec"
title="Figure 2.12. Network-to-Network IPsec">Figure 2.12,
“Network-to-Network IPsec”</a>, if the 192.168.1.0/24 private network sends network
traffic to the 192.168.2.0/24 private network, the packets go through gateway0, to ipsec0,
through the Internet, to ipsec1, to gateway1, and to the 192.168.2.0/24 subnet.
</div><div class="para">
<abbr class="abbrev">IPsec</abbr> routers require publicly
addressable IP addresses and a second Ethernet device connected to their respective
private networks. Traffic only travels through an <abbr
class="abbrev">IPsec</abbr> router if it is intended for another
<abbr class="abbrev">IPsec</abbr> router with which it has an
encrypted connection.
</div><div class="figure"
id="figu-Security_Guide-Network_to_Network_VPN_Connection-Network_to_Network_IPsec"><div
class="figure-contents"><div class="mediaobject"><img
src="images/n-t-n-ipsec-diagram.png" alt="Network-to-Network
IPsec"/><div class="longdesc"><div class="para">
Network-to-Network IPsec
</div></div></div></div><h6>Figure 2.12. Network-to-Network
IPsec</h6></div><br class="figure-break"/><div
class="para">
Alternate network configuration options include a firewall between each IP router and
the Internet, and an intranet firewall between each <abbr
class="abbrev">IPsec</abbr> router and subnet gateway. The <abbr
class="abbrev">IPsec</abbr> router and the gateway for the subnet can
be one system with two Ethernet devices: one with a public IP address that acts as the
<abbr class="abbrev">IPsec</abbr> router; and one with a private IP
address that acts as the gateway for the private subnet. Each <abbr
class="abbrev">IPsec</abbr> router can use the gateway for its private
network or a public gateway to send the packets to the other <abbr
class="abbrev">IPsec</abbr> router.
</div><div class="para">
Use the following procedure to configure a network-to-network <abbr
class="abbrev">IPsec</abbr> connection:
</div><div class="orderedlist"><ol><li><div
class="para">
In a command shell, type <code
class="command">system-config-network</code> to start the <span
class="application"><strong>Network Administration
Tool</strong></span>.
</div></li><li><div class="para">
On the <span
class="guilabel"><strong>IPsec</strong></span> tab, click
<span class="guibutton"><strong>New</strong></span> to
start the <abbr class="abbrev">IPsec</abbr> configuration wizard.
</div></li><li><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to start
configuring a network-to-network <abbr class="abbrev">IPsec</abbr>
connection.
</div></li><li><div class="para">
Enter a unique nickname for the connection, for example, <strong
class="userinput"><code>ipsec0</code></strong>. If
required, select the check box to automatically activate the connection when the computer
starts. Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li><li><div class="para">
Select <span class="guilabel"><strong>Network to Network
encryption (VPN)</strong></span> as the connection type, and then click
<span
class="guibutton"><strong>Forward</strong></span>.
</div></li><li><div class="para">
Select the type of encryption to use: manual or automatic.
</div><a id="d0e12136" class="indexterm"/><a
id="d0e12140" class="indexterm"/><div
class="para">
If you select manual encryption, an encryption key must be provided later in the
process. If you select automatic encryption, the <code
class="command">racoon</code> daemon manages the encryption key. The
<code class="filename">ipsec-tools</code> package must be installed
if you want to use automatic encryption.
</div><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div></li><li><div class="para">
On the <span class="guilabel"><strong>Local
Network</strong></span> page, enter the following information:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="guilabel"><strong>Local Network
Address</strong></span> — The IP address of the device on the <abbr
class="abbrev">IPsec</abbr> router connected to the private network.
</div></li><li><div class="para">
<span class="guilabel"><strong>Local Subnet
Mask</strong></span> — The subnet mask of the local network IP address.
</div></li><li><div class="para">
<span class="guilabel"><strong>Local Network
Gateway</strong></span> — The gateway for the private subnet.
</div></li></ul></div><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div><div class="figure"
id="figu-Security_Guide-Network_to_Network_VPN_Connection-Local_Network_Information"><div
class="figure-contents"><div class="mediaobject"><img
src="images/n-to-n-ipsec-local.png" alt="Local Network
Information"/><div class="longdesc"><div
class="para">
Local Network Information
</div></div></div></div><h6>Figure 2.13. Local
Network Information</h6></div><br
class="figure-break"/></li><li><div
class="para">
On the <span class="guilabel"><strong>Remote
Network</strong></span> page, enter the following information:
</div><div class="itemizedlist"><ul><li><div
class="para">
<span class="guilabel"><strong>Remote IP
Address</strong></span> — The publicly addressable IP address of the <abbr
class="abbrev">IPsec</abbr> router for the <span
class="emphasis"><em>other</em></span> private network. In
our example, for ipsec0, enter the publicly addressable IP address of ipsec1, and vice
versa.
</div></li><li><div class="para">
<span class="guilabel"><strong>Remote Network
Address</strong></span> — The network address of the private subnet behind the
<span class="emphasis"><em>other</em></span> <abbr
class="abbrev">IPsec</abbr> router. In our example, enter <strong
class="userinput"><code>192.168.1.0</code></strong> if
configuring ipsec1, and enter <strong
class="userinput"><code>192.168.2.0</code></strong> if
configuring ipsec0.
</div></li><li><div class="para">
<span class="guilabel"><strong>Remote Subnet
Mask</strong></span> — The subnet mask of the remote IP address.
</div></li><li><div class="para">
<span class="guilabel"><strong>Remote Network
Gateway</strong></span> — The IP address of the gateway for the remote network
address.
</div></li><li><div class="para">
If manual encryption was selected in step <a class="xref"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec_Network_to_Network_Configuration.html#list-Security_Guide-list-Security_Guide-list-Security_Guide-st-host-encrypt-type-n">6</a>,
specify the encryption key to use or click <span
class="guibutton"><strong>Generate</strong></span> to
create one.
</div><div class="para">
Specify an authentication key or click <span
class="guibutton"><strong>Generate</strong></span> to
generate one. This key can be any combination of numbers and letters.
</div></li></ul></div><div class="para">
Click <span
class="guibutton"><strong>Forward</strong></span> to
continue.
</div><div class="figure"
id="figu-Security_Guide-Network_to_Network_VPN_Connection-Remote_Network_Information"><div
class="figure-contents"><div class="mediaobject"><img
src="images/n-to-n-ipsec-remote.png" alt="Remote Network
Information"/><div class="longdesc"><div
class="para">
Remote Network Information
</div></div></div></div><h6>Figure 2.14. Remote
Network Information</h6></div><br
class="figure-break"/></li><li><div
class="para">
Verify the information on the <span
class="guilabel"><strong>IPsec — Summary</strong></span>
page, and then click <span
class="guibutton"><strong>Apply</strong></span>.
</div></li><li><div class="para">
Select <span
class="guimenu"><strong>File</strong></span> =>
<span class="guimenuitem"><strong>Save</strong></span>
to save the configuration.
</div></li><li><div class="para">
Select the <abbr class="abbrev">IPsec</abbr> connection from
the list, and then click <span
class="guibutton"><strong>Activate</strong></span> to
activate the connection.
</div></li><li><div class="para">
Enable IP forwarding:
</div><div class="orderedlist"><ol><li><div
class="para">
Edit <code class="filename">/etc/sysctl.conf</code> and set
<code class="computeroutput">net.ipv4.ip_forward</code> to
<strong class="userinput"><code>1</code></strong>.
</div></li><li><div class="para">
Use the following command to enable the change:
</div><pre class="screen">[root@myServer ~]# /sbin/sysctl -p
/etc/sysctl.conf
</pre></li></ol></div></li></ol></div><div
class="para">
The network script to activate the <abbr
class="abbrev">IPsec</abbr> connection automatically creates network
routes to send packets through the <abbr class="abbrev">IPsec</abbr>
router if necessary.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPsec_Host_to_Host_Configuration-Manual_IPsec_Host_to_Host_Configuration.html"><strong>Prev</strong>2.7.6.2. Manual
IPsec Host-to-Host Configuration</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"><strong>Next</strong>2.7.7.2. Manual
IPsec Network-to-Network
Configur...</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
and Stopping an IPsec Connection</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"
title="2.7.7.2. Manual IPsec Network-to-Network Configuration"/><link
rel="next" href="sect-Security_Guide-Firewalls.html"
title="2.8. Firewalls"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><i
mg src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-Starting_and_Stopping_an_IPsec_Connection">2.7.8. Starting
and Stopping an <abbr class="abbrev">IPsec</abbr>
Connection</h3></div></div></div><div
class="para">
If the <abbr class="abbrev">IPsec</abbr> connection was not
configured to activate on boot, you can control it from the command line.
</div><div class="para">
To start the connection, use the following command on each host for host-to-host IPsec,
or each <abbr class="abbrev">IPsec</abbr> router for
network-to-network IPsec:
</div><pre class="screen">[root@myServer ~] # /sbin/ifup <em
class="replaceable"><code><nickname></code></em>
</pre><div class="para">
where <em
class="replaceable"><code><nickname></code></em>
is the nickname configured earlier, such as <code
class="computeroutput">ipsec0</code>.
</div><div class="para">
To stop the connection, use the following command:
</div><pre class="screen">[root@myServer ~] # /sbin/ifdown <em
class="replaceable"><code><nickname></code></em>
</pre></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-IPsec_Network_to_Network_Configuration-Manual_IPsec_Network_to_Network_Configuration.html"><strong>Prev</strong>2.7.7.2. Manual
IPsec Network-to-Network Configur...</a></li><li
class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Firewalls.html"><strong>Next</strong>2.8. Firewalls</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g... and
Fedora</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="prev"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"
title="2.7. Virtual Private Networks (VPNs)"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"
title="2.7.3. IPsec"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></
a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD">2.7.2. VPNs
and Fedora</h3></div></div></div><div
class="para">
Fedora provides various options in terms of implementing a software solution to
securely connect to a <acronym class="acronym">WAN</acronym>. <em
class="firstterm">Internet Protocol Security</em> (<acronym
class="acronym">IPsec</acronym>) is the supported <abbr
class="abbrev">VPN</abbr> implementation for Fedora, and sufficiently
addresses the usability needs of organizations with branch offices or remote users.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs.html"><strong>Prev</strong>2.7. Virtual
Private Networks (VPNs)</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-IPsec.html"><strong>Next</strong>2.7.3. IPsec</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Virtual_Private_Networks_VPNs.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Private Networks (VPNs)</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Securing_Your_Network.html"
title="Chapter 2. Securing Your Network"/><link rel="prev"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"
title="2.6.10.2. Useful Kerberos Websites"/><link rel="next"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"
title="2.7.2. VPNs and Fedora"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_righ
t.png" alt="Documentation Site"/></a></p><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs">2.7. Virtual Private
Networks (VPNs)</h2></div></div></div><a
id="d0e10932" class="indexterm"/><a id="d0e10935"
class="indexterm"/><div class="para">
Organizations with several satellite offices often connect to each other with dedicated
lines for efficiency and protection of sensitive data in transit. For example, many
businesses use frame relay or <em class="firstterm">Asynchronous Transfer
Mode</em> (<acronym class="acronym">ATM</acronym>) lines as an
end-to-end networking solution to link one office with others. This can be an expensive
proposition, especially for small to medium sized businesses (<acronym
class="acronym">SMB</acronym>s) that want to expand without paying the
high costs associated with enterprise-level, dedicated digital circuits.
</div><div class="para">
To address this need, <em class="firstterm">Virtual Private
Networks</em> (<abbr class="abbrev">VPN</abbr>s) were
developed. Following the same functional principles as dedicated circuits, <abbr
class="abbrev">VPN</abbr>s allow for secured digital communication
between two parties (or networks), creating a <em class="firstterm">Wide
Area Network</em> (<acronym class="acronym">WAN</acronym>)
from existing <em class="firstterm">Local Area Networks</em>
(<acronym class="acronym">LAN</acronym>s). Where it differs from
frame relay or ATM is in its transport medium. <abbr
class="abbrev">VPN</abbr>s transmit over IP using datagrams as the
transport layer, making it a secure conduit through the Internet to an intended
destination. Most free software <abbr class="abbrev">VPN</abbr>
implementations incorporate open standard encryption methods to further mask data in
transit.
</div><div class="para">
Some organizations employ hardware <abbr class="abbrev">VPN</abbr>
solutions to augment security, while others use software or protocol-based
implementations. Several vendors provide hardware <abbr
class="abbrev">VPN</abbr> solutions, such as Cisco, Nortel, IBM, and
Checkpoint. There is a free software-based <abbr
class="abbrev">VPN</abbr> solution for Linux called FreeS/Wan that
utilizes a standardized <em class="firstterm">Internet Protocol
Security</em> (<abbr class="abbrev">IPsec</abbr>)
implementation. These <abbr class="abbrev">VPN</abbr> solutions,
irrespective of whether they are hardware or software based, act as specialized routers
that exist between the IP connection from one office to another.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Virtual_Private_Networks_VPNs-How_Does_a_VPN_Work">2.7.1. How
Does a VPN Work?</h3></div></div></div><div
class="para">
When a packet is transmitted from a client, it sends it through the <abbr
class="abbrev">VPN</abbr> router or gateway, which adds an <em
class="firstterm">Authentication Header</em> (<abbr
class="abbrev">AH</abbr>) for routing and authentication. The data is
then encrypted and, finally, enclosed with an <em
class="firstterm">Encapsulating Security Payload</em> (<abbr
class="abbrev">ESP</abbr>). This latter constitutes the decryption and
handling instructions.
</div><div class="para">
The receiving <abbr class="abbrev">VPN</abbr> router strips the
header information, decrypts the data, and routes it to its intended destination (either a
workstation or other node on a network). Using a network-to-network connection, the
receiving node on the local network receives the packets already decrypted and ready for
processing. The encryption/decryption process in a network-to-network <abbr
class="abbrev">VPN</abbr> connection is transparent to a local node.
</div><div class="para">
With such a heightened level of security, an attacker must not only intercept a packet,
but decrypt the packet as well. Intruders who employ a man-in-the-middle attack between a
server and client must also have access to at least one of the private keys for
authenticating sessions. Because they employ several layers of authentication and
encryption, <abbr class="abbrev">VPN</abbr>s are a secure and
effective means of connecting multiple remote nodes to act as a unified intranet.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Additional_Resources-Useful_Kerberos_Websites.html"><strong>Prev</strong>2.6.10.2. Useful
Kerberos Websites</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Virtual_Private_Networks_VPNs-VPNs_and_PROD.html"><strong>Next</strong>2.7.2. VPNs
and Fedora</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Assessment and Testing</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment.html"
title="1.2. Vulnerability Assessment"/><link rel="prev"
href="sect-Security_Guide-Vulnerability_Assessment.html"
title="1.2. Vulnerability Assessment"/><link rel="next"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"
title="1.2.3. Evaluating the Tools"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Docume
ntation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing">1.2.2. Defining
Assessment and Testing</h3></div></div></div><a
id="d0e683" class="indexterm"/><a id="d0e690"
class="indexterm"/><div class="para">
Vulnerability assessments may be broken down into one of two types: <em
class="firstterm">Outside looking in</em> and <em
class="firstterm">inside looking around</em>.
</div><div class="para">
When performing an outside looking in vulnerability assessment, you are attempting to
compromise your systems from the outside. Being external to your company provides you with
the cracker's viewpoint. You see what a cracker sees — publicly-routable IP addresses,
systems on your <em class="firstterm">DMZ</em>, external interfaces
of your firewall, and more. DMZ stands for "demilitarized zone", which
corresponds to a computer or small subnetwork that sits between a trusted internal
network, such as a corporate private LAN, and an untrusted external network, such as the
public Internet. Typically, the DMZ contains devices accessible to Internet traffic, such
as Web (HTTP ) servers, FTP servers, SMTP (e-mail) servers and DNS servers.
</div><div class="para">
When you perform an inside looking around vulnerability assessment, you are somewhat at
an advantage since you are internal and your status is elevated to trusted. This is the
viewpoint you and your co-workers have once logged on to your systems. You see print
servers, file servers, databases, and other resources.
</div><div class="para">
There are striking distinctions between these two types of vulnerability assessments.
Being internal to your company gives you elevated privileges more so than any outsider.
Still today in most organizations, security is configured in such a manner as to keep
intruders out. Very little is done to secure the internals of the organization (such as
departmental firewalls, user-level access controls, authentication procedures for internal
resources, and more). Typically, there are many more resources when looking around inside
as most systems are internal to a company. Once you set yourself outside of the company,
you immediately are given an untrusted status. The systems and resources available to you
externally are usually very limited.
</div><div class="para">
Consider the difference between vulnerability assessments and <em
class="firstterm">penetration tests</em>. Think of a vulnerability
assessment as the first step to a penetration test. The information gleaned from the
assessment is used for testing. Whereas, the assessment is checking for holes and
potential vulnerabilities, the penetration testing actually attempts to exploit the
findings.
</div><div class="para">
Assessing network infrastructure is a dynamic process. Security, both information and
physical, is dynamic. Performing an assessment shows an overview, which can turn up false
positives and false negatives.
</div><div class="para">
Security administrators are only as good as the tools they use and the knowledge they
retain. Take any of the assessment tools currently available, run them against your
system, and it is almost a guarantee that there are some false positives. Whether by
program fault or user error, the result is the same. The tool may find vulnerabilities
which in reality do not exist (false positive); or, even worse, the tool may not find
vulnerabilities that actually do exist (false negative).
</div><div class="para">
Now that the difference between a vulnerability assessment and a penetration test is
defined, take the findings of the assessment and review them carefully before conducting a
penetration test as part of your new best practices approach.
</div><div class="warning"><h2>Warning</h2><div
class="para">
Attempting to exploit vulnerabilities on production resources can have adverse effects
to the productivity and efficiency of your systems and network.
</div></div><div class="para">
The following list examines some of the benefits to performing vulnerability
assessments.
</div><div class="itemizedlist"><ul><li><div
class="para">
Creates proactive focus on information security
</div></li><li><div class="para">
Finds potential exploits before crackers find them
</div></li><li><div class="para">
Results in systems being kept up to date and patched
</div></li><li><div class="para">
Promotes growth and aids in developing staff expertise
</div></li><li><div class="para">
Abates Financial loss and negative publicity
</div></li></ul></div><div class="section"
lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Defining_Assessment_and_Testing-Establishing_a_Methodology">1.2.2.1. Establishing
a Methodology</h4></div></div></div><a id="d0e751"
class="indexterm"/><div class="para">
To aid in the selection of tools for a vulnerability assessment, it is helpful to
establish a vulnerability assessment methodology. Unfortunately, there is no predefined or
industry approved methodology at this time; however, common sense and best practices can
act as a sufficient guide.
</div><div class="para">
<span class="emphasis"><em>What is the target? Are we looking at
one server, or are we looking at our entire network and everything within the network? Are
we external or internal to the company?</em></span> The answers to these
questions are important as they help determine not only which tools to select but also the
manner in which they are used.
</div><div class="para">
To learn more about establishing methodologies, refer to the following websites:
</div><div class="itemizedlist"><ul><li><div
class="para">
<a
href="http://www.isecom.org/projects/osstmm.htm">http://www....
<em class="citetitle">The Open Source Security Testing Methodology
Manual</em> (OSSTMM)
</div></li><li><div class="para">
<a
href="http://www.owasp.org/">http://www.owasp.org/</a>
<em class="citetitle">The Open Web Application Security
Project</em>
</div></li></ul></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment.html"><strong>Prev</strong>1.2. Vulnerability
Assessment</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html"><strong>Next</strong>1.2.3. Evaluating
the Tools</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
the Tools</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-Vulnerability_Assessment.html"
title="1.2. Vulnerability Assessment"/><link rel="prev"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"
title="1.2.2. Defining Assessment and Testing"/><link rel="next"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"
title="1.2.3.2. Nessus"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Docume
ntation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Vulnerability_Assessment-Evaluating_the_Tools">1.2.3. Evaluating
the Tools</h3></div></div></div><div
class="para">
An assessment can start by using some form of an information gathering tool. When
assessing the entire network, map the layout first to find the hosts that are running.
Once located, examine each host individually. Focusing on these hosts requires another set
of tools. Knowing which tools to use may be the most crucial step in finding
vulnerabilities.
</div><div class="para">
Just as in any aspect of everyday life, there are many different tools that perform the
same job. This concept applies to performing vulnerability assessments as well. There are
tools specific to operating systems, applications, and even networks (based on the
protocols used). Some tools are free; others are not. Some tools are intuitive and easy to
use, while others are cryptic and poorly documented but have features that other tools do
not.
</div><div class="para">
Finding the right tools may be a daunting task and in the end, experience counts. If
possible, set up a test lab and try out as many tools as you can, noting the strengths and
weaknesses of each. Review the README file or man page for the tool. Additionally, look to
the Internet for more information, such as articles, step-by-step guides, or even mailing
lists specific to a tool.
</div><div class="para">
The tools discussed below are just a small sampling of the available tools.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-Evaluating_the_Tools-Scanning_Hosts_with_Nmap">1.2.3.1. Scanning
Hosts with Nmap</h4></div></div></div><a id="d0e800"
class="indexterm"/><a id="d0e805"
class="indexterm"/><div class="para">
Nmap is a popular tool included in Fedora that can be used to determine the layout of
a network. Nmap has been available for many years and is probably the most often used tool
when gathering information. An excellent man page is included that provides a detailed
description of its options and usage. Administrators can use Nmap on a network to find
host systems and open ports on those systems.
</div><div class="para">
Nmap is a competent first step in vulnerability assessment. You can map out all the
hosts within your network and even pass an option that allows Nmap to attempt to identify
the operating system running on a particular host. Nmap is a good foundation for
establishing a policy of using secure services and stopping unused services.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Scanning_Hosts_with_Nmap-Using_Nmap">1.2.3.1.1. Using
Nmap</h5></div></div></div><a id="d0e815"
class="indexterm"/><div class="para">
Nmap can be run from a shell prompt by typing the <code
class="command">nmap</code> command followed by the hostname or IP
address of the machine to scan.
</div><pre class="screen"><code
class="command">nmap foo.example.com</code>
</pre><div class="para">
The results of the scan (which could take up to a few minutes, depending on where the
host is located) should look similar to the following:
</div><pre class="screen"><code
class="computeroutput">Starting nmap V. 3.50 (
www.insecure.org/nmap/ )
Interesting ports on localhost.localdomain (127.0.0.1): (The 1591 ports scanned but not
shown below are in state: closed) Port State Service 22/tcp open ssh 25/tcp open smtp
111/tcp open sunrpc 443/tcp open https 515/tcp open printer 950/tcp open oftep-rpc
6000/tcp open X11 Nmap run completed -- 1 IP address (1 host up) scanned in 71.825
seconds</code>
</pre><div class="para">
Nmap tests the most common network communication ports for listening or waiting
services. This knowledge can be helpful to an administrator who wants to close down
unnecessary or unused services.
</div><div class="para">
For more information about using Nmap, refer to the official homepage at the
following URL:
</div><div class="para">
<a
href="http://www.insecure.org/">http://www.insecure.org/<...
</div></div></div></div><ul
class="docnav"><li class="previous"><a
accesskey="p"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"><strong>Prev</strong>1.2.2. Defining
Assessment and Testing</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Evaluating_the_Tools-Nessus.html"><strong>Next</strong>1.2.3.2. Nessus</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-Vulnerability_Assessment.html ---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
Assessment</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/><link rel="prev"
href="chap-Security_Guide-Security_Overview.html"
title="Chapter 1. Security Overview"/><link rel="next"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"
title="1.2.2. Defining Assessment and
Testing"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right"
href="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documen
tation Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Security_Overview.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h2 class="title"
id="sect-Security_Guide-Vulnerability_Assessment">1.2. Vulnerability
Assessment</h2></div></div></div><a id="d0e646"
class="indexterm"/><div class="para">
Given time, resources, and motivation, a cracker can break into nearly any system. At
the end of the day, all of the security procedures and technologies currently available
cannot guarantee that any systems are safe from intrusion. Routers help secure gateways to
the Internet. Firewalls help secure the edge of the network. Virtual Private Networks
safely pass data in an encrypted stream. Intrusion detection systems warn you of malicious
activity. However, the success of each of these technologies is dependent upon a number of
variables, including:
</div><div class="itemizedlist"><ul><li><div
class="para">
The expertise of the staff responsible for configuring, monitoring, and maintaining
the technologies.
</div></li><li><div class="para">
The ability to patch and update services and kernels quickly and efficiently.
</div></li><li><div class="para">
The ability of those responsible to keep constant vigilance over the network.
</div></li></ul></div><div class="para">
Given the dynamic state of data systems and technologies, securing corporate resources
can be quite complex. Due to this complexity, it is often difficult to find expert
resources for all of your systems. While it is possible to have personnel knowledgeable in
many areas of information security at a high level, it is difficult to retain staff who
are experts in more than a few subject areas. This is mainly because each subject area of
information security requires constant attention and focus. Information security does not
stand still.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h3 class="title"
id="sect-Security_Guide-Vulnerability_Assessment-Thinking_Like_the_Enemy">1.2.1. Thinking
Like the Enemy</h3></div></div></div><div
class="para">
Suppose that you administer an enterprise network. Such networks are commonly comprised
of operating systems, applications, servers, network monitors, firewalls, intrusion
detection systems, and more. Now imagine trying to keep current with each of these. Given
the complexity of today's software and networking environments, exploits and bugs are
a certainty. Keeping current with patches and updates for an entire network can prove to
be a daunting task in a large organization with heterogeneous systems.
</div><div class="para">
Combine the expertise requirements with the task of keeping current, and it is
inevitable that adverse incidents occur, systems are breached, data is corrupted, and
service is interrupted.
</div><div class="para">
To augment security technologies and aid in protecting systems, networks, and data, you
must think like a cracker and gauge the security of your systems by checking for
weaknesses. Preventative vulnerability assessments against your own systems and network
resources can reveal potential issues that can be addressed before a cracker exploits it.
</div><div class="para">
A vulnerability assessment is an internal audit of your network and system security;
the results of which indicate the confidentiality, integrity, and availability of your
network (as explained in <a class="xref"
href="chap-Security_Guide-Security_Overview.html#sect-Security_Guide-What_is_Computer_Security-Standardizing_Security"
title="1.1.1.3. Standardizing Security">Section 1.1.1.3, “Standardizing
Security”</a>). Typically, vulnerability assessment starts with a reconnaissance
phase, during which important data regarding the target systems and resources is gathered.
This phase leads to the system readiness phase, whereby the target is essentially checked
for all known vulnerabilities. The readiness phase culminates in the reporting phase,
where the findings are classified into categories of high, medium, and low risk; and
methods for improving the security (or mitigating the risk of vulnerability) of the target
are discussed.
</div><div class="para">
If you were to perform a vulnerability assessment of your home, you would likely check
each door to your home to see if they are closed and locked. You would also check every
window, making sure that they closed completely and latch correctly. This same concept
applies to systems, networks, and electronic data. Malicious users are the thieves and
vandals of your data. Focus on their tools, mentality, and motivations, and you can then
react swiftly to their actions.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="chap-Security_Guide-Security_Overview.html"><strong>Prev</strong>Chapter 1. Security
Overview</a></li><li class="up"><a accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Vulnerability_Assessment-Defining_Assessment_and_Testing.html"><strong>Next</strong>1.2.2. Defining
Assessment and Testing</a></li></ul></body></html>
--- NEW FILE
sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
xinetd Configuration Files</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"
title="2.5.4. xinetd Configuration Files"/><link rel="prev"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"
title="2.5.4.2. The /etc/xinetd.d/ Directory"/><link rel="next"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"
title="2.5.4.3.2. Access Control Options"/></head><body><p
id="title"><a class="left"
href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href="
http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files">2.5.4.3. Altering
xinetd Configuration Files</h4></div></div></div><div
class="para">
A range of directives is available for services protected by <code
class="systemitem">xinetd</code>. This section highlights some of the
more commonly used options.
</div><div class="section" lang="en-US"><div
class="titlepage"><div><div><h5 class="title"
id="sect-Security_Guide-Altering_xinetd_Configuration_Files-Logging_Options">2.5.4.3.1. Logging
Options</h5></div></div></div><a id="d0e8561"
class="indexterm"/><div class="para">
The following logging options are available for both <code
class="filename">/etc/xinetd.conf</code> and the service-specific
configuration files within the <code
class="filename">/etc/xinetd.d/</code> directory.
</div><div class="para">
The following is a list of some of the more commonly used logging options:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">ATTEMPT</code> — Logs the fact that a
failed attempt was made (<code
class="option">log_on_failure</code>).
</div></li><li><div class="para">
<code class="option">DURATION</code> — Logs the length of
time the service is used by a remote system (<code
class="option">log_on_success</code>).
</div></li><li><div class="para">
<code class="option">EXIT</code> — Logs the exit status or
termination signal of the service (<code
class="option">log_on_success</code>).
</div></li><li><div class="para">
<code class="option">HOST</code> — Logs the remote host's
IP address (<code class="option">log_on_failure</code> and <code
class="option">log_on_success</code>).
</div></li><li><div class="para">
<code class="option">PID</code> — Logs the process ID of the
server receiving the request (<code
class="option">log_on_success</code>).
</div></li><li><div class="para">
<code class="option">USERID</code> — Logs the remote user
using the method defined in RFC 1413 for all multi-threaded stream services (<code
class="option">log_on_failure</code> and<code
class="option">log_on_success</code>).
</div></li></ul></div><div class="para">
For a complete list of logging options, refer to the <code
class="filename">xinetd.conf</code> man page.
</div></div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html"><strong>Prev</strong>2.5.4.2. The
/etc/xinetd.d/ Directory</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-Altering_xinetd_Configuration_Files-Access_Control_Options.html"><strong>Next</strong>2.5.4.3.2. Access
Control Options</a></li></ul></body></html>
--- NEW FILE sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory.html
---
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"><head><title&g...
/etc/xinetd.d/ Directory</title><link rel="stylesheet"
href="./Common_Content/css/default.css" type="text/css"/><meta
name="generator" content="publican"/><meta
name="package"
content="fedora-Linux_Security_Guide-10-en-US-1.0-3"/><link
rel="home" href="index.html" title="Linux Security
Guide"/><link rel="up"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"
title="2.5.4. xinetd Configuration Files"/><link rel="prev"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"
title="2.5.4. xinetd Configuration Files"/><link rel="next"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"
title="2.5.4.3. Altering xinetd Configuration
Files"/></head><body><p id="title"><a
class="left" href="http://www.fedoraproject.org"><img
src="Common_Content/images/image_left.png" alt="Product
Site"/></a><a class="right" href
="http://docs.fedoraproject.org"><img
src="Common_Content/images/image_right.png" alt="Documentation
Site"/></a></p><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"><strong>Prev</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"><strong>Next</strong></a></li></ul><div
class="section" lang="en-US"><div
class="titlepage"><div><div><h4 class="title"
id="sect-Security_Guide-xinetd_Configuration_Files-The_etcxinetd.d_Directory">2.5.4.2. The
/etc/xinetd.d/ Directory</h4></div></div></div><a
id="d0e8400" class="indexterm"/><a id="d0e8410"
class="indexterm"/><div class="para">
The <code class="filename">/etc/xinetd.d/</code> directory
contains the configuration files for each service managed by <code
class="systemitem">xinetd</code> and the names of the files correlate
to the service. As with <code class="filename">xinetd.conf</code>,
this directory is read only when the <code
class="systemitem">xinetd</code> service is started. For any changes to
take effect, the administrator must restart the <code
class="systemitem">xinetd</code> service.
</div><div class="para">
The format of files in the <code
class="filename">/etc/xinetd.d/</code> directory use the same
conventions as <code class="filename">/etc/xinetd.conf</code>. The
primary reason the configuration for each service is stored in a separate file is to make
customization easier and less likely to affect other services.
</div><div class="para">
To gain an understanding of how these files are structured, consider the <code
class="filename">/etc/xinetd.d/krb5-telnet</code> file:
</div><pre class="screen">service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/telnetd
log_on_failure += USERID
disable = yes
}
</pre><div class="para">
These lines control various aspects of the <code
class="command">telnet</code> service:
</div><div class="itemizedlist"><ul><li><div
class="para">
<code class="option">service</code> — Specifies the service
name, usually one of those listed in the <code
class="filename">/etc/services</code> file.
</div></li><li><div class="para">
<code class="option">flags</code> — Sets any of a number of
attributes for the connection. <code class="option">REUSE</code>
instructs <code class="systemitem">xinetd</code> to reuse the socket
for a Telnet connection.
</div><div class="note"><h2>Note</h2><div
class="para">
The <code class="option">REUSE</code> flag is deprecated. All
services now implicitly use the <code class="option">REUSE</code>
flag.
</div></div></li><li><div class="para">
<code class="option">socket_type</code> — Sets the network
socket type to <code class="option">stream</code>.
</div></li><li><div class="para">
<code class="option">wait</code> — Specifies whether the
service is single-threaded (<code class="option">yes</code>) or
multi-threaded (<code class="option">no</code>).
</div></li><li><div class="para">
<code class="option">user</code> — Specifies which user ID the
process runs under.
</div></li><li><div class="para">
<code class="option">server</code> — Specifies which binary
executable to launch.
</div></li><li><div class="para">
<code class="option">log_on_failure</code> — Specifies logging
parameters for <code class="option">log_on_failure</code> in
addition to those already defined in <code
class="filename">xinetd.conf</code>.
</div></li><li><div class="para">
<code class="option">disable</code> — Specifies whether the
service is disabled (<code class="option">yes</code>) or enabled
(<code class="option">no</code>).
</div></li></ul></div><div class="para">
Refer to the <code class="filename">xinetd.conf</code> man page
for more information about these options and their usage.
</div></div><ul class="docnav"><li
class="previous"><a accesskey="p"
href="sect-Security_Guide-TCP_Wrappers_and_xinetd-xinetd_Configuration_Files.html"><strong>Prev</strong>2.5.4. xinetd
Configuration Files</a></li><li class="up"><a
accesskey="u"
href="#"><strong>Up</strong></a></li><li
class="home"><a accesskey="h"
href="index.html"><strong>Home</strong></a></li><li
class="next"><a accesskey="n"
href="sect-Security_Guide-xinetd_Configuration_Files-Altering_xinetd_Configuration_Files.html"><strong>Next</strong>2.5.4.3. Altering
xinetd Configuration Files</a></li></ul></body></html>