“The web can access my server, but my server can’t access the web.” interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. Fe0 209.172.108.16 ip access-group 102 in 3. ip nat outside ip nat outside 4. speed auto 5. full-duplex 6. Firewall ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. ip nat inside Vlan1 192.168.2.1/24 ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 ip nat pool localnet 209.172.108.16 prefix-length 24 12. ! 13. ip nat inside source list 1 pool localnet overload ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 ip nat inside source list 1 interface FastEthernet0 16. 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 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. 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 19. ! 20. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 access-list 1 permit 192.168.2.0 0.0.0.255 access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 3389 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. Server: 192.168.2.6 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 32
“The web can access my server, but my server can’t access the web.” interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. Fe0 209.172.108.16 ip access-group 102 in 3. ip nat outside 4. speed auto 5. full-duplex 6. Firewall ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. Vlan1 192.168.2.1/24 ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. 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 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. 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 24. Server: 192.168.2.6 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 deny tcp any host 209.172.108.16 26. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16 33
“The web can access my server, but my server can’t access the web.” interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. Fe0 209.172.108.16 ip access-group 102 in 3. ip nat outside 4. speed auto 5. full-duplex 6. Firewall ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. Vlan1 192.168.2.1/24 ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. 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 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. 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 24. Server: 192.168.2.6 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 deny tcp any host 209.172.108.16 26. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16 34
“The web can access my server, but my server can’t access the web.” interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. Fe0 209.172.108.16 ip access-group 102 in 3. ip nat outside 4. speed auto 5. full-duplex 6. Firewall ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. Vlan1 192.168.2.1/24 ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. 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 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. 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 24. Server: 192.168.2.6 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 permit tcp any host 209.172.108.16 eq 20 access-list 102 deny tcp any host 209.172.108.16 26. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 deny tcp any host 209.172.108.16 35
“The web can access my server, but my server can’t access the web.” 36
“The web can access my server, but my server can’t access the web.” Returning packets Passes fe0’s Inbound ACL? Can it be routed? Passes vlan1’s Outbound ACL? 37
“The web can access my server, but my server can’t access the web.” Returning packets Outgoing packets Passes fe0’s Passes fe0’s Outbound Inbound ACL? ACL? Can it be Can it be routed? routed? Passes vlan1’s Passes vlan1’s Outbound Inbound ACL? ACL? 38
“Can returning packets be lost?” interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. ip access-group 102 in 3. ip nat outside 4. speed auto 5. full-duplex 6. ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 39
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. ip access-group 102 in 3. ip nat outside 4. speed auto 5. “Find me scenarios full-duplex 6. ! 7. where…” interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 40
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>); ip access-group 102 in 3. ip nat outside 4. speed auto 5. full-duplex 6. ! 7. interface Vlan1 “Dropped or rejected” 8. ip address 192.168.2.1 255.255.255.0 9. ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 <pkt> = 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. entry-interface access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 src-addr-in 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. protocol access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. … 41
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) ; 4. speed auto 5. full-duplex 6. ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. “Compute next hop and NAT” ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. <pktplus> = ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. <pkt> access-list 102 permit tcp any host 209.172.108.16 eq 21 23. + access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. temporary variables access-list 102 deny tcp any host 209.172.108.16 26. 42
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) 4. speed auto 5. AND FastEthernet0 = entry-interface ; full-duplex 6. ! 7. interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 9. ip nat inside 10. ! 11. “Arriving at FastEthernet0” ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 43
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) 4. speed auto 5. AND FastEthernet0 = entry-interface full-duplex 6. ! 7. AND interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 NOT src-addr-in IN 192.168.2.0/255.255.255.0 ; 9. ip nat inside 10. ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. “Reasonable source” ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 44
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) 4. speed auto 5. AND FastEthernet0 = entry-interface full-duplex 6. ! 7. AND interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 NOT src-addr-in IN 192.168.2.0/255.255.255.0 9. ip nat inside 10. AND prot-TCP = protocol ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. AND port-80 = src-port-in ; ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. “TCP from port 80” ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 45
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) 4. speed auto 5. AND FastEthernet0 = entry-interface full-duplex 6. ! 7. AND interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 NOT src-addr-in IN 192.168.2.0/255.255.255.0 9. ip nat inside 10. AND prot-TCP = protocol ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. AND port-80 = src-port-in ; ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 AND dest-addr-in = 209.172.108.16 ; 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. “To public address” ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 46
“Can returning packets be lost?” EXPLORE interface FastEthernet0 1. ip address 209.172.108.16 255.255.255.224 2. NOT passes-firewall (<pkt>) ip access-group 102 in 3. ip nat outside AND internal-result (<pktplus>) 4. speed auto 5. AND FastEthernet0 = entry-interface full-duplex 6. ! 7. AND interface Vlan1 8. ip address 192.168.2.1 255.255.255.0 NOT src-addr-in IN 192.168.2.0/255.255.255.0 9. ip nat inside 10. AND prot-TCP = protocol ! 11. ip route 0.0.0.0 0.0.0.0 209.172.108.1 12. AND port-80 = src-port-in ; ! 13. ip nat pool localnet 209.172.108.16 prefix-length 24 AND dest-addr-in = 209.172.108.16 ; 14. ip nat inside source list 1 pool localnet overload 15. ip nat inside source list 1 interface FastEthernet0 16. ip nat inside source static tcp 192.168.2.6 80 209.172.108.16 80 17. ip nat inside source static tcp 192.168.2.6 21 209.172.108.16 21 18. “To public address” ip nat inside source static tcp 192.168.2.6 3389 209.172.108.16 3389 19. Here, a scenario is: ! 20. access-list 1 permit 192.168.2.0 0.0.0.255 21. access-list 102 permit tcp any host 209.172.108.16 eq 80 22. access-list 102 permit tcp any host 209.172.108.16 eq 21 Data about a packet’s 23. access-list 102 permit tcp any host 209.172.108.16 eq 20 24. contents & handling access-list 102 permit tcp any host 209.172.108.16 eq 23 25. access-list 102 deny tcp any host 209.172.108.16 26. 47
“Can returning packets be lost?” Check for denied return packets: > 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>); Result: > IS POSSIBLE? ; 48
“Can returning packets be lost?” Check for denied return packets: > 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>); Some return Result: packets will be > IS POSSIBLE?; dropped. true > 49
“Can returning packets be lost?” Check for denied return packets: > 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>); Some return Result: packets will be > IS POSSIBLE?; dropped. true > Similar query: outgoing packets all pass the firewall. 50
“Which rule(s) were responsible?” > 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>); 51
“Which rule(s) were responsible?” > EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND prot-TCP = protocol The ACL rules tied to AND port-80 = src-port-in FastEthernet0 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>); 52
“Which rule(s) were responsible?” > EXPLORE > EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND FastEthernet0 = entry-interface AND prot-TCP = protocol AND prot-TCP = protocol AND port-80 = src-port-in AND port-80 = src-port-in AND dest-addr-in = 209.172.108.16 AND dest-addr-in = 209.172.108.16 AND internal-result(<pktplus>) AND internal-result(<pktplus>) AND NOT passes-firewall(<pkt>); AND NOT passes-firewall(<pkt>); > SHOW REALIZED > SHOW REALIZED InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line22_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line23_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line24_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line25_applies(<pkt>), InboundACL:router-FastEthernet0-line26_applies(<pkt>); InboundACL:router-FastEthernet0-line26_applies(<pkt>); { InboundACL:router-FastEthernet0- line26_applies( … ) } > 53
The ACL rule… Tied to the Appearing on router ’s line 26 FastEthernet0 interface Can apply. { InboundACL:router-FastEthernet0-line26_ applies ( … ) } 54
The ACL rule… Tied to the Appearing on router ’s line 26 FastEthernet0 interface Can apply. { InboundACL:router-FastEthernet0-line26_ applies ( … ) } Use these in queries too: EXPLORE InboundACL:router-FastEthernet0-line26_ applies (<pkt>); 55
The ACL rule… Tied to the Appearing on router ’s line 26 FastEthernet0 interface Can apply. { InboundACL:router-FastEthernet0-line26_ applies ( … ) } Use these in queries too: EXPLORE InboundACL:router-FastEthernet0-line26_ applies (<pkt>); EXPLORE InboundACL:router-FastEthernet0-line26_ matches (<pkt>); 56
“Add a rule allowing all returning traffic from port 80…” 57
“Add a rule allowing all returning traffic from port 80…” Will this change fix my problem? 58
“Add a rule allowing all returning traffic from port 80…” Will it introduce Will this change new problems? fix my problem? 59
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. 60
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. diff says: 25a26 > access-list 102 permit tcp any eq 80 any 61
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. 62
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. 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
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. EXPLORE EXPLORE NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND FastEthernet0 = entry-interface AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND internal-result1(<pktplus>) AND ( passes-firewall1 (<pkt>) AND NOT passes-firewall2 (<pkt>) (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR OR passes-firewall2 (<pkt>) AND NOT passes-firewall1 (<pkt>) ); passes-firewall2(<pkt>) AND NOT passes-firewall1(<pkt>) ); 64
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 80 22. 22. 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 21 23. 23. 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 20 24. 24. access-list 102 permit tcp any host 209.172.108.16 eq 23 access-list 102 permit tcp any host 209.172.108.16 eq 23 25. 25. access-list 102 deny tcp any host 209.172.108.16 access-list 102 permit tcp any eq 80 any 26. 26. access-list 102 deny tcp any host 209.172.108.16 27. EXPLORE EXPLORE Change-impact NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND NOT src-addr-in IN 192.168.2.0/255.255.255.0 AND analysis FastEthernet0 = entry-interface AND FastEthernet0 = entry-interface AND internal-result1(<pktplus>) AND internal-result1(<pktplus>) AND ( passes-firewall1 (<pkt>) AND NOT passes-firewall2 (<pkt>) (passes-firewall1(<pkt>) AND NOT passes-firewall2(<pkt>) OR OR passes-firewall2 (<pkt>) AND NOT passes-firewall1 (<pkt>) ); 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>) ); > SHOW ALL; 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; 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
> 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>) ); Public address of server > 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
> 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>) ); “Some other address” > SHOW ALL; protocol: prot-tcp entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 “Some other port” src-addr-in: ipaddress dest-port-in: port src-port-in: port-80 exit-interface: vlan1 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 Packet is routed successfully 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 protocol: prot-tcp entry-interface: fastethernet0 entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 dest-addr-in: ipaddress src-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port dest-port-in: port src-port-in: port-80 src-port-in: port-80 exit-interface: vlan1 exit-interface: vlan1 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>) ); More than we intended? > SHOW ALL; protocol: prot-tcp protocol: prot-tcp entry-interface: fastethernet0 entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 dest-addr-in: ipaddress src-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port dest-port-in: port src-port-in: port-80 src-port-in: port-80 exit-interface: vlan1 exit-interface: vlan1 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>) ); More than we intended? > SHOW ALL; protocol: prot-tcp protocol: prot-tcp … entry-interface: fastethernet0 entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 dest-addr-in: ipaddress src-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port dest-port-in: port src-port-in: port-80 src-port-in: port-80 exit-interface: vlan1 exit-interface: vlan1 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>) ); More than we intended? > SHOW ALL; protocol: prot-tcp protocol: prot-tcp … entry-interface: fastethernet0 entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 dest-addr-in: ipaddress src-addr-in: ipaddress src-addr-in: ipaddress dest-port-in: port dest-port-in: port src-port-in: port-80 src-port-in: port-80 exit-interface: vlan1 exit-interface: vlan1 74
Query: 75
Query: EXPLORE passes-firewall( <pkt> ) 76
Query: EXPLORE passes-firewall( <pkt> ) Variables for packet contents & handling 77
Query: EXPLORE passes-firewall( <pkt> ) entry-interface, next-hop, dest-addr-in, … 78
Query: Scenario: EXPLORE passes-firewall( <pkt> ) entry-interface : fe0 next-hop: 192.168.2.6 dest-addr-in : 209.172.108.16 entry-interface, … next-hop, dest-addr-in, … 79
Query: Scenario: EXPLORE passes-firewall( <pkt> ) entry-interface : fe0 next-hop: 192.168.2.6 dest-addr-in : 209.172.108.16 … 192.168.2.6 209.172.108.16 fe0 … 80
Query: Scenario: EXPLORE passes-firewall( <pkt> ) entry-interface : fe0 next-hop: 192.168.2.6 dest-addr-in : 209.172.108.16 … How large a scenario do we 192.168.2.6 need to check? 209.172.108.16 fe0 … 81
Query: Scenario: EXPLORE passes-firewall( <pkt> ) entry-interface : fe0 next-hop: 192.168.2.6 dest-addr-in : 209.172.108.16 … How large a scenario do we 192.168.2.6 need to check? 209.172.108.16 fe0 Margrave computes a bound automatically, most of the time. … 82
Let’s Recap: 83
Let’s Recap: Do scenarios exist? True/false 84
Let’s Recap: Which scenarios exist? Do scenarios exist? True/false 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 85
Let’s Recap: Which scenarios exist? Which rules can Do scenarios exist? take effect? True/false protocol: prot-tcp “ InboundACL for entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 FastEthernet0 on src-addr-in: ipaddress Line26” dest-port-in: port src-port-in: port-80 exit-interface: vlan1 86
Let’s Recap: Which scenarios exist? Which rules can Do scenarios exist? take effect? True/false protocol: prot-tcp “ InboundACL for entry-interface: fastethernet0 dest-addr-in: 209.172.108.16 FastEthernet0 on src-addr-in: ipaddress Line26” dest-port-in: port src-port-in: port-80 exit-interface: vlan1 Single-configuration and multi -configuration queries (Change-impact analysis) 87
Returning packets Passes fe0’s Inbound ACL? Can it be routed? Passes vlan1’s Outbound ACL? 88
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 Can it be access-list 10 permit 10.232.100.0 0.0.3.255 routed? ! route-map internet permit 10 match ip address 10 set ip next-hop 10.232.0.15 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 How is it routed? 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
91
ip access-group 102 in Provides these query terms: InboundACL:Permit InboundACL:Deny 92
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in Provides these query terms: LocalSwitching:Forward LocalSwitching:Pass 93
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in ip policy route-map internet route-map internet permit 10 Provides these query terms: match ip address 10 PolicyRouting:Forward set ip next-hop 10.232.0.15 PolicyRouting:Route PolicyRouting:Pass 94
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip policy route-map internet ip route 10.232.104.0 255.255.252.0 10.254.1.130 route-map internet permit 10 Provides these query terms: match ip address 10 StaticRouting:Forward set ip next-hop 10.232.0.15 StaticRouting:Route StaticRouting:Pass 95
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip policy route-map internet ip route 10.232.104.0 255.255.252.0 10.254.1.130 route-map internet permit 10 Provides these query terms: match ip address 10 DefaultPolicyRouting:Forward set ip [ default] next-hop 10.232.0.15 DefaultPolicyRouting:Route DefaultPolicyRouting:Pass 96
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip policy route-map internet ip route 10.232.104.0 255.255.252.0 10.254.1.130 route-map internet permit 10 Provides these query terms: match ip address 10 NetworkSwitching:Forward set ip [ default] next-hop 10.232.0.15 NetworkSwitching:Pass 97
interface GigabitEthernet0/0 ip address 10.232.0.1 255.255.252.0 ip access-group 102 in ip access-group 102 out ip route 10.232.100.0 255.255.252.0 10.254.1.130 ip policy route-map internet ip route 10.232.104.0 255.255.252.0 10.254.1.130 route-map internet permit 10 Provides these query terms: match ip address 10 OutboundACL:Permit set ip [ default] next-hop 10.232.0.15 OutboundACL:Deny 98
EXPLORE entry-interface = fastethernet0 AND NOT LocalSwitching:Forward (<pkt>) I only want packets that don’t have a local destination. 99
EXPLORE entry-interface = fastethernet0 AND NOT LocalSwitching:Forward (<pkt>) I only want packets that don’t have a local destination. Does the static Which permitted route ever apply packets are to WWW handled by policy packets? routing? 100
Recommend
More recommend