Firewall C. Edward Chow CS691 – Chapter 26.3 of Matt Bishop Linux Iptables Tutorial 1.1.16 by Oskar Andreasson.

Slides:



Advertisements
Similar presentations
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 4.1 Firewalls.
Advertisements

Network Security Essentials Chapter 11
Firewalls By Tahaei Fall What is a firewall? a choke point of control and monitoring interconnects networks with differing trust imposes restrictions.
IUT– Network Security Course 1 Network Security Firewalls.
FIREWALLS Chapter 11.
Ipchains and Iptables Linux operating system natively supports packet-filtering rules: Kernel versions 2.2 and earlier support the ipchains command. Kernel.
FIREWALLS. What is a Firewall? A firewall is hardware or software (or a combination of hardware and software) that monitors the transmission of packets.
FIREWALLS The function of a strong position is to make the forces holding it practically unassailable —On War, Carl Von Clausewitz On the day that you.
Winter CMPE 155 Week 7. Winter Assignment 6: Firewalls What is a firewall? –Security at the network level. Wide-area network access makes.
CSCI 530 Lab Firewalls. Overview Firewalls Capabilities Limitations What are we limiting with a firewall? General Network Security Strategies Packet Filtering.
Security Firewall Firewall design principle. Firewall Characteristics.
Firewall Configuration Strategies
Principles of Information Security, 2nd Edition1 Firewalls and VPNs.
Firewalls and Intrusion Detection Systems
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 7 Network Perimeter Security.
1 Network Address Translation (NAT) Relates to Lab 7. Module about private networks and NAT.
Firewalls1 Firewalls Mert Özarar Bilkent University, Turkey
1 Lecture 20: Firewalls motivation ingredients –packet filters –application gateways –bastion hosts and DMZ example firewall design using firewalls – virtual.
Firewalls: General Principles & Configuration (in Linux)
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
BY- NIKHIL TRIPATHI 12MCMB10.  What is a FIREWALL?  Can & Can’t in Firewall perspective  Development of Firewalls  Firewall Architectures  Some Generalization.
Hafez Barghouthi. Model for Network Access Security (our concern) Patrick BoursAuthentication Course 2007/20082.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
Why do we need Firewalls? Internet connectivity is a must for most people and organizations  especially for me But a convenient Internet connectivity.
NW Security and Firewalls Network Security
Intranet, Extranet, Firewall. Intranet and Extranet.
Network Security Essentials Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
NetFilter – IPtables Firewall –Series of rules to govern what Kind of access to allow on your system –Packet filtering –Drop or Accept packets NAT –Network.
07/11/ L10/1/63 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: voice.
The Security Aspect of Social Engineering Justin Steele.
1 The Firewall Menu. 2 Firewall Overview The GD eSeries appliance provides multiple pre-defined firewall components/sections which you can configure uniquely.
Firewalls, etc.. Network Security2 Outline Intro Various firewall technologies: –Static Packet Filtering (or nonstateful packet filter) –Dynamic Packet.
11 SECURING YOUR NETWORK PERIMETER Chapter 10. Chapter 10: SECURING YOUR NETWORK PERIMETER2 CHAPTER OBJECTIVES  Establish secure topologies.  Secure.
Firewalls A device that screens incoming and outgoing network traffic and allows or disallows traffic based on a set of rules The “device” –Needs at least.
1 Firewalls. ECE Internetwork Security 2 Overview Background General Firewall setup Iptables Introduction Iptables commands “Limit” Function Explanation.
1 實驗九:建置網路安全閘道器 教師: 助教:. 2 Outline  Background  Proxy – Squid  Firewall – IPTables  VPN – OpenVPN  Experiment  Internet gateway  Firewall  VPN.
TCP/IP Protocols Contains Five Layers
Firewalling With Netfilter/Iptables. What Is Netfilter/Iptables? Improved successor to ipchains available in linux kernel 2.4/2.6. Netfilter is a set.
IPtables Objectives Contents Practicals Summary
Network Security. 2 SECURITY REQUIREMENTS Privacy (Confidentiality) Data only be accessible by authorized parties Authenticity A host or service be able.
Firewall Tutorial Hyukjae Jang Nc lab, CS dept, Kaist.
© 2006 Cisco Systems, Inc. All rights reserved. Cisco IOS Threat Defense Features.
1 Network Firewalls CSCI Web Security Spring 2003 Presented By Yasir Zahur.
1 Firewalls. ECE Internetwork Security 2 Overview Background General Firewall setup Iptables Introduction Iptables commands “Limit” Function Explanation.
Security fundamentals Topic 10 Securing the network perimeter.
1 An Introduction to Internet Firewalls Dr. Rocky K. C. Chang 12 April 2007.
SYSTEM ADMINISTRATION Chapter 10 Public vs. Private Networks.
LINUX® Netfilter The Linux Firewall Engine. Overview LINUX® Netfilter is a firewall engine built into the Linux kernel Sometimes called “iptables” for.
1 CNLab/University of Ulsan Chapter 19 Firewalls  Packet Filtering Firewall  Application Gateway Firewall  Firewall Architecture.
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
Linux Firewall Iptables.
Chapter 26: Network Security Dr. Wayne Summers Department of Computer Science Columbus State University
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Firewalls. A Firewall is: a) Device that interconnects two networks b) Network device that regulates the access to an internal network c) Program that.
Defining Network Infrastructure and Network Security Lesson 8.
Security fundamentals
Firewalls.
Network Address Translation (NAT)
Click to edit Master subtitle style
Firewall – Survey Purpose of a Firewall Characteristic of a firewall
Network Address Translation (NAT)
* Essential Network Security Book Slides.
Chapter 26: Network Security
Firewalls Purpose of a Firewall Characteristic of a firewall
Setting Up Firewall using Netfilter and Iptables
Firewalls Routers, Switches, Hubs VPNs
Chapter 8 Network Perimeter Security
Firewalls By conventional definition, a firewall is a partition made
Introduction to Network Security
Presentation transcript:

Firewall C. Edward Chow CS691 – Chapter 26.3 of Matt Bishop Linux Iptables Tutorial 1.1.16 by Oskar Andreasson

Outline of The Talk Definition Implement Firewall using Linux iptables

Firewall Here is how Bob Shirey defines it in RFC 2828. Firewall: (I) An internetwork gateway that restricts data communication traffic to and from one of the connected networks (the one said to 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.)

Firewall Network Configuration

DMZ DeMilitarized Zone: a portion of a network that separate a purely internal network from an external network. Guard (Firewall): a host that mediates access to a network, allowing/disallowing certain types of access on the basis of a configured policy. Filtering firewall: firewall that performs access control based on the attributes of packet headers, rather than the content. Proxy: an intermediate agent or serer that act on behalf of an endpoints without allowing a direct connection between two end points. Proxy (Application Level) Firewall: firewall that uses proxies to perform access control. It can based on content and header info. Content Switch/Sock Server are typical examples.

Security Policies The DMZ servers are typically not allowed make connections to the intranet. Systems in Internet not allowed to directly contact any systems in the intranet. Systems in Intranet not allowed to directly contact any systems in the Internet. (least privilege principle) Systems in DMZ serve as mediator (go-between). Password/certificate/credential are presented for allowing mediating services. No dual interface from DMZ servers directly to systems Intranet except the inner firewall. Intranet system typically uses Private LAN addresses: 10.x.y.z; 172.a.x.z (16<=a<=32); 192.168.x.y.

Security Policy Complete Mediation Principle: inner firewall mediate every access involves with DMZ and Intranet. Separation of privileges; with different DMZ server running different network functions; firewall machines are different entities than the DMZ servers. It is also related to least common mechanism principle. The outer firewall allows HTTP/HTTPS and SMTP access to DMZ server. Need to detect virus, malicious logic.

Linux Iptables/Netfilter In Linux kernel 2.4 we typically use the new netfilter package with iptables commands to setup the firewall. The old package called IP chains will be deprecated. http://www.netfilter.org/ is main site for the package. We are using iptables 1.2.6a. Tutorial and HOW-TO manual is available there.

