- CMPSC443 - Introduction to Computer and Network Security
Page
CSE543 - Computer and Network Security Module: Firewalls
Professor Patrick McDaniel Fall 2011
1
CSE543 - Computer and Network Security Module: Firewalls Professor - - PowerPoint PPT Presentation
Page
1
CMPSC443 - Introduction to Computer and Network Security Page
2
CMPSC443 - Introduction to Computer and Network Security Page
3
CMPSC443 - Introduction to Computer and Network Security Page
4
CMPSC443 - Introduction to Computer and Network Security Page
5
CMPSC443 - Introduction to Computer and Network Security Page
6
CMPSC443 - Introduction to Computer and Network Security Page
7
CMPSC443 - Introduction to Computer and Network Security Page
8
CMPSC443 - Introduction to Computer and Network Security Page
9
CMPSC443 - Introduction to Computer and Network Security Page
10
CMPSC443 - Introduction to Computer and Network Security Page
11
Preroute Input Forward Postroute Routing Output
CMPSC443 - Introduction to Computer and Network Security Page
12
CMPSC443 - Introduction to Computer and Network Security Page
13
http://www.linuxtopia.org/Linux_Firewall_iptables/c951.html
CMPSC443 - Introduction to Computer and Network Security Page
14
iptables [-t <table_name>] <cmd> <chain> <plist>
CMPSC443 - Introduction to Computer and Network Security Page
15
CMPSC443 - Introduction to Computer and Network Security Page
16
CMPSC443 - Introduction to Computer and Network Security Page
17
CMPSC443 - Introduction to Computer and Network Security Page
18
CMPSC443 - Introduction to Computer and Network Security Page
19
CMPSC443 - Introduction to Computer and Network Security Page
iptables -A INPUT -s 200.200.200.2 -j ACCEPT iptables -A INPUT -s 200.200.200.1 -j DROP iptables -A INPUT -s 200.200.200.1 -p tcp -j DROP iptables -A INPUT -s 200.200.200.1 -p tcp --dport telnet -j DROP iptables -A INPUT -p tcp --destination-port telnet -i ppp0 -j DROP
20
CMPSC443 - Introduction to Computer and Network Security Page
21
Preroute Input Forward Postroute Routing Output
CMPSC443 - Introduction to Computer and Network Security Page
22
FW1 FW2
eth0 eth1 eth0 eth1
CMPSC443 - Introduction to Computer and Network Security Page
23
# iptables -F INPUT # iptables -F OUTPUT # iptables -F FORWARD # iptables -P INPUT ACCEPT # iptables -P OUTPUT ACCEPT # iptables -P FORWARD DROP # iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT # iptables -A FORWARD -i eth0 -o eth1 -m state --state NEW -d 10.0.1.13 --dport 80 -j ACCEPT # iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT # iptables -F INPUT # iptables -F OUTPUT # iptables -F FORWARD # iptables -P INPUT ACCEPT # iptables -P OUTPUT ACCEPT # iptables -P FORWARD DROP # iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT # iptables -A FORWARD -i eth1 -o eth0 -m state --state NEW -d 10.0.1.13 --dport 80 -j ACCEPT # iptables -A FORWARD -i eth1 -o eth0 -d ! 10.0.1.0/24 -j ACCEPT
CMPSC443 - Introduction to Computer and Network Security Page
24
CMPSC443 - Introduction to Computer and Network Security Page
24
# iptables -F INPUT # iptables -F OUTPUT # iptables -F FORWARD # iptables -P INPUT DROP # iptables -P OUTPUT ACCEPT # iptables -P FORWARD DROP # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # iptables -A INPUT -i eth0 -m state --state NEW --dport 22 -j ACCEPT # iptables -A INPUT -i eth0 -m state --state NEW -s 10.0.2.0/24 --dport 80 -j ACCEPT
CMPSC443 - Introduction to Computer and Network Security Page
25