Expand iptables module
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 737
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
So I have these commands I want to use with Rex iptables:
# /sbin/iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set
# /sbin/iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 15 -j DROP
The problem I run into is with the -m <match> [match options]. So I would need to create an arrayref for the match arg
m => [['state', '--state NEW'],['recent', '--update --seconds 60 --hitcount 15']]
This is an example me and @ferki talked about but maybe there is an easier solution? Otherwise I think the stance would be if you need something more advanced then to write a custom module to handle that use case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Rex's iptables module and its current handling of match arguments. Compare the requested state and recent match clauses with the existing API, then clarify whether arrayref support is the intended solution or whether advanced rules should use a custom module; done means the requested commands can be represented consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- devops, networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100