I denna laboration använder vi Extended ACL för att filtrera nätverkstrafiken grundad i protokoll vilket innebär att nätverkstjänster som IP, HTTP, HTTPS, SMTP och POP3 filtreras.
Task 1: PC4 nekas åtkomst till nätverk 192.168.1.0/28
Task 2:
- PC3 nekas åtkomst till email server.
- PC2 tillåts endast HTTPS åtkomst till HTTP servern.
- Alla andra nätverkstrafik tillåts
Topologi
Instruktioner
Konfigurera hostname och IP-adresser på router R1
- Router(config)#hostname R1
- R1(config)#interface g0/0
- R1(config-if)#description Connected To LAN1
- R1(config-if)#ip address 192.168.1.17 255.255.255.240
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#interface s0/0/0
- R1(config-if)#description Connected To R2
- R1(config-if)#ip address 10.1.1.1 255.255.255.252
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#interface s0/0/1
- R1(config-if)#description Connected To R3
- R1(config-if)#ip address 10.3.3.1 255.255.255.252
- R1(config-if)#clock rate 64000
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#
Konfigurera Telnet och grundläggande säkerhet på router R1
- R1(config)#enable secret enpass
- R1(config)#no ip domain lookup
- R1(config)#line console 0
- R1(config-line)#logging synchronous
- R1(config-line)#password conpass
- R1(config-line)#login
- R1(config-line)#exit
- R1(config)#line vty 0 15
- R1(config-line)#password vtypass
- R1(config-line)#login
- R1(config-line)#transport input telnet
- R1(config-line)#exit
- R1(config)#
Konfigurera hostname och IP-adresser på router R2
- Router(config)#hostname R2
- R2(config)#interface g0/0
- R2(config-if)#description Connected To LAN
- R2(config-if)#ip address 192.168.1.1 255.255.255.240
- R2(config-if)#no shutdown
- R2(config)#interface s0/0/0
- R2(config-if)#description Connected To R1
- R2(config-if)#clock rate 128000
- R2(config-if)#ip address 10.1.1.2 255.255.255.252
- R2(config-if)#no shutdown
- R2(config-if)#exit
- R2(config)#interface s0/0/1
- R2(config-if)#description Connected To R3
- R2(config-if)#ip address 10.2.2.1 255.255.255.252
- R2(config-if)#no shutdown R2(config-if)#exit
Konfigurera Telnet och grundläggande säkerhet på router R2
- R2(config)#enable secret enpass
- R2(config)#no ip domain lookup
- R2(config)#line console 0
- R2(config-line)#logging synchronous
- R2(config-line)#password conpass
- R2(config-line)#login
- R2(config-line)#exit
- R2(config)#line vty 0 15
- R2(config-line)#password vtypass
- R2(config-line)#login
- R2(config-line)#transport input telnet
- R1(config-line)#exit
- R2(config)#
Konfigurera hostname och IP-adresser på router R3
- Router(config)#hostname R3
- R3(config)#interface s0/0/1
- R3(config-if)#description Connected To R2
- R3(config-if)#ip address 10.2.2.2 255.255.255.252
- R3(config-if)#no shutdown
- R3(config-if)#exit
- R3(config)#interface g0/0
- R3(config-if)#description Connected To LAN
- R3(config-if)#ip address 192.168.1.33 255.255.255.248
- R3(config-if)#no shutdown
- R3(config-if)#exit R3(config)#int s0/0/0
- R3(config-if)#description Connected To R1
- R3(config-if)#ip address 10.3.3.2 255.255.255.252
- R3(config-if)#no shutdown
- R3(config-if)#exit
- R3(config)#
Konfigurera Telnet och grundläggande säkerhet på router R3
- R3(config)#enable secret enpass
- R3(config)#no ip domain lookup
- R3(config)#line console 0
- R3(config-line)#logging synchronous
- R3(config-line)#password conpass
- R3(config-line)#login
- R3(config-line)#exit
- R3(config)#line vty 0 15
- R3(config-line)#password vtypass
- R3(config-line)#login
- R3(config-line)#transport input telnet
- R3(config-line)#exit
- R3(config)#
Konfigurera RIP version 2 på router R1, R2 och R3
- R1(config)#router rip
- R1(config-router)#version 2
- R1(config-router)#no auto-summary
- R1(config-router)#network 192.168.1.16
- R1(config-router)#network 10.1.1.0
- R1(config-router)#network 10.3.3.0
- R1(config-router)#exit
- R1(config)#
- R2(config)#router rip
- R2(config-router)#version 2
- R2(config-router)#no auto-summary
- R2(config-router)#network 10.1.1.0
- R2(config-router)#network 192.168.1.0
- R2(config-router)#network 10.2.2.0
- R2(config-router)#exit
- R2(config)#
- R3(config)#router rip
- R3(config-router)#version 2
- R3(config-router)#no auto-summary
- R3(config-router)#network 10.2.2.0
- R3(config-router)#network 10.3.3.0
- R3(config-router)#network 192.168.1.32
- R3(config-router)#exit
- R3(config)#
Task 1: PC4 nekas åtkomst till nätverk 192.168.1.0/28
- R3(config)#ip access-list extended BLOCK_HOST
- R3(config-ext-nacl)#10 deny ip host 192.168.1.38 192.168.1.0 0.0.0.15
- R3(config-ext-nacl)#20 permit ip any any
- R3(config-ext-nacl)#exit
- R3(config)#interface g0/0
- R3(config-if)#ip access-group BLOCK_HOST in
- R3(config-if)#exit
- R3(config)#
Obs! Glöm inte att verifiera konfigurationerna.
Task 2:
- PC3 nekas åtkomst till email server.
- PC2 tillåts endast HTTPS åtkomst till HTTP servern.
- Alla andra nätverkstrafik tillåts
- R2(config)#ip access-list extended BLOCK_email
- R2(config-ext-nacl)#10 deny tcp host 192.168.1.14 host 192.168.1.29 eq smtp
- R2(config-ext-nacl)#20 deny tcp host 192.168.1.14 host 192.168.1.29 eq pop3
- R2(config-ext-nacl)#30 deny tcp host 192.168.1.13 host 192.168.1.30 eq 80
- R2(config-ext-nacl)#40 permit ip any any
- R2(config-ext-nacl)#exit
- R2(config)#interface g0/0
- R2(config-if)#ip access-group BLOCK_email in
- R2(config-if)#exit
- R2(config)#
Verifiera konfigurationerna.
IP tabell
Alla använder DNS server ns1 (192.168.1.28)
Host | IP | Subnet mask | Default gateway |
PC1 | 192.168.1.12 | 255.255.255.240 | 192.168.1.1 |
PC2 | 192.168.1.13 | 255.255.255.240 | 192.168.1.1 |
PC3 | 192.168.1.14 | 255.255.255.240 | 192.168.1.1 |
PC4 | 192.168.1.38 | 255.255.255.248 | 192.168.1.33 |
HTTP server | 192.168.1.30 | 255.255.255.240 | 192.168.1.17 |
Mail server | 192.168.1.29 | 255.255.255.240 | 192.168.1.17 |
ns1 | 192.168.1.28 | 255.255.255.240 | 192.168.1.17 |