Firewalls
What is a Firewall?
Classification of Firewall
Characterized by protocol level it controls in
Firewalls – Packet Filters
Firewalls – Packet Filters
Usage of Packet Filters
How to Configure a Packet Filter
Every ruleset is followed by an implicit rule reading like this.
Example 1:
Suppose we want to allow inbound mail (SMTP, port 25) but only to our gateway machine. Also suppose that mail from some particular site SPIGOT is to be blocked.
Solution 1:
Example 2:
Now suppose that we want to implement the policy “any inside host can send mail to the outside”.
Solution 2:
This solution allows calls to come from any port on an inside machine, and will direect them to port 25 on the outside. Simple enough…
So why is it wrong?
What can be a better solution ?
Security & Performance of Packet Filters
Port Numbering
Firewalls – Stateful Packet Filters
Stateful Filtering
Firewall Outlines
Firewall Gateways
Firewalls - Application Level Gateway (or Proxy)
Application-Level Filtering
App-level Firewall Architecture
Daemon spawns proxy when communication detected …
Network Connection
Telnet daemon
SMTP daemon
FTP daemon
Telnet proxy
FTP proxy
SMTP proxy
Enforce policy for specific protocols
Firewall Outlines
Firewalls - Circuit Level Gateway
Firewalls - Circuit Level Gateway
Figure 9.7: A typical SOCKS connection through interface A, and rogue connection through the external interface, B.
Bastion Host
Screened Host Architecture
Screened Subnet Using Two Routers
Firewall Outlines
Dynamic Packet Filters
1.2.3.4
Intended connection from 1.2.3.4 to 5.6.7.8
5.6.7.8
1.2.3.4
5.6.7.8
Firewall
Redialing on a dynamic packet filter. The dashed arrow
shows the intended connection; the solid arrows show the actual
connections, to and from the relay in the firewall box. The
Firewall impersonates each endpoint to the other.
1.2.3.4
5.6.7.8
10.11.12.13
5.6.7.8
Application�Proxy
Firewall
Intended connection from 1.2.3.4 to 5.6.7.8
A dynamic packet filter with an application proxy. Note the change in source address
Firewalls Aren’t Perfect?
Figure 9.2: A firewall router with multiple internal networks.
Filter Rule: Open access to Net 2 means source address from Net 3
Network Topology
Address-Spoofing
External Interface Ruleset
Allow outgoing calls, permit incoming calls only for mail and only to gateway GW
Note: Specify GW as destination host instead of Net 1
to prevent open access to Net 1
Net 1 Router Interface Ruleset
Note: Spoofing is avoided with the specification of GW
How Many Routers Do We Need?
Routing Filters
Routing Filters (cont)
Dual Homed Host Architecture
Asymmetric Routes
Are Dynamic Packet Filters Safe?
Distributed Firewalls
Distributed Firewalls Drawback
Where to Filter?
Dynamic Packet Filter Implementation
Per-Interface Tables Consulted by Dynamic Packet Filter