Top Banner
CPSC 426/526 Firewalls, NATs and SDN Ennan Zhai Computer Science Department Yale University
103

Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Apr 09, 2018

Download

Documents

phunglien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

CPSC 426/526Firewalls, NATs and SDN

Ennan ZhaiComputer Science Department

Yale University

Page 2: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Recall: Lec-6

• Sybil attacks and defenses:- What is sybil attack- How to defend against sybil attacks- Case study: DSybil- Case study: SybilGuard

Page 3: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Lecture Roadmap

• P2P vs Global Enterprises• Firewalls• NATs• Software Defined Networks

Page 4: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

P2P vs Global Companies

• In P2P years:- any node can message other nodes out of the blue- early Internet applications were P2P topology- all the peers were individual machines on the public

Internet

Page 5: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• The Internet succeeded and evolved:- PC networking revolution- More and more nontechnical users accessed the Internet- IP address pressure from the 32-bit IP address space- Security, protection and management issues

The Internet Evolved

Page 6: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• The Internet succeeded and evolved:- PC networking revolution- More and more nontechnical users accessed the Internet- IP address pressure from the 32-bit IP address space- Security, protection and management issues

The Internet Evolved

• What happened?- Big companies offer global services- Firewalls and NATs were proposed to fix the above issues- Originally separate; now bundled into same box- Back to “client/server” model from Peer-to-Peer model

Page 7: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• The Internet succeeded and evolved:- PC networking revolution- More and more nontechnical users accessed the Internet- IP address pressure from the 32-bit IP address space- Security, protection and management issues

The Internet Evolved

• What happened?- Big companies offer global services- Firewalls and NATs were proposed to fix the above issues- Originally separate; now bundled into same box- Back to “client/server” model from Peer-to-Peer model

Page 8: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• The Internet succeeded and evolved:- PC networking revolution- More and more nontechnical users accessed the Internet- IP address pressure from the 32-bit IP address space- Security, protection and management issues

• What happened?- Big companies offer global services- Firewalls and NATs were proposed to fix the above issues- Originally separate; now bundled into same box- Back to “client/server” model from Peer-to-Peer model

The Internet Evolved

Page 9: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• The Internet succeeded and evolved:- PC networking revolution- More and more nontechnical users accessed the Internet- IP address pressure from the 32-bit IP address space- Security, protection and management issues

• What happened?- Big companies offer global services- Firewalls and NATs were proposed to fix the above issues- Originally separate; now bundled into same box- Back to “client/server” model from Peer-to-Peer model

The Internet Evolved

Page 10: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

2005-20071999

P2P Time

GFS[2003]

MapReduce[2004]

- Napster and BitTorrent- Unstructured P2P- DHTs

Cloud Time

Smart devices

- Cloud computing- Cloud storage- Cloud middle-box- ... ...

The Internet Evolved

Page 11: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

2005-20071999

P2P Time

GFS[2003]

MapReduce[2004]

- Napster and BitTorrent- Unstructured P2P- DHTs

Cloud Time

Smart devices

- Cloud computing- Cloud storage- Cloud middle-box- ... ...

The Internet Evolved

Firewall & NATsBecame popular

Page 12: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

2005-20071999

P2P Time

GFS[2003]

MapReduce[2004]

- Napster and BitTorrent- Unstructured P2P- DHTs

Cloud Time

Smart devices

- Cloud computing- Cloud storage- Cloud middle-box- ... ...

The Internet Evolved

Cloud companies need to do access control to manage enterprise networks!

Page 13: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce
Page 14: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Lecture Roadmap

• P2P vs Global Enterprises• Firewalls• NATs• Software Defined Networks

Page 15: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewalls• Firewalls were proposed to fix security problems:

- Public networks and private networks- Inside: internal hosts assumed to be “friendly by default”- Outside: Public, external hosts assumed to be “unfriendly

by default”

Internal Network

Page 16: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewalls• Firewalls were proposed to fix security problems:

- Public networks and private networks- Inside: internal hosts assumed to be “friendly by default”- Outside: Public, external hosts assumed to be “unfriendly

by default”

• Administrators define access policies:- Allow certain applications, disallow others- Write rules or policies to manage internal networks

Page 17: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewalls• How does a typical firewall work:

- Look at the first packet on a connection- Making a decision based on the policies

- For allowed connections, first packet causes firewall to create an entry in a flow table

- Subsequent packets in either direction allowed if there is a flow table entry

- Flow usually identified by 5-tuple (source IP and port, dest IP and port, type of protocol)

Page 18: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewall Example (in iptables).... ....iptables -A INPUT -p udp --dport 80 -j ACCEPTiptables -A INPUT -p tcp --dport 22 -j ACCEPTiptables -A INPUT -p tcp --dport 80 -j ACCEPTiptables -A INPUT -p tcp -s 172.168.14.6 -j DROPiptables -A INPUT -m limit --limit 6/seconds -p tcp -j ACCEPT

Page 19: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewall Example (in iptables).... ....iptables -A INPUT -p udp --dport 80 -j ACCEPTiptables -A INPUT -p tcp --dport 22 -j ACCEPTiptables -A INPUT -p tcp --dport 80 -j ACCEPTiptables -A INPUT -p tcp -s 172.168.14.6 -j DROPiptables -A INPUT -m limit --limit 6/seconds -p tcp -j ACCEPT

Linux Kernel

Netfilter

iptables

Page 20: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewalls

• Pros and Cons:- Pros: They do filter out a huge amount of harmful traffics- Cons: Bad guys can still bypass the firewall via other ways

- Cons: It is hard to reason about a complex firewall

Page 21: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Firewalls

• Pros and Cons:- Pros: They do filter out a huge amount of harmful traffics- Cons: Bad guys can still bypass the firewall via other ways

- Cons: It is hard to reason about a complex firewall

Page 22: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Lecture Roadmap

• P2P vs Global Enterprises• Firewalls• NATs• Software Defined Networks

Page 23: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

A Simple NAT Example

192.168.2.2

1.1.1.4S=192.168.2.2:4445D=1.1.1.4:7777

NAT

Page 24: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

NAT

192.168.2.2

1.1.1.4S=192.168.2.2:4445D=1.1.1.4:7777

192.168.2.2:4445 1.1.1.8:10100

A Simple NAT Example

Page 25: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

NAT

192.168.2.2

1.1.1.4

S=192.168.2.2:4445D=1.1.1.4:7777

192.168.2.2:4445 1.1.1.8:10100

S=1.1.1.8:10100D=1.1.1.4:7777

A Simple NAT Example

Page 26: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

NAT (Network Address Translation)• NATs were proposed to fix IP address pressure:

- Internal hosts are assigned private IP addresses- Internal host initiates a flow from internal to external- NAT intercepts first packet; allocates a public source port using the

NAT’s own public IP address- NAT maintains a translation table:

Internal IPs and ports-> External IPs and ports- Uses table to perform the same mapping in reverse on subsequent

incoming packets on flow

Page 27: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

IPv4 Private IP Addresses

• According to Internet Engineering Task Force (IETF) document RFC-1918:- 10.0.0.0/8 IP addresses: 10.0.0.0 -- 10.255.255.255- 172.16.0.0/12 IP addresses: 172.16.0.0 -- 172.31.255.255- 192.168.0.0/16 IP addresses: 192.168.0.0 -- 192.168.255.255

Page 28: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

• NATs also address ease of use:- NAT only needs to buy one public IP address from ISP- Internal hosts only need to know their internal IP addresses- Users in the companies just plug in the cables without

knowing their IP addresses

NAT (Network Address Translation)

Page 29: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

UDP Hole Punching

To write application for today’s global Internet, we need to work around ubiquity of firewalls and NATs.

• How can we make downstream traffic talk with specific hosts in the internal network?

• How can we make two hosts behind two NATs communicate with each other?

Page 30: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

To write application for today’s global Internet, we need to work around ubiquity of firewalls and NATs.

• How can we make downstream traffic talk with specific hosts in the internal network?

• How can we make two hosts behind two NATs communicate with each other?

UDP Hole Punching

Page 31: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 32: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 33: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone NAT• A full cone NAT is NAT where all the requests from the

same internal IP address and port are mapped to the same public IP and port.

• Once a mapping is created, all incoming traffic to the public address is routed to the internal host without checking the address of the remote host.

Page 34: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

Page 35: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Page 36: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 37: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 38: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 39: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100S=1.1.1.5:4321

D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 40: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100S=1.1.1.5:4321

D=192.168.2.2:4445 S=1.1.1.6:1234D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 41: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Full Cone

Full cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100S=1.1.1.5:4321

D=192.168.2.2:4445 S=1.1.1.6:1234D=1.1.1.4:10100

S=1.1.1.6:1234D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow ALL to 1.1.1.4:10100

Page 42: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 43: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone NAT• A restricted cone NAT: like full cone all requests from the

same internal IP address and port are mapped to the same public IP and port.

• Unlike a full cone NAT, a remote host, with IP x, can send a packet to the internal host only if the internal host and had previously sent a packet to IP x.

Page 44: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Page 45: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 46: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 47: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 48: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 49: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 50: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 51: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

Page 52: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

✘S=192.168.2.2:4445D=1.1.1.6:7777

Page 53: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

✘S=192.168.2.2:4445D=1.1.1.6:7777

Page 54: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

✘S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10100D=1.1.1.6:7777

Page 55: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

S=1.1.1.6:4321D=1.1.1.4:10100

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10100D=1.1.1.6:7777

Page 56: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Restricted Cone

Restricted cone NATHost A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:4321D=192.168.2.2:4445 S=1.1.1.6:1234

D=1.1.1.4:10100

S=1.1.1.6:4321D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5 to 1.1.1.4:10100Allow 1.1.1.6 to 1.1.1.4:10100

S=1.1.1.6:4321D=1.1.1.4:10100

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10100D=1.1.1.6:7777

Page 57: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 58: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Port Restricted Cone NAT

• A port restricted cone NATis like a restricted cone NAT, but the restriction includes port numbers.

• An external host can send a packet, with source IP x, and source port P, to the internal host only if the internal host had previously sent a packet to IP x and port P.

Page 59: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Port Restricted Cone

Port restricted cone NAT

Page 60: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Port Restricted Cone

Port restricted cone NAT

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 61: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Port Restricted Cone

Port restricted cone NAT

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 62: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

Port Restricted Cone

Port restricted cone NAT

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 63: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

Port Restricted Cone

Port restricted cone NAT

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 64: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

Port Restricted Cone

Port restricted cone NAT

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 65: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

Port Restricted Cone

Port restricted cone NAT

✘S=1.1.1.5:7777D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 66: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Host A Host B Host C

192.168.2.2 1.1.1.5 1.1.1.61.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777 S=1.1.1.4:10100

D=1.1.1.5:7777

S=1.1.1.5:4321D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Port Restricted Cone

Port restricted cone NAT

✘S=1.1.1.5:7777D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

Page 67: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 68: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric NAT• A symmetric NAT is a NAT where all requests from the

same Internal IP and port to a specific destination IP and port are mapped to the same ones.

• If the same internal host sends a packet with the same source IP and port to a different destination, a different mapping should be used.

• Only the external host that receives a packet can send a UDP packet back to the internal host.

Page 69: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

Page 70: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

Page 71: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

Page 72: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

Page 73: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100

Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100

S=192.168.2.2:4445D=1.1.1.6:7777

Page 74: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

Page 75: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10179D=1.1.1.6:7777

Page 76: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=1.1.1.6:7777D=1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10179D=1.1.1.6:7777

Page 77: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

S=1.1.1.6:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=1.1.1.6:7777D=1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10179D=1.1.1.6:7777

Page 78: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

S=1.1.1.6:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=1.1.1.6:7777D=1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10179D=1.1.1.6:7777

S=1.1.1.6:7777D=1.1.1.4:10100

Page 79: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Symmetric Cone

Symmetric NATHost A Host B Host C

192.168.2.21.1.1.5 1.1.1.6

1.1.1.4

S=192.168.2.2:4445D=1.1.1.5:7777

S=1.1.1.4:10100D=1.1.1.5:7777

S=1.1.1.5:7777D=1.1.1.4:10100

S=1.1.1.5:7777D=192.168.2.2:4445

S=1.1.1.6:7777D=192.168.2.2:4445

Mapping:192.168.2.2:4445 1.1.1.4:10100192.168.2.2:4445 1.1.1.4:10179Policy:Allow 1.1.1.5:7777 to 1.1.1.4:10100Allow 1.1.1.6:7777 to 1.1.1.4:10179

S=1.1.1.6:7777D=1.1.1.4:10179

S=192.168.2.2:4445D=1.1.1.6:7777

S=1.1.1.4:10179D=1.1.1.6:7777

S=1.1.1.6:7777D=1.1.1.4:10100

Page 80: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

Page 81: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Four Different Categories of NATs• NATs have four different categories:

- Full cone NAT- A restricted cone NAT- A port restricted cone NAT- A symmetric NAT

How to make two hosts behind different NATs communicate with each other?

Page 82: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

NAT155.9.3.1

NAT132.76.29.7

Page 83: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

NAT155.9.3.1

NAT132.76.29.7

Restricted NAT

Page 84: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

NAT155.9.3.1

NAT132.76.29.7

Page 85: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

Page 86: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

Page 87: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

1. Allow 18.181.3.3 to me

Page 88: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

1. Allow 18.181.3.3 to me

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

Page 89: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

1. Allow 18.181.3.3 to me

Page 90: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

1. Allow 18.181.3.3 to me

Page 91: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me

1. Allow 18.181.3.3 to me2. Allow 132.76.29.7 to me

Page 92: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me2. Allow 132.76.29.7 to me

1. Allow 18.181.3.3 to me

Page 93: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me2. Allow 132.76.29.7 to me

1. Allow 18.181.3.3 to me

Page 94: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me2. Allow 132.76.29.7 to me

1. Allow 18.181.3.3 to me2. Allow 155.9.3.1 to me

Page 95: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Two Hosts Behind NATs

Host A Host B

Server18.181.3.3

192.168.2.2 192.168.2.1

1. Host A: Public (155.9.3.1:1900)Private (192.168.2.2:4321)2. Host B:Public (132.76.29.7:7777)Private (192.168.2.1:9999)

NAT155.9.3.1

NAT132.76.29.7

1. Allow 18.181.3.3 to me2. Allow 132.76.29.7 to me

1. Allow 18.181.3.3 to me2. Allow 155.9.3.1 to me

Page 96: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Lecture Roadmap

• P2P vs Global Enterprises• Firewalls• NATs• Software Defined Networks

Page 97: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Software Defined Networks

• We need to have an approach to easily manage the control plane for entire enterprise networks

Page 98: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Traditional Network

Page 99: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Software Defined Networks• Decouple control and data planes by providing open

standard APIs

Page 100: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Software Defined Networks• Decouple control and data planes by providing open

standard APIs

ControllerPla+orm

Page 101: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Software Defined Networks• Decouple control and data planes by providing open

standard APIs

ControllerPla+orm

Controller Appication 1

Controller Appication 2

Page 102: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Software Defined Networks• Decouple control and data planes by providing open

standard APIs

ControllerPla+orm

Controller Appication 1

Controller Appication 2

Rules

Rules

Rules

RulesRules

Rules

Page 103: Firewalls, NATs and SDN - zoo.cs.yale.edu Time Smart devices-Cloud computing-Cloud storage-Cloud middle-box-... ... The Internet Evolved. 1999 2005-2007 P2P Time GFS [2003] MapReduce

Next Lecture

• In the lec-8, I will cover:- Cloud platform- IaaS, PaaS and SaaS- File systems and MapReduce