Incoming Packet Journey through Linux Firewall NIC to Internet (eth0) Incoming Packet Journey through Linux Firewall mangle Table PREROUTING Chain nat Table PREROUTING Chain iptables -t nat -A PREROUTING -p TCP -i eth0 -d 128.168.60.12 --dport 80 -j DNAT --to-destination 192.168.10.2 Routing Decision mangle Table FORWARD Chain filter Table FORWARD Chain iptables -t nat -A FORWARD –p ALL -s 128.199.66.1 -j REJECT iptables -A FORWARD -p ALL -s 128.200.0.2 -j LOG --log-prefix "bad guy:" iptables -A FORWARD -p ALL -s 128.200.0.2 -j DROP mangle Table POSTROUTING Chain nat Table POSTROUTING Chain NIC to Intranet

DNAT and Iptables command DNAT: Destination Network Address Translation. It translates the external IP addresses to the corresponding internal IP address of DMZ servers. iptables -t nat -A PREROUTING -p TCP -i eth0 -d 128.168.60.12 --dport 80 -j DNAT --to-destination 192.168.10.2 -t specify the type of tables -A Append to a specific chain -p specify the protocol -i specify the incoming interface -d specify the matched destination IP address in packet -j specify the “target” or operation to be performed. --to-destination substitute the destination IP address.

Outgoing Packet Journey through Linux Firewall NIC to Intranet Outgoing Packet Journey through Linux Firewall mangle Table PREROUTING Chain nat Table PREROUTING Chain Routing Decision mangle Table FORWARD Chain filter Table FORWARD Chain iptables -t nat -A FORWARD -s 192.168.10.10 -j REJECT Certain system in Intranet not allowed out mangle Table POSTROUTING Chain iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE nat Table POSTROUTING Chain NIC to Intranet (eth0)

SNAT vs. MASQUERADE SNAT which translates only the IP addresses, the port number is preserved unchanged. However, it requires that you have the equal number of outgoing IP addresses as IP address in your intranet that are carrying in the source address field of the outgoing packets. Since it does not have to search for the available port or available IP address, SNAT is faster than MASQUERADE. For smaller organization which only have a few static IP addresses, MASQUERADE is the typically method.

Incoming Packet Journey to Server in Firewall NIC to Internet (eth0) mangle Table PREROUTING Chain iptables -t nat -A PREROUTING -p TCP -i eth0 -d 128.168.60.11 --dport 53 -j DNAT --to-destination 192.168.10.1 nat Table PREROUTING Chain Routing Decision mangle Table INPUT Chain filter Table INPUT Chain Example: A VPN gateway running on firewall alpha.uccs.edu Local Process

Outgoing Packet Journey from Inside Firewall Local Process mangle Table OUTPUT Chain nat Table OUTPUT Chain filter Table OUTPUT Chain mangle Table POSTROUTING Chain nat Table POSTROUTING Chain NIC to Internet (eth0)

IP Tables and Packet Journey

DMZ Example See http://iptables-tutorial.frozentux.net/iptables-tutorial.html#RCDMZFIREWALLTXT

Sonicwall Pro 300 Firewall A firewall device with 3 ports: Internet, DMZ, Intranet. http://www.sonicwall.com/products/pro330.html Restriction: NAT does not apply to servers on DMZ. Need to use public IP address. You can use one-to-one NAT for systems in Intranet. Support VPN. IPSec VPN, compatible with other IPSec-compliant VPN gateways Bundled with 200 VPN clients for remote users Supports up to 1,000 VPN Security Associations* 3 DES (168-Bit) Performance: 45 Mbps ICSA Certified, Stateful Packet Inspection firewall Unlimited number of users Concurrent connections: 128,000 Firewall performance: 190 Mbps (bi-directional)

Stateful Firewall The most common firewall now. It checks the state of the connections, say TCP. and discards packets with incorrect msg types. http://iptables-tutorial.frozentux.net/iptables-tutorial.html#TCPCONNECTIONS

Lab Testbed for Exercise

Firewall Facts (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.