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

Add support for variables in host/port lists #41

Merged
merged 3 commits into from
Jul 6, 2024

Conversation

smortex
Copy link
Member

@smortex smortex commented Jul 6, 2024

Allow to pass variables as items of host lists and port lists.

This allows constructs like this:

clients = { 192.168.0.10 192.168.0.20 }
ports   = { 123 5432 }

node 'test' {
  pass in proto tcp from any to { $clients 10.0.0.10 } port { $ports 3000 }
}

Allow to pass variables as items of host lists and port lists.

This allows constructs like this:

```
clients = { 192.168.0.10 192.168.0.20 }
ports   = { 123 5432 }

node 'test' {
  pass in proto tcp from any to { $clients 10.0.0.10 } port { $ports 3000 }
}
```
@smortex smortex requested a review from a team as a code owner July 6, 2024 11:12
Some tests mock the example.com addresses as loopback addresses, other
as IP addresses in reserved for documentation, and other do not mock the
addresses and fallback to actual resolution with IP address that change
from time to time.

Always use the same addresses for all tests:
  - example.com: 2001:db8:fa4e:adde::42, 203.0.113.42
  - example.net: 2001:db8:fa4e:adde::27, 203.0.113.27
@smortex smortex added the enhancement New feature or request label Jul 6, 2024
@neomilium neomilium merged commit 435b50c into main Jul 6, 2024
7 checks passed
@neomilium neomilium deleted the variables-in-host-and-port-lists branch July 6, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants