Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Chapter 11


Published on


Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Chapter 11

  1. 1. Linux Networking and Security Chapter 11 Network Security Fundamentals
  2. 2. Network Security Fundamentals <ul><li>Summarize the types of network security breaches that crackers attempt </li></ul><ul><li>Describe how to use special routing techniques to protect local network traffic </li></ul><ul><li>Configure a basic Linux firewall </li></ul><ul><li>Use networking utilities and techniques that protect network traffic through encryption </li></ul>
  3. 3. Reviewing Threats to Your Network <ul><li>Trojan Horses are programs concealed within other programs that you intentionally install </li></ul><ul><ul><li>Once installed, the host program of the Trojan Horse appears to do one thing, but does another </li></ul></ul><ul><ul><li>One means of protection is to install programs from only trustworthy sources </li></ul></ul><ul><li>Viruses and Worms are designed to replicate themselves once they have been installed </li></ul><ul><ul><li>Linux is rarely the subject of virus attacks </li></ul></ul><ul><ul><li>Worms pose a greater threat to Linux </li></ul></ul>
  4. 4. Reviewing Threats to Your Network <ul><li>Denial-of-Service (DoS) attacks occur when a cracker overwhelms a system and causes it to shut down, or become unusable </li></ul><ul><ul><li>Two common methods are to overwhelm with network traffic and to execute network requests </li></ul></ul><ul><li>Buffer overflow attacks refer to any cracker attack that exploits a programming flaw </li></ul><ul><ul><li>The result can cause a network service to shut down, corrupt data, or provide unexpected access to a system </li></ul></ul>
  5. 5. Reviewing Threats to Your Network <ul><li>Spoofing is the forging of addresses </li></ul><ul><ul><li>crackers use IP and DNS spoofing </li></ul></ul><ul><li>Man-in-the-middle attacks are those in which a cracker intercepts a communication, reads or alters it, and leads the originator of the packet to believe the intended recipient has received it </li></ul><ul><ul><li>Another type of this attack is Web spoofing, where a user is linked to a cracker’s site when they believe they are linked to another </li></ul></ul>
  6. 6. Reviewing Threats to Your Network
  7. 7. Using Advanced Routing and Firewalls <ul><li>A firewall typically refers to a packet filter - access control operating at the lowest level of the networking protocol stack </li></ul><ul><li>Firewalls rely on rules, the configuration settings that define certain characteristics of an IP package and the action to take for packages meeting the specified criteria </li></ul><ul><li>Networking stacks in Linux are contained in the kernel and advanced routing and firewalls are implemented using the same Linux tools </li></ul>
  8. 8. Using Advanced Routing and Firewalls
  9. 9. Introducing IP Chains <ul><li>The IP Chains feature of Linux allows for the setup of a chain: a list of rules for how packets are handled </li></ul><ul><ul><li>Input chains: packets coming from outside the system on which the rule is executed pass through </li></ul></ul><ul><ul><li>Forward chains: packets coming from outside the system on which the rule is executed and that need to be routed to another system pass through </li></ul></ul><ul><ul><li>Output chains: Packets coming from within the system on which the rule is executed and that are destined for other systems pass through </li></ul></ul>
  10. 10. Introducing IP Chains
  11. 11. Introducing IP Chains
  12. 12. Network Address Translation <ul><li>The IP Chains feature also provides special routing functionality, such as Network Address Translation (NAT) </li></ul><ul><li>NAT is a routing technique that alters address or other header information in a packet </li></ul><ul><li>One popular type of NAT is IP masquerading, a type of network address translation in which packets from many computers on a LAN appear as if they came from one computer </li></ul>
  13. 13. Network Address Translation
  14. 14. Transparent Proxying <ul><li>Using a proxy server is very similar to IP masquerading, but the proxy works at the application level, not the IP level </li></ul><ul><li>An alternative to using a proxy server is to is to use the transparent proxy feature of IP Chains and IP Tables </li></ul><ul><li>Transparent proxy allows for the redirection of a packet based on the port to which the packet is addressed </li></ul>
  15. 15. Transparent Proxying
  16. 16. Transparent Proxying
  17. 17. Graphical Firewall Configuration Utilities <ul><li>Linux supports several graphical tools that can be used to set up a firewall </li></ul><ul><li>Red Hat Linux includes the lokkit program that walks you through questions and establishes rules based on your security choices </li></ul><ul><li>Red Hat Linux also includes the firewall-config program, which allows the set up of complex firewall rules </li></ul>
  18. 18. Graphical Firewall Configuration Utilities
  19. 19. Graphical Firewall Configuration Utilities
  20. 20. Graphical Firewall Configuration Utilities
  21. 21. Graphical Firewall Configuration Utilities
  22. 22. Graphical Firewall Configuration Utilities
  23. 23. Graphical Firewall Configuration Utilities
  24. 24. Using NetFilter and IP Tables <ul><li>NetFilter is the new and improved Linux packet filtering system and uses a different architecture than IP Chains </li></ul><ul><li>NetFilter is improved in that it provides hooks at five different points in packet processing </li></ul><ul><li>A hook refers to the ability to connect another program at that point </li></ul><ul><li>The list of rules associated with the hooks are similar to IP Chains and are called IP Tables </li></ul>
  25. 25. Using NetFilter and IP Tables <ul><li>IP Table and NetFilter provide: </li></ul><ul><ul><li>The ability to act on packets based on their state </li></ul></ul><ul><ul><li>Examination and alteration of just about any header field in a packet - this is packet mangling </li></ul></ul><ul><ul><li>Selection of packets to be logged based on the value of any header field </li></ul></ul><ul><ul><li>Passing of packets to regular Linux programs for further processing outside of the Linux kernel </li></ul></ul><ul><ul><li>Implementation of intelligent routing based on Quality of Service (QoS) features </li></ul></ul>
  26. 26. Commercial Firewall Products <ul><li>Many companies have created commercial security products for Linux, some are software, but many are separate hardware </li></ul><ul><li>A hardware device that is sold specifically to accomplish a purpose is called an appliance </li></ul><ul><li>Astaro Security Linux is a firewall product that does many of the things NetFilter can do and more, plus it includes web-based tools </li></ul><ul><li>NetMAX VPN Server Suite is another hardware solution built on Linux </li></ul>
  27. 27. Encrypting Network Traffic <ul><li>The Secure Shell (SSH) package is a client server protocol similar to Telnet </li></ul><ul><li>The OpenSSH implementation of the SSH is used on most Linux distributions </li></ul><ul><li>SSH and OpenSSH support two versions: </li></ul><ul><ul><li>SSH protocol version 1 (SSH1) uses a public key encryption system to authenticate connections </li></ul></ul><ul><ul><li>SSH2 uses a more robust authentication process and also supports strong encryption of all network traffic </li></ul></ul>
  28. 28. Encrypting Network Traffic <ul><li>OpenSSH supports a number of very useful features besides replacing Telnet and rlogin: </li></ul><ul><ul><li>The ssh utility can be used to encrypt other network traffic, especially for protocols not inherently secure </li></ul></ul><ul><ul><li>Its ability to do port forwarding, which is a routing technique that allows encryption of many other protocols over SSH connections </li></ul></ul><ul><ul><li>With more complex configurations, SSH can be used to tunnel from a remote system through a firewall to an internal server </li></ul></ul>
  29. 29. Encrypting Network Traffic
  30. 30. Encrypting Network Traffic
  31. 31. Other Tunneling Protocols
  32. 32. Other Tunneling Protocols <ul><li>The concept behind using SSH port forwarding is that you can tunnel and insecure protocol inside a secure protocol </li></ul><ul><li>The Point-to-Point Tunneling Protocol (PPTP) is a standard for creating a virtual private network (VPN) </li></ul><ul><ul><li>PPTP uses two communication channels between a client and a server; the first is a control channel, the second carries data and can be encrypted </li></ul></ul>
  33. 33. Other Tunneling Protocols <ul><li>The stunnel package allows for the use of SSL as a transport protocol for other network traffic instead of just HTTP (Web) traffic </li></ul><ul><li>The following protocols are examples of what can be encrypted using stunnel: </li></ul><ul><ul><li>POP3, IMAP, NNTP, SMTP, PPP </li></ul></ul><ul><li>stunnel can be used from a superserver or directly on the command line </li></ul>
  34. 34. Creating a Virtual Private Network <ul><li>VPNs allow multiple computers to function as part of a single, secure network when parts of the private network are actually separated by a public network such as the Internet </li></ul><ul><li>A VPN is a like a special application of tunneling, because it lets a group of computers that can be remote to each other act as a single secure LAN by tunneling traffic through specially configured network connections </li></ul>
  35. 35. Creating a VPN
  36. 36. Creating a VPN
  37. 37. Creating a VPN
  38. 38. Creating a VPN
  39. 39. Configuring Security Services
  40. 40. Chapter Summary <ul><li>Trojan Horse programs appear to be normal but perform actions that compromise system security </li></ul><ul><li>Viruses and worms are self-propagating security problems. Viruses typically attach themselves to data files; worms work independently of other programs </li></ul><ul><li>Denial-of-Service (DoS) attacks try to block access by legitimate users </li></ul><ul><li>Buffer overflow attacks rely on a programming oversight to corrupt data or gain unauthorized access by sending unexpected data to a network service </li></ul>
  41. 41. Chapter Summary <ul><li>Spoofing attacks pretend that a data packet is coming from a service or location that is not accurate; the man-in-the-middle attack is is a concern when someone might be able to intercept network traffic </li></ul><ul><li>Firewalls filter data packets based on their source, destination, protocol, or other aspects of a packet’s makeup; a Linux firewall is controlled through the Linux kernel </li></ul><ul><li>Linux firewalls are created using IP Chains, or IP Tables; both let a system administrator add rules to control which packets are accepted or discarded </li></ul>
  42. 42. Chapter Summary <ul><li>Rules used by firewalls define characteristics of IP packets and how to handle matching packets </li></ul><ul><li>IP masquerading is a type of network address translation that lets multiple users access to an external network such as the Internet through a single system acting as though it were generating all of the traffic; transparent proxy lets you redirect packets to different ports </li></ul><ul><li>Programs for setting up and managing firewall rules are included in Red Hat Linux; these include lokkit and firewall-config </li></ul>
  43. 43. Chapter Summary <ul><li>IP Tables provide several routing and security features that IP Chains did not include, such as packet mangling and support for Quality of Service/Type of Service flags </li></ul><ul><li>Many commercial firewall products are available for Linux; some are software and some are dedicated security appliances </li></ul><ul><li>The Secure Shell protocol (SSH), implemented in the OpenSSH package, provides an encrypted replacement for Telnet, as well as encrypted communications for many other protocols using the port forwarding feature of SSH </li></ul>
  44. 44. Chapter Summary <ul><li>SSH uses either RSA or DSA public-key cryptography plus a symmetric cipher such as AES </li></ul><ul><li>The PPTP protocol was developed by Microsoft to implement a Windows VPN; PPTP uses an encrypted PPP session plus a separate control channel </li></ul><ul><li>The stunnel package uses the SSL protocol to encrypt other protocols such as POP3 and IMAP; stunnel can be used from a superserver or directly on the command line </li></ul><ul><li>Tunneling one TCP-based protocol inside another can cause delays and dropped connections </li></ul>
  45. 45. Chapter Summary <ul><li>Linux security features can be used to create an effective virtual private network (VPN); Many companies sell dedicated VPN appliances based on Linux </li></ul><ul><li>Many Webmin modules are available to help configure security services on Linux </li></ul>