Add iptables --hex-string support to firewall resource #907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Add
string_hex
parameter to thefirewall
resource when using iptables. Hex matching is useful for packet marking among other things.Why?
Blocking a matching hex string is very useful for various types of attacks. The real world use case for this (aka. my motivation) was to block DNS reflection attacks. While the proper fix to these issues is usually within the application itself, sometimes we need to mitigate the issue until code can be fixed. With this PR, the following becomes possible:
Rebased against
master
(using my own branch, which i should have done in the first place) per @sanfrancrisko request here: #902 (comment)