Firewall Tutorial: Kaist Dept. of EECS NC Lab
Firewall Tutorial: Kaist Dept. of EECS NC Lab
Firewall Tutorial: Kaist Dept. of EECS NC Lab
KAIST
Dept. of EECS
NC Lab.
Contents
What is Firewalls?
Why Firewalls?
Types of Firewalls
Limitations of firewalls and gateways
Firewalls in Linux
What is Firewalls?
firewall
isolates organization’s internal net from larger
Internet, allowing some packets to pass,
blocking others.
administered public
network Internet
firewall
Why Firewalls?
prevent denial of service attacks:
SYN flooding: attacker establishes many
bogus TCP connections, no resources
left for “real” connections.
prevent illegal modification/access of internal
data.
e.g., attacker replaces CIA’s homepage
with something else
allow only authorized access to inside network
(set of authenticated users/hosts)
Types of Firewalls
firewall Application
Presentation
At the network
layer Session
Transport
Application-level
Network
gateway
Data Link
At the application
Physical
layer
Network layer: Packet Filtering
should arriving
packet be allowed
in? Departing packet
let out?
Example
allow select internal users to telnet
outside.
Users authenticate themselves to
create telnet connection
Application Gateways
gateway-to-remote
host telnet session
host-to-gateway
telnet session
Solution
Router filter blocks all telnet connections not
originating from gateway.
For authorized users, gateway sets up telnet
connection to dest host. Gateway relays data
between 2 connections
Limitations of Firewalls and Gateways
IP spoofing
routercan’t know if data “really” comes from
claimed source
If multiple app’s. need special treatment, each
has own app. gateway.
client software must know how to contact
gateway.
e.g., must set IP address of proxy in Web browser
Tradeoff
degree of communication with outside world, level
of security
Performance problem
Firewalls in Linux
Before kernel 2.2 : ipfwadm
kernel 2.2.x : ipchains
After kernel 2.3.15 : netfilter
netfilter module in linux can handle packet
flow
New alternative command iptables
Backward compatible for ipfwadm and
ipchains
Rules
There are three types of built-in chains (or lis
ts of rules):
INPUT – destined for the local system
OUTPUT – originate from the local system
FORWARD – enter the system and is forwarde
d to another destination
Routing
Decision Forward
Input Output
Local Process
Operations (1/3)