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

Fix icmp for windows #228

Closed
wants to merge 3 commits into from
Closed

Fix icmp for windows #228

wants to merge 3 commits into from

Conversation

RiverHeart
Copy link

@RiverHeart RiverHeart commented Apr 3, 2021

Description

Originally implemented by AlexandreZia and resubmitted here with his permission and minor tweaks by me

Netsh doesn't accept local/remote port flags when adding icmp rule so I've added an icmp? function and checks to exclude them. Added case statement to convert "icmp" to "icmpv4" so we don't need to distinguish between values for Linux/Windows

Issues Resolved

#156

Check List

  • All tests pass. See TESTING.md for details.
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

DCO

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.

Signed-off-by: Riverheart

Originally implemented by AlexandreZia and resubmitted here with his permission and minor tweaks by me

Added icmp? function and checks to exclude local/remote ports if that function returns true. Also case statement to convert icmp to icmpv4 so we don't need to distinguish between values for Linux/Windows

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the
    best of my knowledge, is covered under an appropriate open
    source license and I have the right under that license to
    submit that work with modifications, whether created in whole
    or in part by me, under the same open source license (unless
    I am permitted to submit under a different license), as
    Indicated in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including
    all personal information I submit with it, including my
    sign-off) is maintained indefinitely and may be redistributed
    consistent with this project or the open source license(s)
    involved.

Signed-off-by: Riverheart
@RiverHeart RiverHeart marked this pull request as draft April 3, 2021 21:00
@RiverHeart
Copy link
Author

Full disclosure to the maintainers, I'm a noob when it comes to contributing to open source and specifically Chef cookbooks. I tested the code via kitchen/vagrant against the StefanScherer/windows_2019 box after downloading the supermarket version of 'firewall' and copied over the changes for this specific file via the Github interface. Probably not how this process normally goes but not sure how to officially test this either.

As for the other delivery errors, I'm not sure how to resolve those errors. I don't do a lot of work in Ruby y'see >_>

@RiverHeart RiverHeart marked this pull request as ready for review April 3, 2021 21:32
@ramereth ramereth linked an issue Apr 5, 2021 that may be closed by this pull request
@ramereth
Copy link
Contributor

ramereth commented Apr 5, 2021

@RiverHeart we still need to properly adopt this into the Sous Chefs so it might be a bit until we can properly review this. Just an FYI.

@RiverHeart
Copy link
Author

@ramereth No worries. Appreciate you getting back to me.

@RiverHeart RiverHeart closed this by deleting the head repository Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cant create ICMP firewall rules on windows
2 participants