cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
946
Views
0
Helpful
6
Replies

Adding an IP ranged acl

terabull1
Level 1
Level 1

I have access lists accepting connections from specific IP address with the following structure

access-list outside_inbound_acl permit tcp host xxx.xxx.xxx.xxx host xxx.xxx.xxx.xxx eq www

I need to keep those but also add a couple of ranges.

How do I allow, for example, 125.30.25.* ?

6 Replies 6

terabull1
Level 1
Level 1

Can someone help with this syntax.

mrmozaffari
Level 1
Level 1

more information need.

what ranges :

for example if you want to permit range (125.30.25.1 - 125.30.25.30) to access the network :

access-list x permit ip 125.30.25.0 0.0.0.30 any

The range is 125.30.25.1 through 125.30.25.255.

I tried

access-list outside_inbound_acl permit tcp host 125.30.25.1 0.0.0.255 host xxx.xxx.xxx.xxx eq www

But it failed.

ERROR: invalid IP address host

When you use a word "host", don't use any mask.

Would it be correct to use..

access-list outside_inbound_acl permit tcp host 125.30.25.1 255.255.255.0 host xxx.xxx.xxx.xxx eq www

The host statement is a shortcut for x.x.x.x 255.255.255.255. So if you want to allow access for a network range you need to remove the "host" keyword and add a netmask. access-list outside_inbound_acl permit tcp 125.30.25.0 0.0.0.224 host x.x.x.x eq www