Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port group optimization for same src/dst rules #254

Open
nitinics opened this issue Mar 19, 2021 · 0 comments
Open

port group optimization for same src/dst rules #254

nitinics opened this issue Mar 19, 2021 · 0 comments
Assignees

Comments

@nitinics
Copy link

Capirca port-group doesn't group ports for same src/dst rules.

e.g. in the default cisco-sample.pol , add this

term accept-to-honestdns {
  comment:: "Allow name resolution using honestdns."
  destination-address:: GOOGLE_DNS
  destination-port:: DNS DHCP 
  protocol:: udp tcp
  action:: accept
}

Outputs:

object-group port 53-53
 eq 53
exit
object-group port 67-68
 range 67 68
exit
remark Allow name resolution using honestdns.
 permit udp any net-group GOOGLE_DNS port-group 53-53
 permit tcp any net-group GOOGLE_DNS port-group 53-53
 permit udp any net-group GOOGLE_DNS port-group 67-68
 permit tcp any net-group GOOGLE_DNS port-group 67-68

It would make sense to get something like:

object-group port DNS_DHCP
 eq 53
 range 67 68
exit
remark Allow name resolution using honestdns.
 permit udp any net-group GOOGLE_DNS port-group DNS_DHCP
 permit tcp any net-group GOOGLE_DNS port-group DNS_DHCP

This is specifically helpful when you have a list of ports sharing same src/dst permit statements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants