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

PA: Add support for source port handling #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hkam40k
Copy link

@hkam40k hkam40k commented Jan 19, 2021

This PR is a proposal to add support for term source port handling to Palo Alto platform, and any suggestions or comments to improve it would be very welcome.

Currently only destination port is supported, and the services that are created to PA are named after the first term that uses them in the Capirca policy files. This change allows using also source ports, and the resulting service is named by combining the source and destination service names from the services definition file plus protocol, instead of using the term name. The source port must also be defined in the services definition file. If the resulting service name is too long, the code falls back to forming a service name using port numbers, which should always fall within acceptable length.

This change would cause a change in all configurations after updating Capirca, since it changes the service names from the term name to using the actual service names from the definitions file.

Example resulting PA service names:
SOME_SERVICE_TO_WEB_SERVICES_TCP
SVC_ANY_TO_80_443_TCP

@google-cla google-cla bot added the cla: yes label Jan 19, 2021
…also use 'any' as value for source-port instead of omitting it, even though source-port is possible to omit completely
…ault directory './def' not existing in current working directory
@greenpau
Copy link
Contributor

@hkam40k , please refactor your PR.

@hkam40k
Copy link
Author

hkam40k commented Mar 17, 2021

@hkam40k , please refactor your PR.

Will try to get to this as soon as possible, unfortunately will take a few weeks though.

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

Successfully merging this pull request may close these issues.

2 participants