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

firewall.toports expects an undef value or a match for Pattern[/^\d+(?:-\d+)?$/], got Integer #1186

Open
chrisongthb opened this issue Jan 11, 2024 · 0 comments · May be fixed by #1199
Open

Comments

@chrisongthb
Copy link

Describe the Bug

With param toports (--to-ports) one might want to redirect to a single port. Not only to a range of ports. We currently get this error:
Failed to apply catalog: Parameter toports failed on Firewall[233 redirect traffic on port 5432 to 5433]: firewall.toports expects an undef value or a match for Pattern[/^\d+(?:-\d+)?$/], got Integer

Expected Behavior

The module should accept the single port as Integer.

Steps to Reproduce

@firewall { "233 redirect traffic on port 5432 to 5433":
  chain    => 'PREROUTING',
  jump     => 'REDIRECT',
  iniface  => 'bond0',
  toports  => 5433,
  table    => 'nat',
  dport    => 5432,
  protocol => 'iptables',
  tag      => 'virtual',
}

Environment

  • Module version v7.0.2
  • Puppet Agent version 7.26.0
  • Puppet Server version 7.13.0
  • Platform Ubuntu 20.04, 22.04
chrisongthb added a commit to chrisongthb/chrisongthb-puppetlabs-firewall that referenced this issue Jan 11, 2024
gcoxmoz added a commit to gcoxmoz/puppetlabs-firewall that referenced this issue Mar 19, 2024
@gcoxmoz gcoxmoz linked a pull request Mar 19, 2024 that will close this issue
5 tasks
gcoxmoz added a commit to gcoxmoz/puppetlabs-firewall that referenced this issue Mar 27, 2024
gcoxmoz added a commit to gcoxmoz/puppetlabs-firewall that referenced this issue May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants