cancel
Showing results for 
Search instead for 
Did you mean: 

Help required for ACL policy

Help required for ACL policy

ddpatil89
New Contributor III

Hi Team,

 

I need to create an acl in exos which will permit traffic if it matches source, destination & protocol in addition with any port from list of port.

I created the policy like below but it giving me an error.

entry 3 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.174/32;
protocol tcp;
}
if match any {
destination-port 8080; 
destination-port 2121; 
} then {
count test;
permit;
}
}

check policy Mundra.pol
Error:  Policy Mundra has syntax errors
Line 25 : Did not get expected keyword "then","if" is not valid

 

Please help.
 

 

 

1 ACCEPTED SOLUTION

Miguel-Angel_RO
Valued Contributor II

I think you’re missing the then statement for the entry 3:

entry 3 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.174/32;
destination-port 8080; 
protocol tcp;
} then {
count test;
permit;

}}

entry 4 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.174/32;
destination-port 2121; 
protocol tcp;
} then {
count test;
permit;

}}
 

 

Mig

View solution in original post

5 REPLIES 5

Miguel-Angel_RO
Valued Contributor II

ddpatil,

The error is mentioning line 25 and your entry is #3.

Could you share the full policy file?

Mig

GTM-P2G8KFN