10-15-2020 07:12 AM
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.
Solved! Go to Solution.
10-15-2020 08:10 AM
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
10-15-2020 07:17 AM
ddpatil,
The error is mentioning line 25 and your entry is #3.
Could you share the full policy file?
Mig