The Margrave Tool for Firewall Analysis Tim Nelson (WPI), - - PowerPoint PPT Presentation

the margrave tool for firewall analysis
SMART_READER_LITE
LIVE PREVIEW

The Margrave Tool for Firewall Analysis Tim Nelson (WPI), - - PowerPoint PPT Presentation

The Margrave Tool for Firewall Analysis Tim Nelson (WPI), Christopher Barratt (Brown), Daniel J. Dougherty (WPI), Kathi Fisler (WPI) and Shriram Krishnamurthi (Brown) 1 and other dens of iniquity 2 I dont really know whats


slide-1
SLIDE 1

The Margrave Tool for Firewall Analysis

Tim Nelson (WPI), Christopher Barratt (Brown), Daniel J. Dougherty (WPI), Kathi Fisler (WPI) and Shriram Krishnamurthi (Brown)

1

slide-2
SLIDE 2

…and other dens of iniquity

2

slide-3
SLIDE 3

“I don’t really know what’s wrong.” “I’m having this strange issue with Cisco IOS…” “I need your advice…”

3

slide-4
SLIDE 4

4

Policy-based routing Static routing, NAT ACLs, reflexive access-lists

slide-5
SLIDE 5

5

slide-6
SLIDE 6

6

Try this!

slide-7
SLIDE 7

7

Try this!

No! Try this!

slide-8
SLIDE 8

8

Try this!

No! Try this! No, no, try this.

slide-9
SLIDE 9

Suggestions do not always agree.

9

Try this!

No! Try this! No, no, try this.

slide-10
SLIDE 10

Debugging Questions:

10

slide-11
SLIDE 11

Debugging Questions:

11

Q: Which hop will SMTP packets take next?

slide-12
SLIDE 12

Debugging Questions:

12

Q: Which hop will SMTP packets take next?

192.168.100.4 192.168.200.5 A:

slide-13
SLIDE 13

Debugging Questions:

13

Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next?

192.168.100.4 192.168.200.5 A:

slide-14
SLIDE 14

Debugging Questions:

14

Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

slide-15
SLIDE 15

Debugging Questions:

15

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

slide-16
SLIDE 16

Debugging Questions:

16

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

TCP From X to Y A:

slide-17
SLIDE 17

Debugging Questions:

17

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next? Q: How do a pair of configurations behave differently?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

TCP From X to Y A:

slide-18
SLIDE 18

Debugging Questions:

18

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next? Q: How do a pair of configurations behave differently?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

TCP From X to Y A:

Time Connection State A:

slide-19
SLIDE 19

Debugging Questions:

19

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next? Q: How do a pair of configurations behave differently?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

TCP From X to Y A:

Time Connection State A:

Scenarios

slide-20
SLIDE 20

Debugging Questions:

20

Q: What packets will pass the firewall? Q: Which configuration rules caused the incorrect routing? Q: Which hop will SMTP packets take next? Q: How do a pair of configurations behave differently?

192.168.100.4 192.168.200.5 A: Line 14 applied to… Line 15 applied to…

A:

TCP From X to Y A:

Time Connection State A:

Margrave

Scenarios

slide-21
SLIDE 21

21

slide-22
SLIDE 22

22

slide-23
SLIDE 23

23

slide-24
SLIDE 24

24

slide-25
SLIDE 25

25

slide-26
SLIDE 26

26

slide-27
SLIDE 27

27

slide-28
SLIDE 28

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

28

“The web can access my server, but my server can’t access the web.”

slide-29
SLIDE 29

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6

29

“The web can access my server, but my server can’t access the web.”

Fe0 209.172.108.16 Vlan1 192.168.2.1/24 interface FastEthernet0 ip address 209.172.108.16 255.255.255.224 interface Vlan1 ip address 192.168.2.1 255.255.255.0

slide-30
SLIDE 30

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

30

“The web can access my server, but my server can’t access the web.”

access-list 102 permit tcp any host 209.172.108.16 eq 80 access-list 102 permit tcp any host 209.172.108.16 eq 21 access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16 ip access-group 102 in

slide-31
SLIDE 31

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

31

“The web can access my server, but my server can’t access the web.”

ip route 0.0.0.0 0.0.0.0 209.172.108.1

slide-32
SLIDE 32

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

32

“The web can access my server, but my server can’t access the web.”

ip nat outside access-list 1 permit 192.168.2.0 0.0.0.255 ip nat inside ip nat pool localnet 209.172.108.16 prefix-length 24 ip nat inside source list 1 pool localnet overload ip nat inside source list 1 interface FastEthernet0 ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

slide-33
SLIDE 33

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

33

“The web can access my server, but my server can’t access the web.”

access-list 102 permit tcp any host 209.172.108.16 eq 80 access-list 102 permit tcp any host 209.172.108.16 eq 21 access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16

slide-34
SLIDE 34

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

34

“The web can access my server, but my server can’t access the web.”

access-list 102 permit tcp any host 209.172.108.16 eq 80 access-list 102 permit tcp any host 209.172.108.16 eq 21 access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16

slide-35
SLIDE 35

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

Firewall

Server: 192.168.2.6 Fe0 209.172.108.16 Vlan1 192.168.2.1/24

35

“The web can access my server, but my server can’t access the web.”

access-list 102 permit tcp any host 209.172.108.16 eq 80 access-list 102 permit tcp any host 209.172.108.16 eq 21 access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16

slide-36
SLIDE 36

36

“The web can access my server, but my server can’t access the web.”

slide-37
SLIDE 37

Passes fe0’s Inbound ACL? Can it be routed? Passes vlan1’s Outbound ACL?

Returning packets

37

“The web can access my server, but my server can’t access the web.”

slide-38
SLIDE 38

Passes fe0’s Inbound ACL? Can it be routed? Passes vlan1’s Outbound ACL?

Returning packets

Passes fe0’s Outbound ACL? Can it be routed? Passes vlan1’s Inbound ACL?

Outgoing packets

38

“The web can access my server, but my server can’t access the web.”

slide-39
SLIDE 39

“Can returning packets be lost?”

39

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

slide-40
SLIDE 40

“Can returning packets be lost?”

40

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE “Find me scenarios where…”

slide-41
SLIDE 41

“Can returning packets be lost?”

41

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>); “Dropped or rejected”

<pkt> =

entry-interface src-addr-in protocol …

slide-42
SLIDE 42

“Can returning packets be lost?”

42

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) ; “Compute next hop and NAT”

<pktplus> =

<pkt> + temporary variables

slide-43
SLIDE 43

“Can returning packets be lost?”

43

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) AND FastEthernet0 = entry-interface; “Arriving at FastEthernet0”

slide-44
SLIDE 44

“Can returning packets be lost?”

44

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) AND FastEthernet0 = entry-interface AND NOT src-addr-in IN 192.168.2.0/255.255.255.0; “Reasonable source”

slide-45
SLIDE 45

“Can returning packets be lost?”

45

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) AND FastEthernet0 = entry-interface AND NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND prot-TCP = protocol AND port-80 = src-port-in; “TCP from port 80”

slide-46
SLIDE 46

“Can returning packets be lost?”

46

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) AND FastEthernet0 = entry-interface AND NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND prot-TCP = protocol AND port-80 = src-port-in; AND dest-addr-in = 209.172.108.16; “To public address”

slide-47
SLIDE 47

“Can returning packets be lost?”

47

1.

interface FastEthernet0

2.

ip address 209.172.108.16 255.255.255.224

3.

ip access-group 102 in

4.

ip nat outside

5.

speed auto

6.

full-duplex

7.

!

8.

interface Vlan1

9.

ip address 192.168.2.1 255.255.255.0

10.

ip nat inside

11.

!

12.

ip route 0.0.0.0 0.0.0.0 209.172.108.1

13.

!

14.

ip nat pool localnet 209.172.108.16 prefix-length 24

15.

ip nat inside source list 1 pool localnet overload

16.

ip nat inside source list 1 interface FastEthernet0

17.

ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80

18.

ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21

19.

ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389

20.

!

21.

access-list 1 permit 192.168.2.0 0.0.0.255

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

EXPLORE NOT passes-firewall(<pkt>) AND internal-result(<pktplus>) AND FastEthernet0 = entry-interface AND NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND prot-TCP = protocol AND port-80 = src-port-in; AND dest-addr-in = 209.172.108.16; “To public address” Here, a scenario is: Data about a packet’s contents & handling

slide-48
SLIDE 48

“Can returning packets be lost?”

48

Check for denied return packets: Result:

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > IS POSSIBLE?;

slide-49
SLIDE 49

“Can returning packets be lost?”

49

Check for denied return packets: Result:

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > IS POSSIBLE?; true > Some return packets will be dropped.

slide-50
SLIDE 50

“Can returning packets be lost?”

50

Check for denied return packets: Result:

Similar query: outgoing packets all pass the firewall. > EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > IS POSSIBLE?; true > Some return packets will be dropped.

slide-51
SLIDE 51

“Which rule(s) were responsible?”

51

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > SHOW REALIZED InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line26_applies(<pkt>);

slide-52
SLIDE 52

“Which rule(s) were responsible?”

52

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > SHOW REALIZED InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line26_applies(<pkt>);

The ACL rules tied to FastEthernet0

slide-53
SLIDE 53

“Which rule(s) were responsible?”

53

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > SHOW REALIZED InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line26_applies(<pkt>); > EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); > SHOW REALIZED InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line26_applies(<pkt>); { InboundACL:router-FastEthernet0-line26_applies( … ) } >

slide-54
SLIDE 54

54

{ InboundACL:router-FastEthernet0-line26_applies( … ) }

The ACL rule… Can apply. Appearing on line 26 Tied to the router’s FastEthernet0 interface

slide-55
SLIDE 55

55

{ InboundACL:router-FastEthernet0-line26_applies( … ) }

The ACL rule… Can apply. Appearing on line 26 Tied to the router’s FastEthernet0 interface

EXPLORE InboundACL:router-FastEthernet0-line26_applies(<pkt>); Use these in queries too:

slide-56
SLIDE 56

56

{ InboundACL:router-FastEthernet0-line26_applies( … ) }

The ACL rule… Can apply. Appearing on line 26 Tied to the router’s FastEthernet0 interface

EXPLORE InboundACL:router-FastEthernet0-line26_applies(<pkt>); EXPLORE InboundACL:router-FastEthernet0-line26_matches (<pkt>); Use these in queries too:

slide-57
SLIDE 57

“Add a rule allowing all returning traffic from port 80…”

57

slide-58
SLIDE 58

Will this change fix my problem? “Add a rule allowing all returning traffic from port 80…”

58

slide-59
SLIDE 59

Will it introduce new problems? Will this change fix my problem? “Add a rule allowing all returning traffic from port 80…”

59

slide-60
SLIDE 60

60

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

slide-61
SLIDE 61

diff says: 25a26 > access-list 102 permit tcp any eq 80 any

61

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

slide-62
SLIDE 62

62

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

slide-63
SLIDE 63

EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) );

63

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

slide-64
SLIDE 64

EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) );

64

EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) );

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

slide-65
SLIDE 65

EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) );

65

EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) );

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 deny tcp any host 209.172.108.16

22.

access-list 102 permit tcp any host 209.172.108.16 eq 80

23.

access-list 102 permit tcp any host 209.172.108.16 eq 21

24.

access-list 102 permit tcp any host 209.172.108.16 eq 20

25.

access-list 102 permit tcp any host 209.172.108.16 eq 23

26.

access-list 102 permit tcp any eq 80 any

27.

access-list 102 deny tcp any host 209.172.108.16

Change-impact analysis

slide-66
SLIDE 66

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL;

66

slide-67
SLIDE 67

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

67

slide-68
SLIDE 68

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

68

Public address of server

slide-69
SLIDE 69

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1 “Some other address” “Some other port”

69

slide-70
SLIDE 70

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

70

Packet is routed successfully

slide-71
SLIDE 71

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

71

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

slide-72
SLIDE 72

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

72

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1 More than we intended?

slide-73
SLIDE 73

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL;

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

73

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1 More than we intended?

slide-74
SLIDE 74

> EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND fastethernet0 = entry-interface AND internal-result1(<pktplus>) AND (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); > SHOW ALL;

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

