Linux Network Server: Firewalls



Similar documents
Proxy Server, Network Address Translator, Firewall. Proxy Server

Firewalling and Network Security I -Linux. Jeff Muday Academic Computing Specialist Wake Forest University

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

Distributed Systems. Firewalls: Defending the Network. Paul Krzyzanowski

12. Firewalls Content

Firewalls and System Protection

Solution of Exercise Sheet 5

Linux Network Security

How To Understand A Firewall

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

Chapter 9. IP Secure

Firewalls (IPTABLES)

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

Networking Basics and Network Security

Chapter 7. Firewalls

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

Internet infrastructure. Prof. dr. ir. André Mariën

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

Network Security Management

Protecting and controlling Virtual LANs by Linux router-firewall

Firewalls. Securing Networks. Chapter 3 Part 1 of 4 CA M S Mehta, FCA

Firewall Configuration. Firewall Configuration. Solution Firewall Principles

Fig : Packet Filtering

CS5008: Internet Computing

CSE 4482 Computer Security Management: Assessment and Forensics. Protection Mechanisms: Firewalls

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

Internet Security Firewalls

Introduction to Firewalls

CSCE 465 Computer & Network Security

Network Security. Internet Firewalls. Chapter 13. Network Security (WS 2002): 13 Internet Firewalls 1 Dr.-Ing G. Schäfer

finger, ftp, host, hostname, mesg, rcp, rlogin, rsh, scp, sftp, slogin, ssh, talk, telnet, users, w, walla, who, write,...

The end-to-end principle in the Internet. 15 maart 2005

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

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Firewalls. configuring a sophisticated GNU/Linux firewall involves understanding

Security Technology: Firewalls and VPNs

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

Computer Security: Principles and Practice

CMPT 471 Networking II

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

Overview of TCP/IP. TCP/IP and Internet

21.4 Network Address Translation (NAT) NAT concept

Lecture 23: Firewalls

Internet Security Firewalls

Computer Security DD2395

Network Security TCP/IP Refresher

INTERNET SECURITY: THE ROLE OF FIREWALL SYSTEM

Chapter 4: Security of the architecture, and lower layer security (network security) 1

Linux Cluster Security Neil Gorsuch NCSA, University of Illinois, Urbana, Illinois.

Firewall Design Principles Firewall Characteristics Types of Firewalls

Firewalls. Chien-Chung Shen

How To Protect Your Firewall From Attack From A Malicious Computer Or Network Device

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

Security threats and network. Software firewall. Hardware firewall. Firewalls

CS 356 Lecture 19 and 20 Firewalls and Intrusion Prevention. Spring 2013

FIREWALLS IN NETWORK SECURITY

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

Chapter 20. Firewalls

Lecture slides by Lawrie Brown for Cryptography and Network Security, 5/e, by William Stallings, Chapter 22 Firewalls.

Intranet, Extranet, Firewall

Guideline on Firewall

PART OF THE PICTURE: The TCP/IP Communications Architecture

Ethernet. Ethernet. Network Devices

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

Definition of firewall

Firewalls. Network Security. Firewalls Defined. Firewalls

Insecure network services. Firewalls. Two separable topics. Packet filtering. Example: blocking forgeries. Example: blocking outgoing mail

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

Intro to Firewalls. Summary

Network Address Translation (NAT)

Netfilter / IPtables

Linux Networking Basics

CIT 480: Securing Computer Systems. Firewalls

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Firewalls. Ahmad Almulhem March 10, 2012

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Firewall

Network Security and Firewall 1

What is a Firewall? Computer Security. Firewalls. What is a Firewall? What is a Firewall?

Customized Data Exchange Gateway (DEG) for Automated File Exchange across Networks

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

Network Security. Tampere Seminar 23rd October Overview Switch Security Firewalls Conclusion

A S B

OS/390 Firewall Technology Overview

Stateful Firewalls. Hank and Foo

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

Cryptography and network security

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

SFWR ENG 4C03 Class Project Firewall Design Principals Arash Kamyab March 04, 2004

Firewall Design Principles

TCP/IP Fundamentals. Edmund Lam IT Audit Manager University of California 7/25/99 1

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

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

Transcription:

Linux Network Server: Firewalls Dr. A.R. (Tom) Peters HvA/HI gastdocent Hogeschool van Amsterdam, afd. Hogere Informatica tpeters@xs4all.nl 0204080204 Leerdoelen Firewalls Wees in staat om de betekenis en functie uit te leggen van het begrip "firewall" en gerelateerde begrippen, en hun onderlinge samenhang; met name: IP packet filtering IP masquerading tcpwrappers proxies 1

0. Firewalls 1. Firewall 2. Gateway 3. Proxy 4. Overige Begrippen 5. TCP/IP Stack 6. Filtering 7. IP Packets 8. TCP Packets 9. Linux Filtering 10. IPChains 11. Netfilter 12. TCP Wrappers 13. Remote Procedure Calls 14. Proxies 15. Literatuur 16. Huiswerk 1. Firewall Uit RFC2828: "Internet Security Glossary" (http://www.rfc-editor.org/rfc/rfc2828.txt) : firewall (I) An internetwork gateway that restricts data communication traffic to and from one of the connected networks (the one said to 2

be "inside" the firewall) and thus protects that network s system resources against threats from the other network (the one that is said to be "outside" the firewall). (See: guard, security gateway.) (C) A firewall typically protects a smaller, secure network (such as a corporate LAN, or even just one host) from a larger network (such as the Internet). The firewall is installed at the point where the networks connect, and the firewall applies security policy rules to control traffic that flows in and out of the protected network. (C) A firewall is not always a single computer. For example, a firewall may consist of a pair of filtering routers and one or more proxy servers running on one or more bastion hosts, all connected to a small, dedicated LAN between the two routers. The external router blocks attacks that use IP to break security (IP address spoofing, source routing, packet fragments), while proxy servers block attacks that would exploit a vulnerability in a higher layer protocol or service. The internal router blocks traffic from leaving the protected network except through the proxy servers. The difficult part is defining criteria by which packets are denied passage through the firewall, because a firewall not only needs to keep intruders out, but usually also needs to let authorized users in and out. 2. Gateway Uit RFC2828: "Internet Security Glossary" (http://www.rfc-editor.org/rfc/rfc2828.txt) : $ gateway (I) A relay mechanism that attaches to two (or more) computer networks that have similar functions but dissimilar 3

implementations and that enables host computers on one network to communicate with hosts on the other; an intermediate system that is the interface between two computer networks. (See: bridge, firewall, guard, internetwork, proxy server, router, and subnetwork.) (C) In theory, gateways are conceivable at any OSI layer. In practice, they operate at OSI layer 3 (see: bridge, router) or layer 7 (see: proxy server). When the two networks differ in the protocol by which they offer service to hosts, the gateway may translate one protocol into another or otherwise facilitate interoperation of hosts (see: Internet Protocol). 3. Proxy Uit RFC2828: "Internet Security Glossary" (http://www.rfc-editor.org/rfc/rfc2828.txt) : proxy server (I) A computer process--often used as, or as part of, a firewall- - that relays a protocol between client and server computer systems, by appearing to the client to be the server and appearing to the server to be the client. (See: SOCKS.) (C) In a firewall, a proxy server usually runs on a bastion host, which may support proxies for several protocols (e.g., FTP, HTTP, and TELNET). Instead of a client in the protected enclave connecting directly to an external server, the internal client connects to the proxy server which in turn connects to the external server. The proxy server waits for a request from inside the firewall, forwards the request to the remote server outside the firewall, gets the response, then sends the response back to the client. The proxy may be transparent to the clients, or they 4

may need to connect first to the proxy server, and then use that association to also initiate a connection to the real server. (C) Proxies are generally preferred over SOCKS for their ability to perform caching, high-level logging, and access control. A proxy can provide security service beyond that which is normally part of the relayed protocol, such as access control based on peer entity authentication of clients, or peer entity authentication of servers when clients do not have that capability. A proxy at OSI layer 7 can also provide finer-grained security service than can a filtering router at OSI layer 3. For example, an FTP proxy could permit transfers out of, but not into, a protected network. 4. Overige Begrippen bastion host guard security gateway SOCKS 5. Security in TCP/IP Stack Figure 1. Security in TCP/IP stack Veiligheidsmaatregelen (voor firewalls) in verschillende network layers. 5

6. Filtering IP layer: packet filtering; snel, dom. TCP layer: packet filtering, port forwarding; snel, selectief, logging. Application layer: proxies; traag, selectief, caching, logging, authenticatie. 7. IP Packets IP header: bytes 1..20 of..24 ; uit RFC791: "Internet Protocol" (http://www.rfc-editor.org/rfc/rfc791.txt). 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options Padding 6

8. TCP Packets TCP header: na IP header, bytes 21..40 of..44 ; uit RFC793: "Transmission Control Protocol" (http://www.rfc-editor.org/rfc/rfc793.txt). 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Source Port Destination Port Sequence Number Acknowledgment Number Data U A P R S F Offset Reserved R C S S Y I Window G K H T N N Checksum Urgent Pointer Options Padding data 7

9. Linux Filtering Packet Filtering op IP adres en TCP port, masquerading, port forwarding. Network Address Translation = masquerading, eigenlijk een zaak van routing: Intranet adres --> Firewall --> Internet <-- <-- Port Forwarding: Firewall <-- Internet vraagt port ser- Intranet port service <-- vice --> Kernel 2.0.x: ipfwadm Kernel 2.2.x: IPChains: ipchains; ipmasqadm Kernel 2.4.x: Netfilter: iptables Monitoring op TCP port: TCP wrappers Per applicatie (TCP service): proxy servers 10. IPChains Aanbevolen literatuur: http://www.linuxdoc.org/howto/ipchains-howto.html 8

http://www.linuxdoc.org/howto/ip-masquerade-howto.html http://www.linuxdoc.org/howto/firewall-howto.html Jeff Regan: "An Introduction to Using Linux as a Multipurpose Firewall". Linux Journal 71, Mar. 2000, "Strictly On-Line" (http://noframes.linuxjournal.com/lj-issues/issue71/3546.html) Preston F. Crow: "The Linux Home Network". Linux Journal 72, Apr. 2000, pp.80..84 (http://noframes.linuxjournal.com/lj-issues/issue72/3575.html) Jan Stumpel: "A Private Home Network". Linux Gazette 65, April 2001 (http://www.linuxgazette.org/issue65/stumpel.html) 11. Netfilter Aanbevolen literatuur: Packet Filtering (iptables): http://netfilter.filewatcher.org/unreliable-guides/packet-filtering-howto/index.html Network Address Translation: http://netfilter.filewatcher.org/unreliable-guides/nat-howto/index.html Zie ook: http://www.linuxdoc.org/howto/ip-masquerade-howto-2.html#ss2.7 12. TCP Wrappers inetd (8) - internet super-server beheert alle TCP ports 9

start per port een programma, bijv. een server configuratie in /etc/inetd.conf TCP wrappers: tcpd (8) - access control facility for internet services wordt gestart door inetd, met uiteindelijke port server als parameter (volgens /etc/inetd.conf) beslist over starten van de port server volgens /etc/hosts.deny en /etc/hosts.allow Zie: hosts_access (5) - format of host access control files logging via syslogd volgens /etc/syslog.conf 13. Remote Procedure Calls Remote Procedure Call: verouderde methode voor remote access van Sun nog gebruikt voor Network File System (NFS) en Network Information System (NIS, NIS+) run portmap om te vertalen tussen RPC s en TCP ports: portmap (8) - DARPA port to RPC program number mapper rsh en rcp vervangen door ssh en scp! 10

14. Proxies squid: voor HTTP ook caching SOCKS: generieke proxy alleen TCP, geen UDP RFC1928: SOCKS Protocol V.5 (http://www.rfc-editor.org/rfc/rfc1928.txt) schijnt verouderd te zijn (geen "echte" proxy) 16. Literatuur 16.1. The Linux Documentation Project: http://www.linuxdoc.org/ http://www.linuxdoc.org/howto/ipchains-howto.html http://www.linuxdoc.org/howto/ip-masquerade-howto.html Zie ook Linux IP Masquerade Resource: http://ipmasq.cjb.net/ http://www.linuxdoc.org/howto/firewall-howto.html 11

Zie ook TrinityOS: http://www.ecst.csuchico.edu/~dranch/linux/trinityos/chtml/trinityos-c.html 16.2. Netfilter (Kernel 2.4): http://netfilter.filewatcher.org/ Packet Filtering (iptables): http://netfilter.filewatcher.org/unreliable-guides/packet-filtering-howto/index.html Network Address Translation: http://netfilter.filewatcher.org/unreliable-guides/nat-howto/index.html 16.3. RFC s: RFC791: Internet Protocol (http://www.rfc-editor.org/rfc/rfc791.txt) RFC793: Transmission Control Protocol (http://www.rfc-editor.org/rfc/rfc793.txt) RFC1700: Assigned Numbers (http://www.rfc-editor.org/rfc/rfc1700.txt) Voor up-to date Assigned Numbers, zie: http://www.iana.org/numbers.htm Voor TCP port numbers, zie ook: ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers RFC1928: SOCKS Protocol V.5 (http://www.rfc-editor.org/rfc/rfc1928.txt) 16.4. Linux Journal & Linux Gazette: Jeff Regan: "An Introduction to Using Linux as a Multipurpose Firewall". Linux 12

Journal 71, Mar. 2000, "Strictly On-Line" (http://noframes.linuxjournal.com/lj-issues/issue71/3546.html) Preston F. Crow: "The Linux Home Network". Linux Journal 72, Apr. 2000, pp.80..84 (http://noframes.linuxjournal.com/lj-issues/issue72/3575.html) Lawrence Teo: "Setting up a Linux Gateway". Linux Journal 72, Apr. 2000, pp.86..88 Marcel Gagné: "A Few Recipes for Easier Firewalls". Linux Journal 78, Oct. 2000, pp.40..46 (http://noframes.linuxjournal.com/lj-issues/issue78/4218.html) Jan Stumpel: "A Private Home Network". Linux Gazette 65, April 2001 (http://www.linuxgazette.org/issue65/stumpel.html) 17. Huiswerk Zoek uit wat voor soort firewall, NAT, proxy services, en andere services er nodig zijn voor dit project. Maak hiervoor gebruik van de relevante literatuur, m.n.: http://www.linuxdoc.org/howto/ipchains-howto.html http://www.linuxdoc.org/howto/ip-masquerade-howto.html Zie ook Linux IP Masquerade Resource: http://ipmasq.cjb.net/ http://www.linuxdoc.org/howto/firewall-howto.html TrinityOS: http://www.ecst.csuchico.edu/~dranch/linux/trinityos/chtml/trinityos-c.html 13

14