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 11:17 AM
You’re welcome,
Please mark the topic as solved
Mig
10-15-2020 11:15 AM
thanks for help. it resolved my issue.
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 08:02 AM
vi Mundra.pol
i
entry 1 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.10/32;
} then {
count test;
deny;
}
}
entry 2 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.141/32;
} then {
count test;
deny;
}
}
entry 3 {
if match all {
source-address 0.0.0.0/0;
destination-address 172.16.108.174/32;
protocol tcp;
}
if match any { ---------------------- error belongs to this line
destination-port 8080;
destination-port 2121;
} then {
count test;
permit;
}
}