74

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1 More than we intended?

slide-75
SLIDE 75

75

Query:

slide-76
SLIDE 76

76

EXPLORE passes-firewall(<pkt>)

Query:

slide-77
SLIDE 77

77

EXPLORE passes-firewall(<pkt>)

Query:

Variables for packet contents & handling

slide-78
SLIDE 78

78

EXPLORE passes-firewall(<pkt>)

Query:

entry-interface, next-hop, dest-addr-in, …

slide-79
SLIDE 79

79

entry-interface: fe0 next-hop: 192.168.2.6 dest-addr-in: 209.172.108.16 …

EXPLORE passes-firewall(<pkt>)

Query: Scenario:

entry-interface, next-hop, dest-addr-in, …

slide-80
SLIDE 80

80

entry-interface: fe0 next-hop: 192.168.2.6 dest-addr-in: 209.172.108.16 …

EXPLORE passes-firewall(<pkt>)

Query: Scenario:

192.168.2.6 209.172.108.16 fe0

slide-81
SLIDE 81

81

entry-interface: fe0 next-hop: 192.168.2.6 dest-addr-in: 209.172.108.16 …

EXPLORE passes-firewall(<pkt>)

Query: Scenario:

192.168.2.6 209.172.108.16 fe0

… How large a scenario do we need to check?

slide-82
SLIDE 82

82

entry-interface: fe0 next-hop: 192.168.2.6 dest-addr-in: 209.172.108.16 …

EXPLORE passes-firewall(<pkt>)

Query: Scenario:

192.168.2.6 209.172.108.16 fe0

… How large a scenario do we need to check?

Margrave computes a bound automatically, most of the time.

slide-83
SLIDE 83

Let’s Recap:

83

slide-84
SLIDE 84

Let’s Recap:

84

Do scenarios exist? True/false

slide-85
SLIDE 85

Let’s Recap:

85

Do scenarios exist? True/false Which scenarios exist?

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

slide-86
SLIDE 86

Let’s Recap:

86

Do scenarios exist? True/false Which scenarios exist? Which rules can take effect? “InboundACL for FastEthernet0 on Line26”

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

slide-87
SLIDE 87

Let’s Recap:

87

Do scenarios exist? True/false Which scenarios exist? Which rules can take effect? “InboundACL for FastEthernet0 on Line26” Single-configuration and multi-configuration queries (Change-impact analysis)

protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1

slide-88
SLIDE 88

Passes fe0’s Inbound ACL? Can it be routed? Passes vlan1’s Outbound ACL?

Returning packets

88

slide-89
SLIDE 89

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 101 in ip policy route-map internet ! ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 ! access-list 101 deny ip 10.232.0.0 0.0.3.255 10.232.4.0 0.0.3.255 access-list 101 deny ip 10.232.4.0 0.0.3.255 10.232.0.0 0.0.3.255 access-list 101 permit ip any any ! access-list 10 permit 10.232.0.0 0.0.3.255 access-list 10 permit 10.232.100.0 0.0.3.255 ! route-map internet permit 10 match ip address 10 set ip next-hop 10.232.0.15 89

Can it be routed?

slide-90
SLIDE 90

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 101 in ip policy route-map internet ! ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 ! access-list 101 deny ip 10.232.0.0 0.0.3.255 10.232.4.0 0.0.3.255 access-list 101 deny ip 10.232.4.0 0.0.3.255 10.232.0.0 0.0.3.255 access-list 101 permit ip any any ! access-list 10 permit 10.232.0.0 0.0.3.255 access-list 10 permit 10.232.100.0 0.0.3.255 ! route-map internet permit 10 match ip address 10 set ip next-hop 10.232.0.15 90

How is it routed?

slide-91
SLIDE 91

91

slide-92
SLIDE 92

92

InboundACL:Permit InboundACL:Deny ip access-group 102 in Provides these query terms:

slide-93
SLIDE 93

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

93

LocalSwitching:Forward LocalSwitching:Pass ip access-group 102 in Provides these query terms:

slide-94
SLIDE 94

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

94

