1 ~ 99 | 1300 - 1999
Standart = Deve ser aplicada próximo ao destino. Range 1 ~99 ou 1300 ~1999
Extended = Deve ser aplicada próximo da origem. Range 100 ~ 199 ou 2000 ~ 2699
Para bloquear um tráfego telnet para um host na ACL Extended você deverá aplica-la na porta mais próxima da origem "acesso".
Exemplo de configuração, permitir somente a origem 192.168.10.1 acessar telnet para 172.16.1.1
Código: Selecionar todos
R2(config)#access-list 150 permit tcp host 192.168.10.1 host 172.16.1.1 eq 23
R2(config)#do show access-list
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet
Código: Selecionar todos
R2(config)#access-list 150 deny icmp host 192.168.10.1 host 172.16.1.1
R2(config)#do show access-list
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet
20 deny icmp host 192.168.10.1 host 172.16.1.1
Código: Selecionar todos
R2(config)#access-list 150 permit ip any any
R2(config)#do show access-list
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet
20 deny icmp host 192.168.10.1 host 172.16.1.1
30 permit ip any any
R2(config)#
Any = Qualquer origem
Any = Qualquer destino
Agora que a ACL foi criada é necessário vincula-la a interface de acesso que deseja filtrar.
Código: Selecionar todos
R2(config)#interface f0/0
R2(config-if)#ip access-group 150 in
R2(config-if)#end
R2#show access-lists 150
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet (15 matches)
20 deny icmp host 192.168.10.1 host 172.16.1.1 (11 matches)
30 permit ip any any (4 matches)
R2#
Vamos bloquear ICMP do host 192.168.20.1 para 172.16.1.1
Código: Selecionar todos
R2(config)#do show access-list
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet (15 matches)
20 deny icmp host 192.168.10.1 host 172.16.1.1 (11 matches)
30 permit ip any any (21 matches)
40 deny icmp host 192.168.20.1 host 172.16.1.1 <--- Esta regra não terá efeito no filtro.
Código: Selecionar todos
R2(config)#ip access-list extended 150
R2(config-ext-nacl)#do show access-list
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet (15 matches)
20 deny icmp host 192.168.10.1 host 172.16.1.1 (11 matches)
30 permit ip any any (31 matches)
40 deny icmp host 192.168.20.1 host 172.16.1.1
R2(config-ext-nacl)#no 30
R2(config-ext-nacl)#300 permit ip any any
R2#show access-lists 150
Extended IP access list 150
10 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet (15 matches)
20 deny icmp host 192.168.10.1 host 172.16.1.1 (11 matches)
40 deny icmp host 192.168.20.1 host 172.16.1.1
300 permit ip any any
Código: Selecionar todos
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip access-list extended BLK-TEL-PING
R2(config-ext-nacl)#50 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet
R2(config-ext-nacl)#100 deny icmp host 192.168.10.1 host 172.16.1.1
R2(config-ext-nacl)#150 deny icmp host 192.168.20.1 host 172.16.1.1
R2(config-ext-nacl)#999 permit ip any any
R2(config-ext-nacl)#do show access-list
[b]Extended IP access list BLK-TEL-PING [/b]
50 permit tcp host 192.168.10.1 host 172.16.1.1 eq telnet
100 deny icmp host 192.168.10.1 host 172.16.1.1
150 deny icmp host 192.168.20.1 host 172.16.1.1
999 permit ip any any
R2(config-ext-nacl)#
Código: Selecionar todos
R2(config)#interface f0/0
R2(config-if)#ip access-group BLK-TEL-PING in
R2(config-if)#end
R2#wr
Building configuration...