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

Cannot add multiple icmp_type in the same firewall rule #31

Closed
Daymarvi opened this issue Aug 23, 2024 · 1 comment · Fixed by #32
Closed

Cannot add multiple icmp_type in the same firewall rule #31

Daymarvi opened this issue Aug 23, 2024 · 1 comment · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@Daymarvi
Copy link
Collaborator

Daymarvi commented Aug 23, 2024

Hello,

I have a firewall rule that allow icmp type 8 (Echo Request), see my example below

'Allow icmpv4 ': 
direction: 'inbound' 
protocol: 'icmpv4' 
icmp_type: '8' 
hosts: 'myip' 
interface: 'any' 
description: 'Allow ICMPv4'

We need to allow icmpv4 type 3 and 11. But when i'm adding it into the icmp_type, i have an error :
Error: Could not run: undefined method downcase' for {"value"=>["8", "10", "11"], "Count"=>3}:Hash`
I would like to avoid creating duplicate rules of course :-)

To reproduce it :

  • open the firewall console
  • create a new icmpv4 rule and add custom type
  • type puppet ressource windows_firewall rule to get the output.

Would be nice to have something like that

'Allow icmpv4 ': 
direction: 'inbound' 
protocol: 'icmpv4' 
icmp_type: 
- '8' 
- '3:4'
- '11'
hosts: 'myip' 
interface: 'any' 
description: 'Allow ICMPv4'

The idea would be to manage the code and maybe the the type ? like referenced here : https://www.inetdoc.net/guides/iptables-tutorial/icmptypes.html

@webalexeu webalexeu self-assigned this Aug 24, 2024
@webalexeu webalexeu added the bug Something isn't working label Aug 24, 2024
@webalexeu
Copy link
Owner

Bug confirmed

icmp_type is indeed an array of values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants