cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
431
Views
0
Helpful
4
Replies

Range of ports to specify in an extended accees-list

rlvovskiy
Level 1
Level 1

Is there a way to specify a range of ports at the the end of an extended access-list on a router. I mean something like 'accees-list 101 permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 eq 6000-6016'.

thank you

1 Accepted Solution

Accepted Solutions

osam
Level 1
Level 1

You can do something like..

ip access-list extended myACL

permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 gt 5999

permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 lt 6017

deny tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255

Just play with the "lt" and "gt" parameters.

View solution in original post

4 Replies 4

osam
Level 1
Level 1

You can do something like..

ip access-list extended myACL

permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 gt 5999

permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 lt 6017

deny tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255

Just play with the "lt" and "gt" parameters.

Thank you very much - that works.

Any time.. :)

Why not just use the range command?

ip access-list extended myACL

permit tcp 10.10.10.0 0.0.0.255 20.0.0.0 0.0.0.255 range 6000 6016

s.