ip policy route-map internet route-map internet permit 10 match ip address 10 set ip next-hop 10.232.0.15 PolicyRouting:Forward PolicyRouting:Route PolicyRouting:Pass ip access-group 102 in Provides these query terms:

slide-95
SLIDE 95

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

95

ip policy route-map internet route-map internet permit 10 match ip address 10 set ip next-hop 10.232.0.15 StaticRouting:Forward StaticRouting:Route StaticRouting:Pass ip access-group 102 in ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 Provides these query terms:

slide-96
SLIDE 96

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

96

DefaultPolicyRouting:Forward DefaultPolicyRouting:Route DefaultPolicyRouting:Pass ip access-group 102 in ip policy route-map internet route-map internet permit 10 match ip address 10 set ip [default] next-hop 10.232.0.15 ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 Provides these query terms:

slide-97
SLIDE 97

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

97

NetworkSwitching:Forward NetworkSwitching:Pass ip access-group 102 in ip policy route-map internet route-map internet permit 10 match ip address 10 set ip [default] next-hop 10.232.0.15 ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 Provides these query terms:

slide-98
SLIDE 98

interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0

98

OutboundACL:Permit OutboundACL:Deny ip access-group 102 in ip access-group 102 out ip policy route-map internet route-map internet permit 10 match ip address 10 set ip [default] next-hop 10.232.0.15 ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip route 10.232.104.0 255.255.252.0 10.254.1.130 Provides these query terms:

slide-99
SLIDE 99

EXPLORE entry-interface = fastethernet0 AND NOT LocalSwitching:Forward(<pkt>)

I only want packets that don’t have a local destination.

99

slide-100
SLIDE 100

EXPLORE entry-interface = fastethernet0 AND NOT LocalSwitching:Forward(<pkt>)

I only want packets that don’t have a local destination. Which permitted packets are handled by policy routing? Does the static route ever apply to WWW packets?

100

slide-101
SLIDE 101

Scenario-finding logic engine

101

slide-102
SLIDE 102

Scenario-finding logic engine

102

Kodkod

& SAT Solving

slide-103
SLIDE 103

Scenario-finding logic engine General Policy Language

103

Kodkod

& SAT Solving

slide-104
SLIDE 104

Scenario-finding logic engine Query Language General Policy Language

104

Kodkod

& SAT Solving

slide-105
SLIDE 105

Scenario-finding logic engine Query Language General Policy Language

105

Kodkod

& SAT Solving

slide-106
SLIDE 106

Scenario-finding logic engine Query Language General Policy Language Supported subset of Cisco IOS

106

Kodkod

& SAT Solving

slide-107
SLIDE 107

Scenario-finding logic engine Query Language General Policy Language Supported subset of Cisco IOS

107

Kodkod

& SAT Solving

XACML Amazon SQS Iptables

(in progress)

slide-108
SLIDE 108

108

slide-109
SLIDE 109

Future Work

109

slide-110
SLIDE 110

Future Work

110

192.168.1.5 Port 25 192.168.1.5 Port 80

slide-111
SLIDE 111

Future Work

111

192.168.1.5 Port 25 192.168.1.5 Port 80 192.168.1.5 Ports 25, 80

slide-112
SLIDE 112

Future Work

112

192.168.1.5 Port 25 192.168.1.5 Port 80 192.168.1.5 Ports 25, 80

slide-113
SLIDE 113

Future Work

113

EXPLORE FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in

192.168.1.5 Port 25 192.168.1.5 Port 80 192.168.1.5 Ports 25, 80

slide-114
SLIDE 114

Future Work

114

EXPLORE FastEthernet0 = entry-interface AND prot-TCP = protocol AND port-80 = src-port-in

“Try stateful inspection.”

192.168.1.5 Port 25 192.168.1.5 Port 80 192.168.1.5 Ports 25, 80

slide-115
SLIDE 115

What configuration problems do you face? Come talk to me! (I’m here until Friday.)

Text me: (774) 314-1128 Email me: tn@cs.wpi.edu

Download the tool:

www.margrave-tool.org

Thank you to: Varun Singh (Brown), Morgan Quirk (WPI), Emina Torlak (IBM Watson)

115