Linux MPS Firewall Supplement



Similar documents
Linux MDS Firewall Supplement

Firewall Firewall August, 2003

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

EXPLORER. TFT Filter CONFIGURATION

Attack Lab: Attacks on TCP/IP Protocols

Stateful Firewalls. Hank and Foo

z/os V1R11 Communications Server system management and monitoring

Configure a Microsoft Windows Workstation Internal IP Stateful Firewall

Virtual Server and DDNS. Virtual Server and DDNS. For BIPAC 741/743GE

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Chapter 11 Cloud Application Development

SWsoft, Inc. Plesk Firewall. Administrator's Guide

Step-by-Step Configuration

My FreeScan Vulnerabilities Report

allow all such packets? While outgoing communications request information from a

Cisco Configuring Commonly Used IP ACLs

BASIC ANALYSIS OF TCP/IP NETWORKS

Technical Support Information Belkin internal use only

Linux Network Security

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Avaya Port Matrix: Avaya Diagnostic Server 2.5

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Firewalls. Basic Firewall Concept. Why firewalls? Firewall goals. Two Separable Topics. Firewall Design & Architecture Issues

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Firewall Stateful Inspection of ICMP

ΕΠΛ 674: Εργαστήριο 5 Firewalls

IBM Security QRadar Version Common Ports Guide

Implementing Network Address Translation and Port Redirection in epipe

Chapter 7. Firewalls

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

1 hours, 30 minutes, 38 seconds Heavy scan. All scanned network resources. Copyright 2001, FTP access obtained

Port Scanning. Objectives. Introduction: Port Scanning. 1. Introduce the techniques of port scanning. 2. Use port scanning audit tools such as Nmap.

Cisco IOS Flexible NetFlow Command Reference

CS2107 Introduction to Information and System Security (Slid. (Slide set 8)

Parallels Plesk Panel

Manuale Turtle Firewall

Linux Networking: IP Packet Filter Firewalling

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

CS5008: Internet Computing

Parallels Plesk Control Panel

Firewall Examples. Using a firewall to control traffic in networks

Lab Developing ACLs to Implement Firewall Rule Sets

Lab Objectives & Turn In

Network Security. Marcus Bendtsen Institutionen för Datavetenskap (IDA) Avdelningen för Databas- och Informationsteknik (ADIT)

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

About Firewall Protection

Guardian Digital WebTool Firewall HOWTO. by Pete O Hara

Networking Basics and Network Security

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Firewalls. Chien-Chung Shen

Chapter 4 Security and Firewall Protection

Internet Security Firewalls

CTS2134 Introduction to Networking. Module Network Security

Chapter 11. User Datagram Protocol (UDP)

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Product Standard General Interworking: Internet Server

Firewalls (IPTABLES)

Firewalls. Network Security. Firewalls Defined. Firewalls

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Proxies. Chapter 4. Network & Security Gildas Avoine

Project 2: Firewall Design (Phase I)

Deploying ACLs to Manage Network Security

10 Configuring Packet Filtering and Routing Rules

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

What is included in the ATRC server support

Network Configuration Settings

Chapter 3 Using Access Control Lists (ACLs)

+ iptables. packet filtering && firewall

FIREWALL AND NAT Lecture 7a

LESSON Networking Fundamentals. Understand TCP/IP

Figure 41-1 IP Filter Rules

Chapter 4 Firewall Protection and Content Filtering

Exam Questions SY0-401

Internet Security Firewalls

CCNA Access List Sim

Guide to DDoS Attacks December 2014 Authored by: Lee Myers, SOC Analyst

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

Stateful Inspection Technology

Placing the BlackBerry Enterprise Server for Microsoft Exchange in a demilitarized zone

CS Computer and Network Security: Firewalls

Cisco Expressway IP Port Usage for Firewall Traversal. Cisco Expressway X8.1 D December 2013

Troubleshooting Tools

Chapter 4 Restricting Access From Your Network

PIX/ASA 7.x with Syslog Configuration Example

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

Computer Networks/DV2 Lab

Connecting with Computer Science, 2e. Chapter 5 The Internet

Ports Reference Guide for Cisco Virtualization Experience Media Engine for SUSE Linux Release 9.0

How Do I Upgrade Firmware and Save Configurations on PowerConnect Switches?

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Transcription:

Linux MPS Firewall Supplement First Edition April 2007

Table of Contents Introduction...1 Two Options for Building a Firewall...2 Overview of the iptables Command-Line Utility...2 Overview of the set_fwlevel Command...2 File Locations...3 Services Affected By Your Firewall Security Settings...3 Protocols Affected by Your Firewall Security Settings...4 Specifying a Preset Firewall Security Level...5 Turning Off All Rules...5 Specifying Low Firewall Security...5 Block Port-Scans...5 Limit the effects of Denial of Service Attacks...5 Process Only Certain ICMP Packet Types...5 Specifying Medium Firewall Security...6 Specifying High Firewall Security...6 Modifying Your Firewall Security Settings...7 Specifying a Preset Server Type...8 How Web Server Settings Affect Firewall Security Settings...8 How Mail Server Settings Affect Firewall Security Settings...9 Modifying Your Server Type Settings...10 Notices...11 Table of Contents ii

Introduction A firewall monitors and controls the traffic coming into and out of your account. The traffic of the Internet consists of information which takes the form of data packets. A firewall evaluates each data packet and determines whether or not to pass the packet to your account. A firewall prevents your account from receiving an overwhelming quantity of unwanted traffic. Some of the unwanted traffic may be simply bothersome. Other traffic may actually be sent from malicious Internet users who intend to make your account inoperable. Either way, building a firewall is an important configuration task for you to consider. This document provides you with the information you need to understand, get started, and utilize preset firewall security settings using a custom, simplified command (set_fwlevel). Important: Although this document provides an overview of the iptables command line utility, it is does not provide the details of how to build a firewall with the utility. Knowledgeable administrators who wish to utilize the utility should refer to other resources and documentation. All who use the iptables command-line utility should carefully consider all of the tasks they perform with that utility. Always make back up files, stored remotely, for iptables configurations and settings you have previously tested and used. This document provides an update to the following print-ready customer documentation which is included, at no cost, as a feature of your Linux Managed Private Server (Linux MPS): Linux MPS Getting Started Guide Linux MPS Release Notes Linux MPS Technical Overview (available only through the Backroom) Linux MPS User s Guide There are also Web site resources such as Linux MPS Documentation Library and Frequently- Asked Questions (FAQ). This document includes the following sections: Two Options for Building a Firewall on page 2. Specifying a Preset Firewall Security Level on page 5. Specifying a Preset Server Type on page 8. Introduction 1

Two Options for Building a Firewall You have two options for building a firewall: Use a utility (iptables) based on the packet filtering rule language. The utility is for administrators who are confident regarding the packet filtering rules set. This document provides an overview (and does not provide step-by-step instructions) regarding usage of the utility. Use a custom, simplified command (set_fwlevel). The command includes preset firewall settings. This document does provide an overview (as well as step-by-step instructions) regarding usage of the command. The command requires less detailed administrative knowledge on your part. Important: If you utilize the ip_tables utility, do not also use the set_fwlevel command. The command may override the configuration you have set with the utility. Overview of the iptables Command-Line Utility The iptables command line utility (and generic table structure) enables knowledgeable administrators to configure your account to utilize the packet filtering rule set. The utility is developed, distributed, and maintained by the Netfilter Core Team (http://www.netfilter.org). The utility is distributed under the terms of GNU is not UNIX General Public License (GNU GPL). Overview of the set_fwlevel Command Your account provides a set of preset firewall security settings to establish an appropriate level of firewall security as well as to specify the services, ports, and protocols you wish those settings to apply to. The set_fwlevel command and supported arguments enable you to perform these tasks without extensive knowledge of the iptables command-line utility. The command includes preset security settings which enable you to build a Red Hat Enterprise Linux (RHEL)-compatible firewall without knowing the packet filtering rule language. The command is a customized one which is unique to Linux MPS. The set_fwlevel command enables you to specify which of the preset security settings you wish to apply to your account. The following provides an example of the command as it is enabled for your account: set_fwlevel level [servertype] set_fwlevel 0 1 2 3 [m w] Two Options for Building a Firewall 2

File Locations The following table describes the rules files and provides the locations of the rules files. Description You can issue the set_fwlevel command and utilize preset security level. When you issue the set_fwlevel command, the rules which are currently loaded are backed up. When you issue the set_fwlevel command, rules information is moved from the location where it was previously stored. When you issue the set_fwlevel command, rules information is moved to a new location. Location usr/local/sbin/set_fwlevel /root/.iptables/iptablesbk.<num> /etc/sysconfig/iptables etc/sysconfig/iptables.bk.<num> Services Affected By Your Firewall Security Settings The preset firewall security settings enable you to specify that there are no firewall rules regarding the services processed by your account. There are also several settings which enable you to specify that firewall rules do apply. In those cases, the setting you specify indicates that certain services in the following list are allowed or disallowed: Domain name server (DNS) client Hypertext Transfer Protocol (HTTP) Internet Message Access Protocol (IMAP) Network Time Protocol (NTP) client Outbound Auth (or identd) Post Office Protocol, version three (POP3) Secure Shell (SSH) Secure Socket Layer (SSL)-enabled File Transfer Protocol (FTP-S) Simple Mail Transfer Protocol (SMTP) SSL-enabled HTTP (HTTP-S) SSL-enabled IMAP (IMAP-S) SSL-enabled POP3 (POP3-S) SSL-enabled SMTP (SMTP-S) SSL-enabled Telnet (Telnet-S) Web cache Two Options for Building a Firewall 3

Protocols Affected by Your Firewall Security Settings Linux MPS Firewall Supplement The following protocols are the ones which your firewall security settings affect: Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Two Options for Building a Firewall 4

Specifying a Preset Firewall Security Level Turning Off All Rules Linux MPS Firewall Supplement You can use the set_fwlevel command to turn off all rules (0). You can also use the command to specify low, medium, or high security. Following is an example where the command specifies no firewall security: #set_fwlevel 0 When you specify no firewall security settings (0), all firewall rules are turned off. This means that no firewall rules apply to any of the ports and services your account processes. Specifying Low Firewall Security Block Port-Scans Following is an example where the command specifies a low (1) level of firewall security: #set_fwlevel 1 When you specify low firewall security, your account blocks port-scan attempts and limits the effects of denial of service attacks. In addition, the setting specifies that only certain Internet Control Message Protocol (ICMP) packet types are processed. The ICMP protocol enables routers and hosts to exchange control messages. For example, a host might send an ICMP packet when a router is experiencing congestion. Or a router might send one when a destination host is unavailable. A firewall can prevent these ICMP packet exchanges from resulting in a compromise to your account. Port-scans are series of messages from a malicious sender. The messages are used to determine which ports are being used by your account configuration. Once the malicious sender determines which of the ports are being utilized by your account, they attempt to use those ports to usurp control of communications, processes, and services on your account. Limit the effects of Denial of Service Attacks When a malicious Internet user attempts a denial of service attack, your account limits the effects of that attempt if you have specified low security. The attacks are typically aimed at Web servers and usually involve an attempt to make hosted Web pages unavailable. Some of the following are means by which malicious Internet users may initiate the attacks: Flooding network traffic Disrupting server performance by sending many requests Preventing access to a particular Web service Preventing a particular individual from accessing a service Process Only Certain ICMP Packet Types When you specify low security, only the following ICMP packet types are processed: 0 (outgoing ping) You can use the ping computer network tool to verify whether a particular host is reachable. The tool sends an ICMP Echo Request and listens for a reply. When you specify a low security setting for your account, it may send outgoing ping packets only. Your account will not reply to another host s ping. 3 (destination unreachable) Your account will process ICMP packets which are generated by another host These packets are received when a designated transport Specifying a Preset Firewall Security Level 5

protocol is unable to process data in the transport layer and the remote system or host has no means of replying with that information. 4 (source quench) -- A remote host may discard data if it does not have the buffer space needed to queue the data for output to the next network on the route to the destination host. When you specify low security, your account will process ICMP packets which indicate this has occurred. 11(timeout) A remote host may not reply or acknowledge your account s sent data in sufficient time. When you specify low security, your account will process ICMP packets which indicate this has occurred. 12 (parameter problems) -- A remote host cannot process a packet due to a problem in the packet header (or, possibly, an incorrect argument in an option). The remote host has discarded the packet and has sent this ICMP packet to your account. When you specify low security, your account processed this type of ICMP packet. For more information about ICMP, refer to the Internet Control Message Protocol DARPA Internet Program Protocol Specification available at the Internet Engineering Task Force (IETF) Web site (http://www.ietf.org/rfc/rfc792.txt). Specifying Medium Firewall Security Following is an example where the command specifies a medium (2) level of firewall security: #set_fwlevel 2 When you specify medium firewall security, all of the low security firewall settings apply. In addition, specific security criteria are added to your account s firewall. With this setting, your account allows only the following services, ports, and protocols: Services Ports Protocols FTP-S 989,990 TCP SSH 22 TCP Telnet-S 992 TCP SMTP 25 TCP SMTP-S 465 TCP HTTP 80 TCP HTTP-S 443 TCP Web cache 8080 TCP POP3 110 TCP POP3-S 995 TCP IMAP 143 TCP IMAP-S 993 TCP DNS client 53 UDP, TCP NTP client 123 UDP Outbound Auth (or identd) 113 TCP Specifying High Firewall Security Following is an example where the command specifies a high (3) level of firewall security: #set_fwlevel 3 When you specify high firewall security, all of the low security firewall settings apply. In addition, specific security criteria are added to your account s firewall. Specifying a Preset Firewall Security Level 6

With this setting, your account allows only the following services, ports, and protocols: Services Ports Protocols SSH 22 TCP SMTP 25 TCP SMTP-S 465 TCP HTTP 80 TCP HTTP-S 443 TCP Web cache 8080 TCP POP3-S 995 TCP IMAP-S 993 TCP DNS 53 UDP, TCP NTP 123 UDP Outbound Auth (or identd) 113 TCP Modifying Your Firewall Security Settings In order to modify the firewall security settings on your account, run the set_fwlevel command again with the setting you would like to establish. For example, if you had previously specified a high (3) level of firewall security and you wish to modify that level to medium (2), you must issue the following command: #set_fwlevel 2 If, after you have specified a medium (2) level of firewall security, you wish to return to a high (3) level of firewall security, you must issue the following command: #set_fwlevel 3 Specifying a Preset Firewall Security Level 7

Specifying a Preset Server Type As well as specifying a firewall security level, you can specify the server types for which the firewall security settings apply. You can specify that all server types apply the firewall security settings. When you do not specify a server type, in effect, you are actually applying the firewall security settings to all server types. Otherwise, you can specify that the firewall security settings apply only to Web servers or Mail services. How Web Server Settings Affect Firewall Security Settings Following is an example where the command specifies no firewall security with an additional argument to specify that that the firewall settings apply only to the Web server: #set_fwlevel 0 w Following is an example where the command specifies a low level of firewall security with an additional argument to specify that that the firewall settings apply only to the Web server: #set_fwlevel 1 w When you specify that firewall security settings apply to Web server (w) process and services, the setting does not change the firewall if you have also specified no (0) or low (1) security applies. However, when you have specified medium (2) or high (3), changes do apply. Following is an example where the command specifies a medium firewall level of security with an additional argument to specify that that the firewall settings apply only to the Web server: #set_fwlevel 2 w When you specify that medium (2) firewall security settings apply to the Web server only (w), your account is open only to the following services, ports, and protocols: Services Ports Protocols FTP-S 989, 990 TCP SSH 22 TCP Telnet-S 992 TCP Outbound SMTP 25 TCP HTTP 80 TCP HTTP-S 443 TCP Web cache 8080 TCP DNS client 53 UDP, TCP NTP 123 UDP Outbound Auth (or identd) 113 TCP Following is an example where the command specifies a high level of firewall security with the additional argument to specify that that the firewall settings apply only to the Web server: #set_fwlevel 3 w Specifying a Preset Server Type 8

When you specify that high (3) firewall security settings apply to the Web server only (w), your account is open only to the following services, ports, and protocols: Services Ports Protocols SSH 22 TCP Outbound SMTP 25 TCP HTTP 80 TCP HTTP-S 443 TCP Web cache 8080 TCP DNS client 53 UDP, TCP NTP client 123 UDP Outbound Auth (or identd) 113 TCP How Mail Server Settings Affect Firewall Security Settings Following is an example where the command specifies no firewall security with an additional argument to specify that that the firewall settings apply only to the Mail server: #set_fwlevel 0 m Following is an example where the command specifies a low level of firewall security with an additional argument to specify that that the firewall settings apply only to the Mail server: #set_fwlevel 1 m When you specify that firewall security settings apply to Mail server (m) processes and services, the setting does not change the firewall if you have also specified no (0) or low (1) security applies. However, when you have specified medium (2) or high (3), changes do apply. Following is an example where the command specifies a medium level of firewall security with an additional argument to specify that that the firewall settings apply only to the Mail server: #set_fwlevel 2 m When you specify that medium (2) firewall security settings apply to the Mail server only (m), your account is open only to the following services, ports, and protocols: Services Ports Protocols FTP-S 989, 990 TCP SSH 22 TCP Telnet-S 992 TCP SMTP-S 465 TCP POP3 110 TCP POP3-S 995 TCP IMAP 993 TCP IMAP-S 143 TCP DNS client 53 UDP, TCP NTP client 123 UDP Outbound Auth (or identd) 113 UDP Following is an example where the command specifies a high level of firewall security with an additional argument to specify that that the firewall settings apply only to the Web server: #set_fwlevel 3 w Specifying a Preset Server Type 9

When you specify that high (3) firewall security settings apply to the Mail server only (m), your account is open only to the following services, ports, and protocols: Services Ports Protocols SSH 22 TCP SMTP 25 TCP SMTP-S 465 TCP POP3-S 995 TCP IMAP-S 993 TCP DNS client 123 UDP, TCP NTP client 123 UDP Outbound Auth (or identd) 113 TCP Modifying Your Server Type Settings Important: If you issue the set_fwlevel command after you have specified a setting for the server type and you do so without including an argument to specify a server type, then the firewall will apply to all processes on the mail server (m) and Web server (w). In order to modify the server type settings on your account, run the set_fwlevel command again with the setting you would like to establish. For example, if you had previously specified a high (3) level of firewall security with the additional argument that the firewall applies only to the mail server (m) and you wish to switch that argument so that the firewall applies only to the Web server (w), you must issue the following command: #set_fwlevel 3 w If, after you have specified that the firewall applies only to the Web server, you wish to switch the firewall security settings to the mail server, you must issue the following command: #set_fwlevel 3 m Specifying a Preset Server Type 10

Notices Document Source This document was written by: VERIO, Inc. Documentation and Standards 1230 North Research Way, Orem, Utah 84097 Copyright 1996-2007 by VERIO Inc. All rights reserved. Disclaimers The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law: VERIO CORPORATION PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of expressed or implied warranties in certain transactions; therefore, this statement might not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. VERIO might make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time. This publication might contain reference to, or information about, VERIO products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that VERIO intends to announce such VERIO products, programming, or services in your country. The examples used in this document are for instructional purposes only. Any names, persons, associations, company names, domain names, User IDs, Dealer IDs, email addresses, or other addresses contained in this document are not intended to represent actual persons, associations, company names, domain names, User IDs, Dealer IDs, email addresses, or other addresses and any that do are entirely coincidental. If this document contains graphic representations of system functions, they are sourced from a development environment. These graphics represent only examples of actual plans, products or services. The user interface that you see might be the result of different branding schemes, Internet browsers, plans, or products; therefore, the graphics on your screen might look different from the graphics in this document. Some system functions require access privileges. Contact your local group for these privileges. Trademarks VERIO and VERIO-related product names are trademarks of VERIO Inc. All other trademarks in this document are the property of their respective owners. Contact VERIO If you have comments or questions about the content in this document, please send an email message to VerioDocuments@verio.net and include any specific details. Requests for technical information about VERIO products should be made to VERIO Marketing Representatives. Notices 11