چارەسەری لاب / Security
ACL blocking traffic it should allow
Packet Tracer · GNS3 · Cisco IOS · دوایین پشکنین
deny any, so an ACL with only deny lines blocks everything. Also check the direction (in is traffic coming into that interface), the rule order (first match wins), the wildcard masks, and that a standard ACL sits close to the destination.لەم پەڕەیەدا
What you see
You added an ACL to block one host or one service, and now nothing passes. Or the ACL seems to do nothing at all.
Check it
show access-listsshows each line with a match counter. Ping again and see which line counts up.show ip interface g0/0 | include access listshows which ACL is applied on that interface and in which direction.- Walk the packet: which interface does it enter, which does it leave? Write it down before you look at the ACL.
The implicit deny
Every ACL ends with a hidden deny any. This ACL blocks everyone, not just one host:
access-list 10 deny host 192.168.1.5
Add the permit you meant:
access-list 10 deny host 192.168.1.5
access-list 10 permit any
Direction and placement
ip access-group 10 inchecks packets entering that interface.outchecks packets leaving it.- A standard ACL only looks at the source, so put it close to the destination, or you block that source from everything.
- An extended ACL can be precise, so put it close to the source.
Order matters
The router reads the lines top to bottom and stops at the first match. A permit ip any any above your deny makes the deny useless. With a named ACL you can insert a line by number instead of retyping everything:
ip access-list extended FROM-STAFF
15 deny tcp 192.168.10.0 0.0.0.255 host 10.0.0.5 eq 80
Ping is blocked but web works
An extended ACL that permits only tcp drops ping, and also the ping replies coming back. To allow ping, permit ICMP:
ip access-list extended FROM-STAFF
permit icmp any any
An ACL on an interface between routers can also block OSPF or EIGRP hellos. Permit them (permit ospf any any) or apply the ACL somewhere else.
Wildcard masks
ACLs use wildcards, the opposite of a subnet mask. 0.0.0.255 is a /24 and 0.0.0.3 is a /30. Writing 255.255.255.0 in an ACL matches addresses you didn't mean.