how to create an ACl on cisco router to accept icmp from particular host and deny all others

I want to set an ACL on Gigabit Interface on the router to accept icmp from only one host and deny all request of ICMP from all others.

Thanks and regards

Saqib
LVL 1
nocinfospanAsked:
Who is Participating?
 
Craig BeckCommented:
You could try something like...


access-list 100 permit icmp host 1.1.1.1 any
access-list 100 deny icmp any any
access-list 100 permit ip any any

int gi0/0
ip access-class 100 in
0
 
nocinfospanAuthor Commented:
i have set "ip access-group 100 in" because i do not have any other option under my int gig0/0 .. But after applying all the above lines do not work it still able to ping from other hosts as well.
0
 
DanJCommented:
apply these under the vty lines
for instance

line vty 0-4
access-class 100 in

the number of vty lines are platform dependant. To cover all lines type line vty 0 ?
in this case the last vty line is 807
R2(config)#line vty 0 ?
  <1-807>  Last Line number
0
 
nocinfospanAuthor Commented:
its not a complete solution i have to do some more things to acheive that functionality
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.